Hi Michael,
Thanks for your reply.
Yes, I've also performed some tests on my side and did find the problem you
mentioned. I've also consult some .NET framework and IIS engineers and
they've told me that the problem is likey due to how the IIS load the CGI
exe program. Running a managed dll/exe as an ISAPI extension/ISAPI
filter/CGI does not work (in most cases) because IIS loads the dll/exe with
path that looks like \\?\d:\path\foo.dll (for various reasons) and CLR does
not like managed code invoked with the leading \\?\ - this has come up
multiple times in the past and CLR team has in the past said that it is too
expensive to fix this in the CLR.
A possible workaround would be to use a native dll/exe and load your
managed assemblies manually from them (i.e. the asp.net approach). However,
I think creating an unmanaged CGI program will be better than mixed
unmanaged and managed code.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Michael Tissington" <mtissington@newsgroup.nospam>
References: <eBHUnQYoIHA.4112@TK2MSFTNGP03.phx.gbl>
<nLpk#t1oIHA.9932@TK2MSFTNGHUB02.phx.gbl>
In-Reply-To: <nLpk#t1oIHA.9932@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Create cgi web service
Date: Wed, 23 Apr 2008 11:13:52 -0700
I''m really just needing to create a cgi application.
I tried the first link and link some of the comments I too get the error
HRESULT: 0x80070057 (E_INVALIDARG)) ..... do you have any ideas about this
...
[quoted text, click to view] "Steven Cheng [MSFT]" <stcheng@online.microsoft.com> wrote in message
news:nLpk%23t1oIHA.9932@TK2MSFTNGHUB02.phx.gbl...
> Hi Michael,
>
> For C# based CGI program, you can build a console application which read
> environment variables and write output to standard output. Here are some
> articles introcuding this:
>
> #Creating a C#/.NET CGI Executable
>
http://www.west-wind.com/WebLog/posts/1143.aspx >
> #Understanding CGI with C#
>
http://www.codeproject.com/KB/cs/cgi_csharp.aspx >
> However, I think for CGI or ISAPI filters, unmanaged interface will still
> be preferred. Also, for webservice, since it receive SOAP XML message and
> return SOAP response, if you create your own CGI application as
> webservice,
> you will have to do the XML processing yourself which may require much
> more
> work. Is there any particular reason here that you can not use the ASP.NET
> webservice or even WCF service?
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
>
http://msdn.microsoft.com/subscriptions/support/default.aspx. > ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> --------------------
> From: "Michael Tissington" <mtissington@newsgroup.nospam>
> Subject: Create cgi web service
> Date: Fri, 18 Apr 2008 11:43:54 -0700
>
>
> Using Visual Studio 2008 can someone point me to an example to create a
> cgi
> web service in C# ?
>
> Thanks.
>