473,387 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C# Newbie

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
5 3838
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
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

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
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
>
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Philippe C. Martin | last post by:
Hi, Is there a program out there that would generate the C code to instantiate objects and call them: ex: miracle.exe -i mymodule.py -o module_internface.c ? I seem to recall a _yes_ to...
0
by: Twayne | last post by:
Twayne wrote: That's the verification I was looking for I think. There are times that doesn't seem to be so, but perhaps I'll looking at the wrong side of the tree in the wrong forest ... I...
5
by: Banibrata Dutta | last post by:
Hi, I've gone through the list of "language differences" between 2.3 / 2.4 & 2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of CPython, and I consider myself still very very...
16
by: Raxit | last post by:
Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? what can i do easily with python which is not easy...
10
by: Peter Michaux | last post by:
On May 14, 8:55 pm, Prisoner at War <prisoner_at_...@yahoo.comwrote: Get it from the library. I cannot imagine needing to own an HTML book. There are plenty of good references on the web....
2
by: r_ahimsa_m | last post by:
Could you recommend me some free JavaScript validator? I was using JSlint but it reports nonsense errors. Please help. Thanks. /RAM/
6
by: raylopez99 | last post by:
Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? Subject: Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? My...
3
Lokean
by: Lokean | last post by:
Sorry for this newbie question, this is not my realm of expertese. I have searched google, tried several applications that claim they can do this, such as Mapforce, which I found confusing, to...
5
by: Dave | last post by:
I am new to Visual Web Developer 2005 Expres. I am using absolute positioning and every time I add a button control to my web form its width extends all the way to the edge of the page. IOW I...
5
by: SharkD | last post by:
Hi! I'm a total newbie when it comes to ASP (or any type of server-side programming). I want to start a project that does the following: 1. query Wikipedia for information regarding...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.