f



IIS CGI EXE USE DBF on other server or shared folder

Dear friends,
   this is a very simple cgi.
Windows 7 IIS is running on my pc
in my browser I insert this url
http://127.0.0.1/mobile/twn9.exe

Error DBCMD/2001  Workarea not in use: DBGOTOP;Function: MAIN  Line: 21

The question is:
How can I set IIS in order That I can open dbf tables from a CGI EXE in a f=
older that is not on the same pc of IIS?

Many thanks


#include "simpleio.ch"
#include "Error.ch"

FUNCTION MAIN()

LOCAL cDbf =C2=A0 =C2=A0 :=3D ""
LOCAL cFile =C2=A0 =C2=A0:=3D ""
LOCAL cIndex =C2=A0 :=3D ""
LOCAL cAlias =C2=A0 :=3D ""
LOCAL cFirst1 =C2=A0:=3D ""
LOCAL cLast1 =C2=A0 :=3D ""
LOCAL cFirst2 =C2=A0:=3D ""
LOCAL cLast2 =C2=A0 :=3D ""

SET EXCLUSIVE OFF
SET DELETED ON

USE \\172.28.2.10\apps\analisi\customer =C2=A0 // the path is a shared fold=
er in a server=20

cAlias :=3D ALIAS()
GO TOP
cFirst1 :=3D field->first
cLast1 =C2=A0:=3D field->last
GO BOTTOM
cFirst2 :=3D field->first
cLast2 =C2=A0:=3D field->last
CLOSE DATABASE

=C2=A0?? [Content-type: text/html]
=C2=A0?
=C2=A0? [<html>]
=C2=A0? [<body>]
=C2=A0? [<head>]
=C2=A0? [ALIAS()]
=C2=A0? [<br>]
=C2=A0? cAlias
=C2=A0? [<br>]
=C2=A0? cFirst1
=C2=A0? [<br>]
=C2=A0? cLast1
=C2=A0? [<br>]
=C2=A0? cFirst2
=C2=A0? [<br>]
=C2=A0? cLast2
=C2=A0? [<br>]
=C2=A0? [</head>]
=C2=A0? [</body>]
=C2=A0? [</html>]


RETURN NIL
0
Marco
11/23/2016 9:20:34 AM
comp.lang.xharbour 5470 articles. 0 followers. Post Follow

3 Replies
85 Views

Similar Articles

[PageSpeed] 29

On Wednesday, November 23, 2016 at 11:20:35 AM UTC+2, Marco Boschi wrote:
> Dear friends,
>    this is a very simple cgi.
> Windows 7 IIS is running on my pc
> in my browser I insert this url
> http://127.0.0.1/mobile/twn9.exe
>=20
> Error DBCMD/2001  Workarea not in use: DBGOTOP;Function: MAIN  Line: 21
>=20
> The question is:
> How can I set IIS in order That I can open dbf tables from a CGI EXE in a=
 folder that is not on the same pc of IIS?
>=20
> Many thanks
>=20
>=20
> #include "simpleio.ch"
> #include "Error.ch"
>=20
> FUNCTION MAIN()
>=20
> LOCAL cDbf =C2=A0 =C2=A0 :=3D ""
> LOCAL cFile =C2=A0 =C2=A0:=3D ""
> LOCAL cIndex =C2=A0 :=3D ""
> LOCAL cAlias =C2=A0 :=3D ""
> LOCAL cFirst1 =C2=A0:=3D ""
> LOCAL cLast1 =C2=A0 :=3D ""
> LOCAL cFirst2 =C2=A0:=3D ""
> LOCAL cLast2 =C2=A0 :=3D ""
>=20
> SET EXCLUSIVE OFF
> SET DELETED ON
>=20
> USE \\172.28.2.10\apps\analisi\customer =C2=A0 // the path is a shared fo=
lder in a server=20
>=20
> cAlias :=3D ALIAS()
> GO TOP
> cFirst1 :=3D field->first
> cLast1 =C2=A0:=3D field->last
> GO BOTTOM
> cFirst2 :=3D field->first
> cLast2 =C2=A0:=3D field->last
> CLOSE DATABASE
>=20
> =C2=A0?? [Content-type: text/html]
> =C2=A0?
> =C2=A0? [<html>]
> =C2=A0? [<body>]
> =C2=A0? [<head>]
> =C2=A0? [ALIAS()]
> =C2=A0? [<br>]
> =C2=A0? cAlias
> =C2=A0? [<br>]
> =C2=A0? cFirst1
> =C2=A0? [<br>]
> =C2=A0? cLast1
> =C2=A0? [<br>]
> =C2=A0? cFirst2
> =C2=A0? [<br>]
> =C2=A0? cLast2
> =C2=A0? [<br>]
> =C2=A0? [</head>]
> =C2=A0? [</body>]
> =C2=A0? [</html>]
>=20
>=20
> RETURN NIL


It could be a problem related to the:
- authentication method
- network share configuration
- the file naming syntax (UNC)

https://support.microsoft.com/en-us/kb/207671

Note: I'm not using CGI apps.

Ella
0
Ella
11/23/2016 10:40:50 AM
Ella,
   I've created in my IIS a virtual directory.
The physical path is the same in which there is customer.dbf.
In this virtual directory I moved my cgi exe.
I've modified the USE statement in this way

USE customer (no path)

It seems to work
I don't know if it's is a nice idea.
Many thanks
Marco
0
Marco
11/23/2016 12:05:32 PM
On Wednesday, November 23, 2016 at 2:05:34 PM UTC+2, Marco Boschi wrote:
> Ella,
>    I've created in my IIS a virtual directory.
> The physical path is the same in which there is customer.dbf.
> In this virtual directory I moved my cgi exe.
> I've modified the USE statement in this way
> 
> USE customer (no path)
> 
> It seems to work
> I don't know if it's is a nice idea.
> Many thanks
> Marco

:-)
0
Ella
11/23/2016 5:10:39 PM
Reply: