Linux serverlinux web serverNETWORK ADMINISTRATIONS

Create a Simple HTTP Server | Visual C#.NET

#SnatchDreams #Windows #VisualStudio #CSharp

In this video we will see how do we create or code a simple HTTP Server using Visual C#.NET. It’s a very basic one and its purpose is to demonstrate the working of HTTP Server and how to process basic HTTP Request and how provide a simple HTML Response to the browser.

Will come up the next part next week 🥰 Thank You

Project Source Code: 👩🏻‍💻 🧑🏻‍💻
https://github.com/paulpjoby/Simple-HTTP-Server-Using-Visual-C-Sharp

Buy me a coffee:
https://imjo.in/bSQUvk
https://www.paypal.me/paulpjoby

How HTTP Server Works:

Create Simple File Manager using C#.NET

Create Simple File Manager using VB.NET

Hope you guys enjoyed the video
Thanks for Watching
SnatchDreams
It’s Insane Here 🥳😍

source by SnatchDreams

linux http server

19 thoughts on “Create a Simple HTTP Server | Visual C#.NET

  • Hello, How can we do external html page instead of within the application html?

  • Great video I had to use the slower playback speed to keep up lol 🙂 keep up the good work

  • When comes the next episode? That will be very nice. Thx a lot

  • Nice Project THX a lot. It make me little creapy under vb .net because the headerinfo are diffrent. Thx a lot debugger. I figure out what the problem. I got diffrent Response without rn instead vbcrlf. This must be changed: " If (data.IndexOf(vbCrLf) > -1) Then Exit While End If" and this " Dim resHeader As String = "HTTP/1.1 200 Everything is Fine" & vbCrLf & "Server: my_vb_server" & vbCrLf & "Content-Type: text/html; charset: UTF-8" & vbCrLf & vbCrLf". After that all works fine. 👌👌✔✔

  • You do cool stuff!
    I'm trying to connect css and html files to your server.
    Please tell me how to do it?

  • I am having almost the same problem, as Jercy Justice (in the comment section). After random amout of time or requests, it stops receiving or sending any info. No errors. Any ideas, how to fix? The code is almost identical.

  • The server keeps crashing and i dont know why. I have the same problem with c# and VB.NET.
    If you open up firefox and try spamming requests it can crash after the first attempt or after 1000 – pretty random when it happens. Not really sure how to fix it. Any Idea? I think the issue lies somewhere at this part of the code:
    // Reading the inbound connection data
    while (true)
    {
    int numBytes = client.Receive(bytes);
    data += Encoding.ASCII.GetString(bytes, 0, numBytes);

    if (data.IndexOf("rn") > -1)
    break;
    }

  • Thank you for this! A simple, to the point example that is easy to follow and understand.

  • I'm having an issue, where it doesn't show any logs when I open a browser and enter a url… It says "Server Started" but nothing more.. so it doesn't run the ConnectionThreadMethod… any reason as to why this may be the case?

  • Sir how can we create this server using url parameters and how can we get the browser requested url parameters and show that in the popup

  • how to check if I'm already run the server without disabled the button?

  • Hi, i followed this tutorial and it worked perfectly, the problem is that when i tried to use another port, i can't open the website in my browser, do you have any idea why this could happened?? thanks!

Comments are closed.