Main Site Documentation

Project - HTTP Server using Dynamic Html Pages


#1

HTTP Server using Dynamic Html Pages

This project deals with using an Http server that enable interacting with the user, by providing several input fields type such as checkbox, input, button…

The purpose is to provide a logic that is near from the way of developing with ASP.
=> an html file containing the fields view and javascript for presentation,
=> a codebehind file that make all the stuf around the get and put of the html page rendering,
=> some abstract classes that will facilitate the adding of other pages, by providing standard methods to be replicated to your needs…

In this sample, I added an IPConfiguration logic that will enable the user to retrieve and apply the device IP configuration directly by the embedded HTTP server, without the need to use MF Deploy or hardcode anything on the program level !

I personally use a G120HDR with an ENC28, but it will be very easy to port to another board and PHY as well…


#2

I’ve posted a video so to make anyone see how rendering can be improved using CSS, and some decorator such as a reboot waiting message, and en authentication request…


#3

Much better in the video :wink:


#4

Thanks Architect !


#5

Thanks


#6

Hi Louis, can you tell me how you did the authentication? I’m building a config-front end for my custom board (g120) and need to implement some kind of security.

Thanks.


#7

@ Patrick -

Hi Patrick, Happy new Year, and very good question :clap:

In fact, Windows Authentication is managed by a pragma tag to put in the Http response Header of each page you need to secure…

You will have to play both with :

  • HttpListnerRequest.Credentials to get the login and password entered by the user,
  • HttpListenerresponse.Headers.Add(“WWW-Authenticate: Basic realm=“YOUR SECURED AREA NAME””) to add on each page the has to be in the secured area,

Hope this will help you. Do not hesitate to say if you need more détails on that point…