Wednesday, March 21, 2012

Problem Opening Databases In ASP.NET

I Have A Problem With Opening A Database With "SQLOLEDB" Provider In Web Application Projects!
The Same Database Opens In Windows Application Projects But When I Try TO Open It (Manually Or During A DataAdapter.Fill Method) In Web APPS I Get An Error Message : "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'."
I Use Windows NT Authentication In Connections,
I Have SQL Server 2000 Enterprise Edition (With Default Installation) , Windows .Net Server 2003 Enterprise Edition (IIS 6) , And VS.NET 2003 Enterprise Edition (.Net Framework 1.1)
Can Anyone Tell Me What's Wrong?You need to give the ASPNET user (or the user under which the worker process is running) the appropriate rights to your database.|||Thanks For Your Advice
I Solved That Problem By Adding A New User And Settting Permissions For It
By The Way , IT Came To My Mind That I Can Use ASPNET Account , But I Don't Know The Password , It Is'nt Blank And I Did'nt Set It Myself , n I Don't Know If I Change The Password Using Computer Management / Local Users , Would Be Anything Affected?
OR ASPNET Account Is Only For This Particular Use?


Note from moderator SomeNewKid:
Please refrain from capitalizing every word. Not only does it make your post hard to read,
it also means we cannot distinguish Class names and members.|||Typically, the ASPNET user has a system generated account and is local to the machine that the website is on. At work, we use a domain-level account for our web farm and that user then has rights to our app server tier for our file share for uploading/downloading files.

I was thinking of giving your ASPNET windows user rights to the database and using integrated security...

Your database user configuration is more portable and should work just as well.

No comments:

Post a Comment