Wrox Programmer Forums
|
Internet Information Services Limit this to IIS questions and posts. ASP/ASP.NET questions should still go in the ASP/ASP.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Internet Information Services 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
  #1 (permalink)  
Old August 7th, 2007, 02:42 AM
Registered User
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Windows Authentication problems

Hi Everyone

I changed the authentication mode into Windows from SQL Server Authentication of my application(Web application - ASP.NET 1.1, SQL Server 2000, C#). I changed the SqlServer into Windows only mode authentication.

The SQL server now contains all the windows users as users (Logins as well as Users) in the particular application's database.

But I faced the problem of 'login failed for NT Authority\Network Service'. So I added the Network Service as user. The login problem is disappeared, but when I'm tracing through the SQL Profiler I can see only the Network Service as user and not my windows username\SQL server login name of my own.

what can I do for displaying the windows username in the profiler too. Please help me. I'm very much thankful to you if you do so.

Thanks in advance

Fraijo

Reply With Quote
  #2 (permalink)  
Old August 7th, 2007, 07:09 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You need to read about Impersonation through ASP.NET! The long and the short of it is, you will need to add this to your web.config:

<identity impersonate="true"/>

And the MSDN Article to explain WHY you need to do that:
http://msdn2.microsoft.com/en-us/library/xh507fc5(VS.71).aspx

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Authentication OrbitalThread .NET Framework 2.0 0 December 5th, 2006 01:57 PM
windows Authentication zee_ahmed2002 Classic ASP Basics 1 August 15th, 2004 08:27 AM





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