I want to use my web page on localhost.
But I get an error: not authorized to view page.
In IIS i put authentication mode to Windows, but it doesn't work.
Is there anything else I should do?
are you logged into a domain? i use this all the time at work without an issue. you may also want to raise this question in forum41. they would have more insight to the administration side of IIS.
HrvojeVd, I was able to duplicate the null user error you are experiencing. here is my scenario:
windows authentication in web.config and IIS
impersonating user
I have a timer event that begins at application start. within this event I call the database
this is where the problem exists. impersonation applies to the HTTP context. But the timer doesn't run on an HTTP request. therefore I cannot use the user account to log into the database. The timer is running independent of any user account.
the same is true with other points in the asp.net pipeline: starting session, application start, application end (and there may be more). If you are trying to connect to the database at any one of these points you will get the null user error.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.