List Info

Thread: Re: Receiving an http post.




Re: Receiving an http post.
country flaguser name
United States
2008-07-08 09:01:46
I'm not the original poster, but your answer is not clear to
me likely my
ignorance rather then your suggested solution. Could you
post a snippet of
code to show this?

Thanks

John Warner




> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:ADVANCED-DOTNETDISCUSS.DEVELOP.COM] On
Behalf Of Ryan Heath
> Sent: Tuesday, July 08, 2008 9:56 AM
> To: ADVANCED-DOTNETDISCUSS.DEVELOP.COM
> Subject: Re: [ADVANCED-DOTNET] Receiving an http post.
>
>
> How about setup an HttpHandler which handles the post.
>
> // Ryan
>
> On Tue, Jul 8, 2008 at 3:43 PM, Mark Nicholls
> <Nicholls.Markmtvne.com> wrote:
> > I've got a 3rd party system that can be configured
to post
> XML files
> > via http posts.
> >
> > This sort of thing is a bit over my head. How do I
receive an http
> > post?
> >
> > ===================================
> > 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 DevelopMentorR  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


Re: Receiving an http post.
user name
2008-07-08 09:25:30
The easiest way to create an HttpHandler is to right click
on your web
project in visual studio.
Choose add new Item
Choose add generic handler.

Visual Studio will create a empty handler class for you.

Your part is to fill in the method

public void ProcessRequest(HttpContext context)
{
 object whatEver = context.Request["whatever"]

 context.Response.ContentType = "text/plain";
 context.Response.Write("Hello World");
}

Another way is to create a class derived from IHttpHandler.
And register the class in the webconfig in the HttpHandler
section.
There you can specify which urls and/or which http methods
(GET/POST)
it should handle.

// Ryan

On Tue, Jul 8, 2008 at 4:01 PM, John Warner <johnjwarner.com> wrote:
> I'm not the original poster, but your answer is not
clear to me likely my
> ignorance rather then your suggested solution. Could
you post a snippet of
> code to show this?
>
> Thanks
>
> John Warner
>
>
>
>
>> -----Original Message-----
>> From: Discussion of advanced .NET topics.
>> [mailto:ADVANCED-DOTNETDISCUSS.DEVELOP.COM] On
Behalf Of Ryan Heath
>> Sent: Tuesday, July 08, 2008 9:56 AM
>> To: ADVANCED-DOTNETDISCUSS.DEVELOP.COM
>> Subject: Re: [ADVANCED-DOTNET] Receiving an http
post.
>>
>>
>> How about setup an HttpHandler which handles the
post.
>>
>> // Ryan
>>
>> On Tue, Jul 8, 2008 at 3:43 PM, Mark Nicholls
>> <Nicholls.Markmtvne.com> wrote:
>> > I've got a 3rd party system that can be
configured to post
>> XML files
>> > via http posts.
>> >
>> > This sort of thing is a bit over my head. How
do I receive an http
>> > post?
>> >
>> > ===================================
>> > 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 DevelopMentorR  http://www.develop.com
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com

>>
>
> ===================================
> 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 )