Create cgi web service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Tissington

    Create cgi web service

    Using Visual Studio 2008 can someone point me to an example to create a cgi
    web service in C# ?

    Thanks.

  • Spam Catcher

    #2
    Re: Create cgi web service

    "Michael Tissington" <mtissington@ne wsgroup.nospamw rote in
    news:eBHUnQYoIH A.4112@TK2MSFTN GP03.phx.gbl:
    Using Visual Studio 2008 can someone point me to an example to create
    a cgi web service in C# ?
    How come you want to create a CGI applicaion? Even if you get it working as
    a CGI application, the server will need the .NET runtime, at which point
    it's probably better to create an ASP.NET application?


    --
    spamhoneypot@ro gers.com (Do not e-mail)

    Comment

    • Steven Cheng [MSFT]

      #3
      RE: Create cgi web service

      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
      Here's an example of how to create a CGI executable for .NET with C#.


      #Understanding CGI with C#


      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@microsof t.com.

      =============== =============== =============== =====
      Get notification to my posts through email? Please refer to
      Gain technical skills through documentation and training, earn certifications and connect with the community

      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/subscripti...t/default.aspx.
      =============== =============== =============== =====
      This posting is provided "AS IS" with no warranties, and confers no rights.


      --------------------
      From: "Michael Tissington" <mtissington@ne wsgroup.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.


      Comment

      • Michael Tissington

        #4
        Re: Create cgi web service

        I need to create aCGI application because that is how the external site is
        talking to us and I have no control over them.

        "Spam Catcher" <spamhoneypot@r ogers.comwrote in message
        news:Xns9A85CE7 9BF1A3usenethon eypotrogers@127 .0.0.1...
        "Michael Tissington" <mtissington@ne wsgroup.nospamw rote in
        news:eBHUnQYoIH A.4112@TK2MSFTN GP03.phx.gbl:
        >
        >Using Visual Studio 2008 can someone point me to an example to create
        >a cgi web service in C# ?
        >
        How come you want to create a CGI applicaion? Even if you get it working
        as
        a CGI application, the server will need the .NET runtime, at which point
        it's probably better to create an ASP.NET application?
        >
        >
        --
        spamhoneypot@ro gers.com (Do not e-mail)

        Comment

        • Michael Tissington

          #5
          Re: Create cgi web service

          Hi,

          Thanks for the link ... I would love to do something else other than cgi
          but the extrenal website is expecting a cgi ...

          "Steven Cheng [MSFT]" <stcheng@online .microsoft.comw rote in message
          news:nLpk%23t1o IHA.9932@TK2MSF TNGHUB02.phx.gb l...
          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
          Here's an example of how to create a CGI executable for .NET with C#.

          >
          #Understanding CGI with C#

          >
          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@microsof t.com.
          >
          =============== =============== =============== =====
          Get notification to my posts through email? Please refer to
          Gain technical skills through documentation and training, earn certifications and connect with the community

          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/subscripti...t/default.aspx.
          =============== =============== =============== =====
          This posting is provided "AS IS" with no warranties, and confers no
          rights.
          >
          >
          --------------------
          From: "Michael Tissington" <mtissington@ne wsgroup.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.
          >
          >

          Comment

          • Michael Tissington

            #6
            Re: Create cgi web service

            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
            ....

            "Steven Cheng [MSFT]" <stcheng@online .microsoft.comw rote in message
            news:nLpk%23t1o IHA.9932@TK2MSF TNGHUB02.phx.gb l...
            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
            Here's an example of how to create a CGI executable for .NET with C#.

            >
            #Understanding CGI with C#

            >
            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@microsof t.com.
            >
            =============== =============== =============== =====
            Get notification to my posts through email? Please refer to
            Gain technical skills through documentation and training, earn certifications and connect with the community

            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/subscripti...t/default.aspx.
            =============== =============== =============== =====
            This posting is provided "AS IS" with no warranties, and confers no
            rights.
            >
            >
            --------------------
            From: "Michael Tissington" <mtissington@ne wsgroup.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.
            >
            >

            Comment

            • Steven Cheng [MSFT]

              #7
              Re: Create cgi web service

              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@microsof t.com.

              =============== =============== =============== =====
              Get notification to my posts through email? Please refer to
              Gain technical skills through documentation and training, earn certifications and connect with the community

              ications.

              =============== =============== =============== =====
              This posting is provided "AS IS" with no warranties, and confers no rights.




              --------------------
              From: "Michael Tissington" <mtissington@ne wsgroup.nospam>
              References: <eBHUnQYoIHA.41 12@TK2MSFTNGP03 .phx.gbl>
              <nLpk#t1oIHA.99 32@TK2MSFTNGHUB 02.phx.gbl>
              In-Reply-To: <nLpk#t1oIHA.99 32@TK2MSFTNGHUB 02.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
              ...

              "Steven Cheng [MSFT]" <stcheng@online .microsoft.comw rote in message
              news:nLpk%23t1o IHA.9932@TK2MSF TNGHUB02.phx.gb l...
              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
              Here's an example of how to create a CGI executable for .NET with C#.

              >
              #Understanding CGI with C#

              >
              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@microsof t.com.
              >
              =============== =============== =============== =====
              Get notification to my posts through email? Please refer to
              >
              http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
              =============== =============== =============== =====
              This posting is provided "AS IS" with no warranties, and confers no
              rights.
              >
              >
              --------------------
              From: "Michael Tissington" <mtissington@ne wsgroup.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.
              >
              >

              Comment

              Working...