PC Review


Reply
 
 
Gilbert
Guest
Posts: n/a
 
      22nd Oct 2008
Apologies if I'm posting this to the wrong group. I want to know if it
possible to emulate Java servlet functionality in C# and .net. What I want
to do is to be able to do is create a C# program that sits listens for an
HTTP request to a specific URL and then access the C# equivalent of the
HTTPServletRequest object so I can access the request parameters directly.
I've googled and found out about the WebClient - what I want is the
converse, something that sits on the webserver.

I'm sure that it must be possible but as a newbie I'm not sure of the
correct C# & .Net terminology yet to be able to effectively google for what
I want.

Regards
 
Reply With Quote
 
 
 
 
puzzlecracker
Guest
Posts: n/a
 
      22nd Oct 2008
On Oct 22, 10:43*am, Gilbert <(E-Mail Removed)> wrote:
> Apologies if I'm posting this to the wrong group. I want to know if it
> possible to emulate Java servlet functionality in C# and .net. What I want
> to do is to be able to do is create a C# program that sits *listens foran
> HTTP request to a specific URL and then access the C# equivalent of the
> HTTPServletRequest object so I can access the request parameters directly..
> I've googled and found out about the WebClient - what I want is the
> converse, something that sits on the webserver.
>
> I'm sure that it must be possible but as a newbie I'm not sure of the
> correct C# & .Net terminology yet to be able to effectively google for what
> I want.
>
> Regards


I think you need ADO.NET -- http://msdn.microsoft.com/en-us/library/aa286484.aspx

 
Reply With Quote
 
 
 
 
Hillbilly
Guest
Posts: n/a
 
      22nd Oct 2008
I can say this, Microsoft has made webcasts and videos to explain how Java
developers can use C# to achive their goals. One site I would check to start
is http://asp.net/ and you can search for various webcasts

// search term
webcasts java site:msdn.microsoft.com

"Gilbert" <(E-Mail Removed)> wrote in message
news:PZGLk.89399$(E-Mail Removed)2...
> Apologies if I'm posting this to the wrong group. I want to know if it
> possible to emulate Java servlet functionality in C# and .net. What I want
> to do is to be able to do is create a C# program that sits listens for an
> HTTP request to a specific URL and then access the C# equivalent of the
> HTTPServletRequest object so I can access the request parameters directly.
> I've googled and found out about the WebClient - what I want is the
> converse, something that sits on the webserver.
>
> I'm sure that it must be possible but as a newbie I'm not sure of the
> correct C# & .Net terminology yet to be able to effectively google for
> what
> I want.
>
> Regards


 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      22nd Oct 2008

I'm not a java to c# expert.

However,....

Check this:
http://msdn.microsoft.com/en-us/library/ms227673.aspx
Custom Http Module

Off the top of my head, that is a "server side" thing that allow me to look
at the incoming request

and then:

WCF allows its coded to be exposed as a WSHttpEndPoint WebService.
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry
Check that, and you'll have to make some changes to get WSHttpEndPoint to
work.





"Gilbert" <(E-Mail Removed)> wrote in message
news:PZGLk.89399$(E-Mail Removed)2...
> Apologies if I'm posting this to the wrong group. I want to know if it
> possible to emulate Java servlet functionality in C# and .net. What I want
> to do is to be able to do is create a C# program that sits listens for an
> HTTP request to a specific URL and then access the C# equivalent of the
> HTTPServletRequest object so I can access the request parameters directly.
> I've googled and found out about the WebClient - what I want is the
> converse, something that sits on the webserver.
>
> I'm sure that it must be possible but as a newbie I'm not sure of the
> correct C# & .Net terminology yet to be able to effectively google for
> what
> I want.
>
> Regards



 
Reply With Quote
 
Ralph
Guest
Posts: n/a
 
      23rd Oct 2008
On Oct 22, 12:08*pm, "sloan" <(E-Mail Removed)> wrote:
> I'm not a java to c# expert.
>
> However,....
>
> Check this:http://msdn.microsoft.com/en-us/library/ms227673.aspx
> Custom Http Module
>
> Off the top of my head, that is a "server side" thing that allow me to look
> at the incoming request
>
> and then:
>
> WCF allows its coded to be exposed as a WSHttpEndPoint WebService.http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry
> Check that, and you'll have to make some changes to get WSHttpEndPoint to
> work.
>
> "Gilbert" <(E-Mail Removed)> wrote in message
>
> news:PZGLk.89399$(E-Mail Removed)2...
>
>
>
> > Apologies if I'm posting this to the wrong group. I want to know if it
> > possible to emulate Java servlet functionality in C# and .net. What I want
> > to do is to be able to do is create a C# program that sits *listens for an
> > HTTP request to a specific URL and then access the C# equivalent of the
> > HTTPServletRequest object so I can access the request parameters directly.
> > I've googled and found out about the WebClient - what I want is the
> > converse, something that sits on the webserver.

>
> > I'm sure that it must be possible but as a newbie I'm not sure of the
> > correct C# & .Net terminology yet to be able to effectively google for
> > what
> > I want.

>
> > Regards- Hide quoted text -

>
> - Show quoted text -


I believe what you need is a custom httpHandler. I believe that would
be the "equivalent" of a servlet in java.

Basically create an .ashx file with a class that implements
IHttpHandler
you need to have a function
public void ProcessRequest (HttpContext context)
{Put your code here}

and the property

public bool IsReusable {
get {
return true;
}
}

 
Reply With Quote
 
Gilbert
Guest
Posts: n/a
 
      24th Oct 2008
>
> I believe what you need is a custom httpHandler. I believe that would
> be the "equivalent" of a servlet in java.
>
> Basically create an .ashx file with a class that implements
> IHttpHandler
> you need to have a function
> public void ProcessRequest (HttpContext context)
> {Put your code here}
>
> and the property
>
> public bool IsReusable {
> get {
> return true;
> }
> }


Thats the puppy! Thanks very much.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie with newbie questions JohnE Microsoft ASP .NET 3 17th Aug 2009 11:10 PM
Real Newbie newbie question Dave Microsoft Excel New Users 1 10th Jan 2007 08:55 PM
Gaming System (newbie help please) Ki9090 General 4 19th Oct 2003 02:19 PM
Newbie ziggy General 3 24th Apr 2003 08:54 PM
Newbie tech Guide page 1nteger Feedback 9 10th Mar 2003 09:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:20 AM.