Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP DLL access
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
01661127
Message ID:
01661195
Views:
52
I have not been able to trap any error message. I changed to asp.net and it seems to be working. I do not know why that would make a differerence.

>And the error?
>
>Why are you using ASP? Much easier to do this in ASP.NET and put a try/catch block around the code to see a real error.
>
>+++ Rick ---
>
>>Maybe this will help:
>>
>>The setup is relatively simple. The page being called has this code:
>>
>>
>>Dim oTows
>>Set oTows = Server.CreateObject("urtivr.urtivr")
>>dim cLookup
>>cLookup = Request.QueryString("lookup")
>>If cLookup<>" " Then
>>	Dim cReply
>>	cReply =(oTows.FindTow(cLookup))
>>	Response.Write(cReply)
>>End If
>>
>>
>>"urtivr" is located in a vfp dll in c:\urtivr\urtivr.dll. It returns an XML response.
>>
>>With a desktop session running, it works fine. Without it, accessing the site gets a 500 error. I can find no entry for the error in logs. However there is also no enty showing the site accessed.
>>
>>I have set the appool identify to LocalSystem. I also set it the local administrator. No difference.
>>
>>The class instantiation looks like this
>>
>>DEFINE CLASS urtivr AS SESSION OLEPUBLIC
>>
>>	PROTECTED tdatetime
>>	PROTECTED nConnectionHandle
>>
>>	tdatetime = DATETIME()
>>	nResults = 0
>>	cresults = ''
>>	lrevenuetow = .F.
>>	ntowfees = 0
>>	nstoragefees = 0
>>	notherfees = 0
>>	nSearchByItem = 0
>>	cPound = ''
>>	nConnectionHandle = 0
>>	cversion = ''
>>
>>
>>	cVIN6 = ''
>>	cLicense = ''
>>
>>	PROCEDURE INIT
>>
>>		WITH THIS
>>			.cVIN6 = ''
>>			.cLicense = ''
>>			.nResults = 0
>>			.tdatetime = DATETIME()
>>			.lrevenuetow = .F.
>>			.ntowfees = 0
>>			.nstoragefees = 0
>>			.notherfees = 0
>>			.nConnectionHandle = 0
>>			.cversion = '1.1'
>>		ENDWITH
>>
>>	ENDPROC
>>
>>
>>
>>>>I was not clear enough; the problem is loading the vfp dll, not the SQL connection.
>>>
>>>Does not work is not a good description of what's happening. What's the error you are getting?
>>>
>>>The previous issue remains. I believe the default IIS Aplicationpool account doesn't have even the basic rights required to access the registry to get COM registration information. Change the identity to something that you know will work like SYSTEM and then work your way back the security chain to least privilege possible to run.
>>>
>>>It might be the DLL that's not loading but it's likely the CODE inside of the DLL that's causnig the COM object to not load. Specifically remove all code from the INIT() and initialize the object explicitly with an Initialize() method to ensure the object can load without having any code executing that might be failing during object instantiation.
>>>
>>>
>>>+++ Rick ---
>>>
>>>
>>>
>>>>>>I have an .asp page that called a VFP DLL. The DLL lookups some data in SQL Server and returns an XML to the .asp page.
>>>>>>
>>>>>>Works great, but I cannot seem to get it set so that the dll can be called with no user logged in (no desktop). Probably a simple user rights I am missing. Suggestions?
>>>>>
>>>>>Not sure why you are getting a permissions error - you shouldn't have a problem if you're not accessing local disk data directly. How is the SQL Connection set up? If you are using Windows security on the connection (rather than a SQL Server account) then that may be the problem as by default IIS configures a Application Pool identity that is generated and is unlikely to have rights to access your SQL Server (or any disk based resources).
>>>>>
>>>>>You can set the Application Pool identity on the Application Pool in the IIS Manager. I suggest either setting up a custom account or if you use something generic use Network Service and then adjust your permissions to the DB to allow for that account to connect to SQL Server if you're using Windows auth.
>>>>>
>>>>>The easier solution may just be though to use SQL Server auth with user name and password which **should** bypass the whole Identity issue.
>>>>>
>>>>>+++ Rick ---
>>>>
>>>>I was not clear enough; the problem is loading the vfp dll, not the SQL connection.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform