By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,708 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,708 IT Pros & Developers. It's quick & easy.

C# Newbie

P: n/a
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
Oct 22 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Oct 22, 10:43*am, Gilbert <Gilbert.Ostelthwa...@nospam.comwrote:
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

Oct 22 '08 #2

P: n/a
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" <Gi******************@nospam.comwrote in message
news:PZ*******************@newsfe29.ams2...
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
Oct 22 '08 #3

P: n/a

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" <Gi******************@nospam.comwrote in message
news:PZ*******************@newsfe29.ams2...
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

Oct 22 '08 #4

P: n/a
On Oct 22, 12:08*pm, "sloan" <sl...@ipass.netwrote:
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" <Gilbert.Ostelthwa...@nospam.comwrote in message

news:PZ*******************@newsfe29.ams2...
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;
}
}

Oct 23 '08 #5

P: n/a
>
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.
Oct 24 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.