Write a web server? 
Author Message
 Write a web server?

I want to write a web server that has security.  A user would login and
be able to view secure HTTP pages.  Using ASP.NET would be too easy and
I'd like it to stand alone without ASP.  Can anyone point me to an
example of this?

Threading would be needed to handle multiple users.

Are these the classes I should use?
  + System.Threading
  + System.Net.Sockets
  + WebRequest and WebResponse Classes

Thanks for your help.



Mon, 01 Nov 2004 01:04:20 GMT  
 Write a web server?
WebRequest and WebResponse are classes used by web client
applications to request info from and receive a response
from a web server.

What you propose is to create a web server and not use
ASP.NET

My question to you is (and this should be seen as in
capital letters in bold face 20 feet high etched in neon)
WHY?

My only thought on this subject is that maybe you're using
the word "web server" when you mean "tcp server".  A Web
server has a serious volume of protocols it must comply
with to be a valid web server, and even more for HTTPS
support.  Look up the RFC's on HTTP and HTTPS for starters.

Quote:
>-----Original Message-----
>I want to write a web server that has security.  A user
would login and
>be able to view secure HTTP pages.  Using ASP.NET would
be too easy and
>I'd like it to stand alone without ASP.  Can anyone point
me to an
>example of this?

>Threading would be needed to handle multiple users.

>Are these the classes I should use?
>  + System.Threading
>  + System.Net.Sockets
>  + WebRequest and WebResponse Classes

>Thanks for your help.
>.



Mon, 01 Nov 2004 01:47:43 GMT  
 Write a web server?
Quote:

> WebRequest and WebResponse are classes used by web client
> applications to request info from and receive a response
> from a web server.

> What you propose is to create a web server and not use
> ASP.NET

> My question to you is (and this should be seen as in
> capital letters in bold face 20 feet high etched in neon)
> WHY?

> My only thought on this subject is that maybe you're using
> the word "web server" when you mean "tcp server".  A Web
> server has a serious volume of protocols it must comply
> with to be a valid web server, and even more for HTTPS
> support.  Look up the RFC's on HTTP and HTTPS for starters.

===============================================================

I could use IIS but I want it to be a standalone app.  It's usage would
be very specific so it doesn't need to do much, no need for scripting or
anything fancy.  It does not need to be a general purpose -- good for
many things -- type web server.

Basically I want it to accept a login then show html files allowed for
this one user.  At the same time it should deny access to html files not
allowed for this user, so maybe it would be easier to use IIS.  I'm
trying to keep it simple for the administrator.

This same machine might also be running another web server so I was
going to use a different port.  If IIS could handle two servers on two
different ports then this would be okay.



Mon, 01 Nov 2004 03:57:22 GMT  
 Write a web server?
Look at Tomcat from Apache.org ... it's in Java but very similar to C# of
course. It's open source under the Apache license.

Peace,

--
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/
.NET to J2EE porting service available


Quote:
> I want to write a web server that has security.  A user would login and
> be able to view secure HTTP pages.  Using ASP.NET would be too easy and
> I'd like it to stand alone without ASP.  Can anyone point me to an
> example of this?

> Threading would be needed to handle multiple users.

> Are these the classes I should use?
>   + System.Threading
>   + System.Net.Sockets
>   + WebRequest and WebResponse Classes

> Thanks for your help.



Tue, 02 Nov 2004 04:48:19 GMT  
 Write a web server?
IIS can handle multiple ports.  So if you were to put on server on 80
and then another one on 8080 you should be fine.
Quote:


> > WebRequest and WebResponse are classes used by web client
> > applications to request info from and receive a response
> > from a web server.

> > What you propose is to create a web server and not use
> > ASP.NET

> > My question to you is (and this should be seen as in
> > capital letters in bold face 20 feet high etched in neon)
> > WHY?

> > My only thought on this subject is that maybe you're using
> > the word "web server" when you mean "tcp server".  A Web
> > server has a serious volume of protocols it must comply
> > with to be a valid web server, and even more for HTTPS
> > support.  Look up the RFC's on HTTP and HTTPS for starters.

> ===============================================================

> I could use IIS but I want it to be a standalone app.  It's usage would
> be very specific so it doesn't need to do much, no need for scripting or
> anything fancy.  It does not need to be a general purpose -- good for
> many things -- type web server.

> Basically I want it to accept a login then show html files allowed for
> this one user.  At the same time it should deny access to html files not
> allowed for this user, so maybe it would be easier to use IIS.  I'm
> trying to keep it simple for the administrator.

> This same machine might also be running another web server so I was
> going to use a different port.  If IIS could handle two servers on two
> different ports then this would be okay.



Wed, 03 Nov 2004 02:07:33 GMT  
 Write a web server?
I'm also trying to find/create a web server so that I dont need IIS.  Why?
Because I'm building a P2P application that communicates via http on end
users machines.  It would only need to support http 1.1, or just support the
parsing of http headers.

Is there a way to convert an incoming stream (NetworkStream, Socket.Read)
into a http request?  HttpWebRequest seems to support only outgoing
requests.

Louis


Quote:
> IIS can handle multiple ports.  So if you were to put on server on 80
> and then another one on 8080 you should be fine.




Quote:

> > > WebRequest and WebResponse are classes used by web client
> > > applications to request info from and receive a response
> > > from a web server.

> > > What you propose is to create a web server and not use
> > > ASP.NET

> > > My question to you is (and this should be seen as in
> > > capital letters in bold face 20 feet high etched in neon)
> > > WHY?

> > > My only thought on this subject is that maybe you're using
> > > the word "web server" when you mean "tcp server".  A Web
> > > server has a serious volume of protocols it must comply
> > > with to be a valid web server, and even more for HTTPS
> > > support.  Look up the RFC's on HTTP and HTTPS for starters.

> > ===============================================================

> > I could use IIS but I want it to be a standalone app.  It's usage would
> > be very specific so it doesn't need to do much, no need for scripting or
> > anything fancy.  It does not need to be a general purpose -- good for
> > many things -- type web server.

> > Basically I want it to accept a login then show html files allowed for
> > this one user.  At the same time it should deny access to html files not
> > allowed for this user, so maybe it would be easier to use IIS.  I'm
> > trying to keep it simple for the administrator.

> > This same machine might also be running another web server so I was
> > going to use a different port.  If IIS could handle two servers on two
> > different ports then this would be okay.



Thu, 04 Nov 2004 19:13:56 GMT  
 Write a web server?

Quote:
> Is there a way to convert an incoming stream (NetworkStream,
> Socket.Read into a http request?  HttpWebRequest seems to
> support only outgoing requests.

Sure ... that's all that IIS or Apache does.

If I were you, I'd look at the Apache Tomcat project. It's in Java, but if
you can read C# then you can read Java. Most of the io and network libs are
close to identical. Also look for "First .NET Web Server" at
http://www.sampullara.com.

Peace,

--
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/
.NET to J2EE porting service available




Fri, 05 Nov 2004 00:02:10 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Writing a web server

2. Writing to Files on the Web Server

3. Access C/C++ Newsgroups via the web - Free Web based News server

4. ATL Server - Web Application/Web Service

5. Windows CE Web Server: Using Web Tools to Monitor and Manage Embedded Devices

6. Web Service with existing web server

7. Server Extensions and FrontPage Personal Web Server

8. Using an ATL Server Web Service on a Web server that is sitting on a port other than port 80.

9. Web References on Local Server?

10. Debugging ATL Server Web Services from unmanaged C++ client

11. Web Services server machine name?

12. ATL Server Web Service problem with C# client

 

 
Powered by phpBB® Forum Software