Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

C# WebServer Using Sockets

, 23 Jan 2014
How to make a simple web server which supports GZIP compression, applications, and sessions.
bins.zip
bins
BizApplication.dll
ComunicationLayer.dll
Demos.dll
msdn_socketengine.dll
Newtonsoft.Json.dll
root
chat
background.jpg
Script
cornerlefttop.jpg
desk
background.jpg
Script
Server.dll
ServerCommonLibrary.dll
webserver.tester.exe
source.zip
source
source
CommonLibrary
0.ServerCommonLibrary.csproj.user
Properties
ComunicationLayer
Properties
Demos
Demos.csproj.user
lib
Newtonsoft.Json.dll
Properties
Settings.settings
MainBiz
Http
Properties
Settings.settings
Server
Properties
Settings.settings
Services
ServerTester
5.Tester.csproj.user
Properties
Settings.settings
root
chat
background.jpg
Script
cornerlefttop.jpg
desk
background.jpg
Script
SocketEngine
Properties
wb_source-noexe.zip
CommonLibrary
0.ServerCommonLibrary.csproj.user
obj
Debug
Properties
ComunicationLayer
obj
Debug
Properties
Demos
bin
Debug
Demos.csproj.user
lib
obj
Debug
Properties
Settings.settings
MainBiz
bin
Debug
Http
obj
Debug
Properties
Settings.settings
Server
bin
Debug
obj
Debug
Properties
Settings.settings
Services
ServerTester
5.Tester.csproj.user
bin
Debug
obj
x86
Debug
webserver.tester.Properties.Resources.resources
webserver.tester.WebServer.resources
Properties
Settings.settings
root
chat
background.jpg
Script
cornerlefttop.jpg
desk
background.jpg
Script
SocketEngine
obj
Debug
Properties
wb_source.zip
0.ServerCommonLibrary.csproj.user
bin
Debug
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
Release
DesignTimeResolveAssemblyReferencesInput.cache
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
TempPE
bin
Debug
ComunicationLayer.dll
ComunicationLayer.pdb
msdn_socketengine.dll
msdn_socketengine.pdb
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
2.ComunicationLayer.csprojResolveAssemblyReference.cache
ComunicationLayer.dll
ComunicationLayer.pdb
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
BizApplication.dll
BizApplication.pdb
Demos.dll
Demos.pdb
Newtonsoft.Json.dll
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
Demos.csproj.user
Newtonsoft.Json.dll
Demos.csprojResolveAssemblyReference.cache
Demos.dll
Demos.pdb
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Settings.settings
BizApplication.dll
BizApplication.pdb
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
BizApplication.dll
BizApplication.pdb
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Settings.settings
BizApplication.dll
BizApplication.pdb
ComunicationLayer.dll
ComunicationLayer.pdb
Demos.dll
Demos.pdb
msdn_socketengine.dll
msdn_socketengine.pdb
Newtonsoft.Json.dll
Server.dll
Server.pdb
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
4.Server.csprojResolveAssemblyReference.cache
DesignTimeResolveAssemblyReferencesInput.cache
Server.dll
Server.pdb
TempPE
Settings.settings
5.Tester.csproj.user
BizApplication.dll
BizApplication.pdb
ComunicationLayer.dll
ComunicationLayer.pdb
Demos.dll
Demos.pdb
msdn_socketengine.dll
msdn_socketengine.pdb
Newtonsoft.Json.dll
Server.dll
Server.pdb
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
webserver.tester.exe
webserver.tester.pdb
5.Tester.csproj.GenerateResource.Cache
5.Tester.csprojResolveAssemblyReference.cache
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
webserver.tester.exe
webserver.tester.pdb
webserver.tester.Properties.Resources.resources
webserver.tester.WebServer.resources
Settings.settings
background.jpg
cornerlefttop.jpg
background.jpg
bin
Debug
msdn_socketengine.dll
msdn_socketengine.pdb
ServerCommonLibrary.dll
ServerCommonLibrary.pdb
1.SocketEngine.csprojResolveAssemblyReference.cache
DesignTimeResolveAssemblyReferencesInput.cache
msdn_socketengine.dll
msdn_socketengine.pdb
TempPE
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
      <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <section name="Server.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        <section name="Demos.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </sectionGroup>     
    </configSections>
  <applicationSettings>
    <Server.Properties.Settings>
      <setting name="HttpServiceRoot" serializeAs="String">
        <value>root</value>
      </setting>
      <setting name="DefaultPage" serializeAs="String">
        <value>404.html</value>
      </setting>
      <setting name="ApplicationXmlFile" serializeAs="String">
        <value>root\\applications.xml</value>
      </setting>
      <setting name="CurrentDomain" serializeAs="String">
        <value>localhost</value>
      </setting>
    </Server.Properties.Settings>
    <Demos.Properties.Settings>
      <setting name="ChatServerRootDirectory" serializeAs="String">
        <value>root\\chat</value>
      </setting>
      <setting name="DesktopViewerRootDirectory" serializeAs="String">
        <value>root\\desk</value>
      </setting>
    </Demos.Properties.Settings>
  </applicationSettings>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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

About the Author

Alberto Biafelli
Software Developer
Italy Italy
Alberto Biafelli,
Software Developer
Follow on   Twitter   Google+

| Advertise | Privacy | Mobile
Web04 | 2.8.140718.1 | Last Updated 23 Jan 2014
Article Copyright 2012 by Alberto Biafelli
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid