Click here to Skip to main content
15,888,218 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I am able to create a http server using this code project article

Create your own Web Server using C#[^]


Can any 1 have any idea , how to make it secured , like I can only access it via https , Do I need to setup any IIS settings or create the certificates ?

Thanks in Advance
Posted
Comments
Ed Nutting 7-Sep-12 15:19pm    
Just a small amount of research would begin to make you understand what it is you're trying to tackle, how it works and why you really shouldn't create your own certificates... Please research how HTTPS works and how modern web servers use/handle it. Hopefully you then won't need to ask a question on CP unless you hit a specific error. Additionally you could try posting a message on the original article that you linked to asking for guidance on this. This is not really the sort of question that Q&A can answer. Q&A is for specific questions on errors or specific code or for short answer problems. I have no doubt there will be sufficient material on the internet that will answer your question, if you simply search.

Thanks,
Ed
Pro Idiot 7-Sep-12 15:25pm    
I know that , we should not create our own certificate ,
I have already researched on how Https works , I got all the solutions for how to create a https server for a web service/website .
Did not get enough material to make a "web server application using C#" an secured https one.
and yes , I should have asked the question on the article it self, not so familiar with Code project although.
Ed Nutting 7-Sep-12 15:36pm    
Why not take a look at this project: http://webserver.codeplex.com/ which supports HTTPS and is written in C#. Or a very similar way of doing things to the article but less some of the web server stuff can be found in this answer: http://stackoverflow.com/questions/11101784/https-proxy-server-in-c-sharp Simply pull out the relevant bits that add the SSL protocol to the stream you are using and add that into the CP article code. Shouldn't be hard at all. All you are doing is laying the extra SSL protocol on top of HTTP so naturally you just need to add an SSLStream onto your NetworkStream (or StreamReader - whichever the CP article uses...)

Hope this helps,
Ed
Pro Idiot 7-Sep-12 16:03pm    
Thanks for the Links .
I was just looking into the codeplex project !!,
And still get it all working fine for HTTP , cant get it though to work on https,
I appreciate your help and time

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900