Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 21st, 2014, 09:35 AM
Registered User
 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to impersonate Windows Authentication in Web.config file

Hi,

My current code is as below:

<system.web>
<authentication mode="Windows" />
<identity impersonate="true" userName="user_name" password="pwd" />
</system.web>


If I remove the identity element, UI does't populate data. My requirement is to use windows authentication instead of hard coded user name.
Can you please suggest how can I replace userName="user_name" password="pwd" with logged in windows user?

Thanks,
Sandeep
 
Old February 5th, 2014, 08:39 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

you have part of it
Code:
 <system.web>
     <authentication mode="Windows" />
     <authorization>
        <deny users="?" />
        <allow users="*"/>
     </authorization>
   </system.web>
authorization node denys anonymous while allowing all authenicated users.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Authentication in Web.Config Janag ASP.NET 1.x and 2.0 Application Design 1 February 5th, 2014 08:42 PM
web.config file apry BOOK: Beginning ASP.NET 1.0 1 May 27th, 2004 06:39 AM
Web Service & Integrated Windows Authentication TiongLip ASP.NET 1.0 and 1.1 Professional 0 September 17th, 2003 01:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.