C# Newbie

G

Gilbert

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
 
P

puzzlecracker

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
 
H

Hillbilly

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
 
R

Ralph

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.








- 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;
}
}
 
G

Gilbert

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top