R
Reg
Hello All!
I have a small Console based Application which acts like Http server.
HttpListener is used for Http requests and responses.
Now I would like to use Digest Authentication and I made a IHttpModule based
assembly to handle authentication. Problem is that IHttpModeule based
assembly is configured into web.config but I don't know how HttpListener can
read App.Config to get information considering Digest Authentication module.
How that can be done? Or are there any other ways to implement Digest
Authentication to Console Apps using HttpListener?
Code in Console App is below:
// Create a listener and add the prefixes.
System.Net.HttpListener listener = new System.Net.HttpListener();
foreach (string s in prefixes)
{
listener.Prefixes.Add(s);
}
// Digest Authentication selected
listener.AuthenticationSchemes = AuthenticationSchemes.Digest;
// How to read configuration information from Web.Config file???
try
{
// Start the listener to begin listening for requests.
listener.Start();
Thanks!
I have a small Console based Application which acts like Http server.
HttpListener is used for Http requests and responses.
Now I would like to use Digest Authentication and I made a IHttpModule based
assembly to handle authentication. Problem is that IHttpModeule based
assembly is configured into web.config but I don't know how HttpListener can
read App.Config to get information considering Digest Authentication module.
How that can be done? Or are there any other ways to implement Digest
Authentication to Console Apps using HttpListener?
Code in Console App is below:
// Create a listener and add the prefixes.
System.Net.HttpListener listener = new System.Net.HttpListener();
foreach (string s in prefixes)
{
listener.Prefixes.Add(s);
}
// Digest Authentication selected
listener.AuthenticationSchemes = AuthenticationSchemes.Digest;
// How to read configuration information from Web.Config file???
try
{
// Start the listener to begin listening for requests.
listener.Start();
Thanks!