Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIs crashes
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
01307134
Message ID:
01308487
Views:
10
I'm not sure but you have these binary files in your Web directory? THat's a real bad call because they can be downloaded that way.

IAC, external files are a problem in COM generally - you need to embed that stuff into the app. I think the .APP file can't be embeded but I believe the fll can.

IAC, you should check with Equeus - they ought to be able to help set this up or at least be able to tell you of hte viability.

All I know is that they're bypassing the report engine which is the biggest problem.

THen again I wouldn't use VFP DLLs for anything inside of IIS anyways, but that's another story <g>...

+++ Rick ---

>Thanks Rick. I was never quite sure of the INIT in this context.
>
>I've been experimenting with both MERE and XFRX but so far have not been able to get either to work satisfactorilly. My current code is
>
>	function CreateXFRXPDF2
>		lparameters lcReportName, lcOutputFile, lcSQL
>		
>		lcSQL = lcSQL + " into cursor crsTemp"
>		execscript(lcSQL)
>		set path to c:\inetpub\wwwroot\contactmanager\data
>		set classlib to xfrxlib additive
>		set classlib to (home()+"ffc\_reportlistener") additive
>		set library to c:\inetpub\wwwroot\contactmanager\xfrxlib.fll additive
>		set procedure to c:\inetpub\wwwroot\contactmanager\xfrx.app additive
>		
>		local loObj
>		
>		loSession = xfrx("XFRX#INIT")		
>		loObj = evaluate([XFRX("XFRX#LISTENER")])
>		lnRetval = loObj.SetParams(lcOutputFile,,.t.,,,,"PDF")
>		
>		if lnRetval = 0
>			loObj.setPermissions(.t., .f., .f., .f.)
>			report form (lcReportName) object loObj
>			return .t.
>		else
>			return .f.	
>		endif
>	endfunc
>
>This works when run from VFP but fails when run from ASP. I'm not sure about the SET PROC line but without it it fails with "XFRX.prg not found". In this current version it fails in ASP with a return value of .F. Can you provide a suggestion on where to look next?
>
>Thanks
>
>>>Hi Rick, thanks for your reply.
>>>I've built a couple of COM dlls based on your white paper on the subject. Perhaps you could answer a couple of remaining questions?
>>>1. Your example contains an INIT function. Is this code run automatically upon instantiation?, or does it need to be called explicitly?
>>
>>Sure it's VFP Init() - the constructor and it gets called everytime the object is instantiated COM or VFP.
>>
>>
>>>2. Your example also includes a function for error reporting but I see no ON ERROR commands to trigger it. How would you set that up?
>>
>>Error methods are native to VFP objects. Take a look in the FoxPro help file for the Error method on Fox objects.
>>
>>>And finally back to my immediate problem, is there a white paper or some instructions on setting up a separate service to handle the reporting as you suggest? Would this just be another DLL called by the first? or something more complex?
>>
>>Well, it's not a trivial task to set up a separate async server, but you can find a white paper here. It uses Web Connection but can be applied to ASP/COM the same way:
>>http://west-wind.com/presentations/wwAsyncWebRequest/wwAsyncWebRequest.htm
>>
>>Basically this article talks about using a separate server operation to offload processing to whatever mechanism you choose. For ASP this might mean launching a separate EXE to run the report - you then keep checking for the EXE to complete its task and keep checking back every few seconds. When complete you pick up the result and serve it.
>>
>>Another appraoch might be to just shell and block until the shell application completes. I believe there are a few Execute type utilities in the libraries here that can execute a command line and wait for completion. That might be easier than allowing a COM EXE to run although you may have to set additional Web Server permissions to allow this execution to be allowed.
>>
>>But frankly I would recommend still looking close at MERE or XFRX since htey both should work in DLLs especially if you haven't tried one or the other. I've had good luck with XFRX in Web Connection, but then that's running in a separate EXE not inside of DLL servers.
>>
>>In the end that approach will be much easier.
>>
>>+++ Rick ---
>>
>>>
>>>Thanks
>>>
>>>>ASP won't work with anything that uses the native report writer because VFP COM doesn't allow for Report operation in the VFP DLL runtimes. You have to use an EXE if you want to run the report engine and that's definitely not recommended.
>>>>
>>>>Your only options for reporting engines then are Mind's Eye ro XFRX which basically bypass the report engine altogher and do their own report processing. Personally I've been usign XFRX and it works for what I need to do although I don't do much with reports admittedly <s>...
>>>>
>>>>Anything inside of a DLL though will change the operational environments for both Mind's eye and XFRX though and I wouldn't be surprised if the STA environment that VFP needs to run in in DLL mode inside of IIS is potentially making the environment unstable.
>>>>
>>>>Another alternative is to offload report processing to a separate service and move it out of the Web Server entirely. More work but probably much more reliable as well as better able to deal with scalability.
>>>>
>>>>+++ Rick ---
>>>>
>>>>
>>>>
>>>>>I have been trying to write a DLL to create PDF documents from ASP. Most of my testing has been with the MERE report engine. At one point I had it running correctly except when there was a graphic in the report. Then it would fail. I then moved on to try some other possibilities including Acrobat assisted by wwPDF. This worked when run from VFP but crashed IIs when atempted from ASP. Now I wan to go back to the MERE solution since it was the closest so far but I can't seem to get back to where I was. It now crashes IIs just like Acrobat did.
>>>>>
>>>>>Can someone help me trouble shoot this so I can find the problem? I know it will work if there is no graphic in the report 'cause I had it working at one time.
>>>>>
>>>>>It will work when run from VFP but no when run from ASP. Here is what I have checked:
>>>>>Permissions - Other functions in the dll will create files in the output folder so permissions should be OK.
>>>>>Pathing to find files. - I have tried hard codeing the full filespec in the ASP code. This does not seem to help.
>>>>>Uninstalled Acrobat - since I was testing this prior to the MERE failure.
>>>>>Uninstall and reinstall IIS.
>>>>>Compiling the report into the DLL vs leaving it external.
>>>>>Saving or not saving the printer environment in the report definition.
>>>>>
>>>>>This has been frustration city for me for the last few days. Any help will be greatly appreciated.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform