I am using a service for database communication using url with a smart hand held device. Here while going to httplistener.start() funcion I am getting an Acess denied exception. how to resolve this issue. here I have logged in as a normal user.My username =NI-PC036, userdomain= User33.
urlExecuter = new UrlExecuter();
eventStop = new ManualResetEvent(false);
MySql.Start();
// HTTP
httpListener = new HttpListener();
httpListener.Prefixes.Add("http://*/");
httpListener.Start();
httpListener.BeginGetContext(new AsyncCallback(HttpListenerCallback), httpListener);
httpListener.BeginGetContext(new AsyncCallback(HttpListenerCallback), httpListener);
cleanupThread = new Thread(delegate()
{
while (!eventStop.WaitOne(5 * 60 * 1000)) // 5Min
{
try
{
if (cleanupTime.AddDays(1) < DateTime.Now)
{
int days = MiscTool.ReadIni<int>("SERVICE", "KEEP", 60);
Cleanup.Execute(days);
cleanupTime = DateTime.Now.Date;
}
}
catch (Exception ex)
{
Program.WriteExceptionLog("cleanupThread", ex);
}
}
});
cleanupThread.Start();
}