IIS 7 and Above
Cgi Script in C#
Last post Mar 29, 2011 11:04 PM by chalakiblog
Aug 26, 2008 08:48 AM|jonathanpeppers|LINK
I have written a Cgi script in C# to translate communication to a local Window Communication Foundation (WCF) service, b/c we are having to do some integration with an existing Point of Sale system.
My issue is that when run in a browser, the script for some reason cannot load some assemblies required for my script. When run from the command prompt, it works just fine. If I configure IIS to run the script under administrator, it does not work either.
Both the IIS_IUSRS group and IUSR have proper file access to the assembly. If I subscribe to the AssemblyResolve event, and call Assembly.LoadFrom and give a path, it works for some reason. But then other things fail such as looking at the registry and
WCF loading it's configuration files. (Which the IIS user should have access to)
Fusion logs give me failure to load what looks like the correct path. Has anyone gotten a C# cgi script to work that has access to the Registry, WCF, etc.?
Aug 29, 2008 09:35 AM|jonathanpeppers|LINK
Does anyone know how to accomplish the same thing with an asp.net page?
I need to respond with Content-type: text/xml, with a specific xml format.
Aug 29, 2008 04:22 PM|anilr|LINK
Response.ContentType = "text/xml";
Response.Write("blah blah blah");
Sep 02, 2008 11:32 AM|jonathanpeppers|LINK
This worked, I had to call Response.End() to prevent the default html from printing.
Using asp.net to emulate cgi seemed much easier to set up.
Mar 29, 2011 11:04 PM|chalakiblog|LINK
cgi c# iis vs2000