Re: Connecting to SQLServer 2000 from ASP.NET
From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 04/24/04
- Next message: John: "Re: Graphic HotSpot ?"
- Previous message: WJ: "Graphic HotSpot ?"
- In reply to: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Next in thread: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Reply: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Reply: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 24 Apr 2004 02:59:47 GMT
Hi Patrick,
First, glad that your critical problem has been resolved. As for the
connecting to sqlserver problem,
have you ever tried the suggestions in my last reply? As I've mentioned,
when you want to provide some powerful permisssions(a powerful account )
when accessing some serverside resource, you can just use impersonate
rather than changing anything in the machine.config.
You can both
1) the user account from the client(passed by iis)
2) specified a fix accoun in the <identity ..> element for asp.net to use
when accessing serverside resources.
<identity impersonate="true" userName="MyDomain\aspUser1"
password="password"/>
#note in your web.config, not machine.config, machine.config is the setting
for all the web applicatoin on the machine, and can be override in each web
app' web.config file.
when we set <identity impersonate="true" ...> if we specify a user account
after it, then the asp.net will use this account to access serverside
resources . If not specified, it will use the account passed from IIS(the
client account)
3) Also, we can use code to programmatically impersnate the current
thread's security context. I strongly recommend that you have a look at the
following tech article which may provide some clues.
#INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/?id=306158
Also, the following refrences will help you understand the impersonating
and the ASP.NET's authentication mechnism.
#ASP.NET Impersonation
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaspnetimpersonatio
n.asp?frame=true
#Using IIS Authentication With ASP.NET Impersonation
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconusingiisauthentica
tionwithaspnetimpersonation.asp?frame=true
Good Luck. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
- Next message: John: "Re: Graphic HotSpot ?"
- Previous message: WJ: "Graphic HotSpot ?"
- In reply to: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Next in thread: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Reply: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Reply: Patrick: "Re: Connecting to SQLServer 2000 from ASP.NET"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|