already did that, i already stated that its set to windows authentication.
Main Topics
Browse All TopicsThe webpage is being made in visual studio.net 2005, in C#.net and asp.net 2.0 with a MySql Database
I am building a intranet website and need to use windows integrated authentication for it. The authentication works fine when i test it locally but if i try to run the site on my comp from the web server. it just says "you are not authorized"
It also works fine if i browse the site on the IIS on the web server. So im guessing it is just not accessing the AD when i try to reach the webpage from my computer.
Any help be great!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi,
what you are doing there is allowing the application to impersonate the defined user when accessing the filesystem. You still need to grant access to IIS in general. Enable anonymous access if you want all users to be able to connect, or else enable windows or basic auth and connect as a user with appropriate rights to the IIS filesystem.
Cheers.
Hi,
I mean to say that whatever user accesses the web site must also have the required permissions. Just setting the application to impersonate some other user will not generally allow an unauthorised user access to the web site.
If you use windows auth, then the remote user must be logged on to the domain with credentials that have access to the web site.
Check the IIS web site log file to discover what user is being denied access.
also:
>> it just says "you are not authorized"
there is always additional detail provided - transpose it here for further comment if you need it.
Cheers.
This line in your config file is going to be problematic:
<identity impersonate="true" userName="Domain/XXXX" password="XXXXX"/>
This tells the Framework that it is to impersonate this user no matter who is actually accessing the application. If that user has access based on the Roles you are using then everything is fine, otherwise everyone will be denied access.
Try changing it to simply:
<identity impersonate="true"/>
Let us know what you find.
Dave Dietz
Ya the user has access based on roles.
Here is the addtional info:
You are not authorized to view this page
You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
--------------------------
Please try the following:
Contact the Web site administrator if you believe you should be able to view this directory or page.
Click the Refresh button to try again with different credentials.
HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration.
Internet Information Services (IIS)
--------------------------
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the words HTTP and 401.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled About Security, Authentication, and About Custom Error Messages.
I thought i configured it, but sounds like i may have done it wrong.
1. - on IIS web server where you run your website set only Integrated Windows authentication (Riht Click od Web - Properties - Directory Security - Edit)
2. - <authentication mode="Windows"/>
3. - !!! add your website to IE Local intranet (Tools - Internet Options - Security - Local intranet - Click on Sites button - Check Automatically detect ..... - Click Advanced button - write your website (for example http://site.mydomain.com or http://www.mydomain.com, check if you us HTTPs - click Add button and close). You can do it throught GP in AD for all users.
Now if users go to your web site, IE use user logon account and authorized your user. In Firefox or Opera must users write logon name and password to the logon box.
sorry for the long response time, i did all the steps and still getting.
You are not authorized to view this page
You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
--------------------------
Please try the following:
Contact the Web site administrator if you believe you should be able to view this directory or page.
Click the Refresh button to try again with different credentials.
HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration.
Internet Information Services (IIS)
--------------------------
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the words HTTP and 401.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled About Security, Authentication, and About Custom Error Messages.
Business Accounts
Answer for Membership
by: peralesaPosted on 2009-07-09 at 14:38:53ID: 24818608
Set IIS where you website sits, to Windows Authentication, uncheck Anonymous.