List Info

Thread: Re: Receiving an http post.




Re: Receiving an http post.
country flaguser name
United States
2008-07-09 05:09:15
Hmmm

I was hoping to do it as a windows app, ASP.net being a
mysterious option
under project that's never pressed....but I may risk it and
press the
magic button and see what happens.

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


Re: Receiving an http post.
user name
2008-07-09 05:51:12
You could also host an HttppListener in your winapp.

Something like [1]
Run it and locate your browser to http://localhost/myapp/
to test it.

HTH
// Ryan

using System.IO;
using System.Net;

class Program
{
  static void Main( string[] args)
  {
    using ( HttpListener hl = new HttpListener())
    {
      hl.Prefixes.Add( "http://localhost/myapp/
");
      hl.Start();
      while ( true)
      {
        HttpListenerContext c = hl.GetContext();
        using ( StreamWriter sw = new StreamWriter(
c.Response.OutputStream))
        {
          sw.WriteLine( "<h2>Hello World, Request
was a  from
UserAgent:</h2>", c.Request.HttpMethod,
c.Request.UserAgent);
        }
      }
    }
  }
}



On Wed, Jul 9, 2008 at 12:09 PM, Mark Nicholls
<Nicholls.Markmtvne.com> wrote:
> Hmmm
>
> I was hoping to do it as a windows app, ASP.net being a
mysterious option
> under project that's never pressed....but I may risk it
and press the
> magic button and see what happens.
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com

>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )