Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First Steps
Message
From
27/08/1999 13:00:54
 
 
To
27/08/1999 12:43:27
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00258494
Message ID:
00258504
Views:
10
>Hello everybody!
>
>Please help me make my first step in building an inet server.
>Problem description.
>My first very simple example that I want to run on my Web Server is:
>********************************************
>#DEFINE CRLF CHR(13)+CHR(10)
>DEFINE CLASS server AS CUSTOM OLEPUBLIC
>cError = ''
>fname = ''
>lname = ''
>FullName = ''
>address = ''
>PROCEDURE FillDebtor
> LPARAM lcFormVars, lcIniFile, lnRelease
> lnRelease = 0
> CLOSE DATA ALL
> SET EXCLUSIVE OFF
> USE \\dataserv\fdrive\accounts\data\debtor_i IN 0 SHARED
> SELECT * FROM debtor_i WHERE debtor_id=lcFormVars INTO CURSOR dCur
> This.fname = dCur.fname
> This.lname = dCur.lname
> This.Fullname = ALLTRIM(dCur.fname)+SPACE(1)+ALLTRIM(dCur.lname)
> This.address = ALLTRIM(dCur.address1)+SPACE(1)+ALLTRIM(dCur.City)+","+dCur.State
> RETURN This.HTML()
>ENDPROC
>
>PROCEDURE Html
> retval = retval+Some HTML code using class property
>RETURN retval
>ENDPROC
>
>ENDDEFINE
>
>I'm using "Inet application with Visual foxpro" by Rick Strahl and it seems like I'm doing everything by the rules.
>
>Now the questions:
>1. The object loads at the web server, when I run the
>"http://webserv/scripts/vfp/foxisapi.dll/reset"
>string from my web browser, it doesn't seem to release the object so I can't rebuild the exe without restarting my server. The reset command show the table with my program but doesn't release it from the server. So how can I release it without restarting everytime?


Are you compiling your server an out of proc exe? In proc servers cannot be unloaded without killing the InetInfo service (IIS). There are lots of other reasons why your COM server should be an exe too including safety. An in-proc dll can take the server down with it if it crashes.

>2. I checked the permissions for both my scripts directory and the share that I'm trying to access and IUSR_ has permissions to access the info. When I comment out the data access and just run this string "http://webserv/scripts/vfp/foxisapi.dll/apserv.server.filldebtor?UG5" with the "First Pancake" text that seems to work fine. So am I accessing the data incorrectly or did I leave something out that I need? If I create the object in FoxPro everything works great.

The share? If your server is compiled as an exe, you can use DCOMCNFG to have it impersonate the interactive user account (the currently logged in user). This will ensure that anything your server can do from the command window, it can do when being called from IIS. This completely bypasses the _IUSR account, which has next to no rights by default.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform