none
Consulting on technology for web server RRS feed

  • Question

  • Hi all,

    I am new in developing web servers. I would like to consult with you and get your help on which technology I should use in order to develop a web server in C#.

    The requirements:

    1. The server should support HTTPS.
    2. It should support single client.
    3. It is basically a proxy. Meaning, it will run on Windows server 2012.
    4. It receives requests from web client and run SQL scripts. It should return the results as JSON.
    5. It should support few users including authentications.
    6. It is not required to have scalability. It is is not required to support thousands of request.
    7. It will probably support some APIs (REST). 

    I know there are few technologies IIS web servers, HTTPListeners, etc'. 

    What do you think is the right technology? I'd appreciate if you can also send me links to tutorials so i can judge.

    Thanks in advanced.


    You got the wrong guy, I'm the dude...

    Friday, February 3, 2017 8:14 AM

All replies

  • Hi eyasso,

    In my option, I would suggest you create WCF Rest Service which could be hosted in IIS on Windows Server 2012.

    You could refer the link below for hosting in IIS.
    #RESTful WCF Architecture – Hosting RESTful WCF Services in IIS
    https://blogs.msdn.microsoft.com/alikl/2010/06/06/restful-wcf-architecture-hosting-restful-wcf-services-in-iis/

    For returning JSON, you could try ResponseFormat= WebMessageFormat.Json.

    [ServiceContract]
    public partial class BookmarkService
    {
        ...
        [WebInvoke(Method = "POST", RequestFormat=WebMessageFormat.Json,
            UriTemplate = "users/{username}/bookmarks?format=json")]
        [OperationContract]
        void PostBookmarkAsJson(string username, Bookmark newValue)
        {
            HandlePostBookmark(username, newValue);
        }
        [WebGet(ResponseFormat= WebMessageFormat.Json,
            UriTemplate = "users/{username}/bookmarks/{id}?format=json")]
        [OperationContract]
        Bookmark GetBookmarkAsJson(string username, string id)
        {
            HandleGetBookmark(username, id);
        }
        ...
    }

    IIS supports authentication, you could refer the link below:

    #Security Best Practices for IIS 8
    https://technet.microsoft.com/en-us/library/jj635855(v=ws.11).aspx

    #Authentication Feature Requirements (IIS 7)
    https://technet.microsoft.com/en-us/library/cc755253.aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 6, 2017 1:40 AM