Click here to Skip to main content
16,018,637 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

My ASP.NET application should use the logged-in windows user credentials to access Active Directory. Therefore, no login is required.

I have disabled "Anonymous Access" & enabled "Integrated Windows Authentication" on the web server for my ASP.NET application. My Web.config file has the following entries:

HTML
<authentication mode="Windows" />
<identity impersonate="true"/>


Now when I run the application from within Visual Studio.NET, the application successfully runs after determining the windows user in the code using "User.Identity.Name" & I am able to access the active DirectoryEntry for that User.

However, when I navigate to this new aspx page from an existing ASP page, I am prompted to login to the domain again.

Any help will be greatly appreciated!!! Is urgent for me to solve this problem.

Thanks
Posted
Updated 18-Oct-11 3:18am
v3
Comments
[no name] 18-Oct-11 9:18am    
It may be urgent to you, but to us. This is a volunteer site and people will answer on their time, not yours.

1 solution

"when I navigate to this new aspx page from an existing ASP page" - not quite sure what this means... they are both aspx pages within the same application? What are their URL's?

When you say "run the application from within Visual Studio.NET" what does this mean? Have you run it outside of VS?

Your best bet is to run fiddler when you are running the application. This will enable you to see exactly what is being communicated between the pages.

Windows authentication is best tested outside VS using something like fiddler as this is a more realistic scenario.

Also check that IE is set to automatic logon in intranet zone
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900