 |
| ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 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
|
|
|
|

February 14th, 2007, 06:29 PM
|
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Funky - Login Failed for user 'Domain\UserId' erro
I am using VS 2005, Visual Source Safe, IIS 5.1, SQL Server 7 for sample web application.
IIS and SQL Svr resides on Win2K server over network.
I added user MachineName\ASPNET in SQL Server with public, db_datareader, db_datawriter privileges. In addition I gave Select, Insert, Update,Delete privileges on tables and Execute permission on procedures it suppose to use.
connection string is in webconfig file
server=11.11.11.11;database=MyDBName;Integrated Security=True;
Web App works fine from VS IDE. I published on IIS server, it works fine. Another programmer shares my same code thru VSS. He belongs to different domain in network.
When he run using VS IDE he gets error
Cannot open database requested in login 'MyDBName'. Login fails. Login failed for user 'DomainName\HisUserID'
When he runs the published site on the IIS server, he does not get any error!!
So he gets error whenever he runs using IDE!!
Do I need to give db_datareader, db_datawriter privileges to ASPNET account? Permission to specified tables and procedures aren't sufficient?
Imar, I do have your excellent document on which account is used under IIS.
Thanks in advance.
KD
|
|

February 21st, 2007, 01:15 PM
|
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
I have thru yours excellent document. I think you should add more detail on VS2005 IDE web server cassini.
In my case, developer machine is in Domain1 and our dev server (hosting IIS and SQL server) is in another domain. My machine and other developer's machine is in SAME domain.
I verified user in sql server. Only difference in you steps and mine is that I created the user MachineName\ASPNET directly under the database I am using. Your document ask to create user in SQL server instance first with 'windows login' and default 'master' database. In next step, create the same user under the database that is being used and give db_datareader, db_datawriter role. The MachineName\ASPNET account I created in my database has public, db_datareader, db_datawriter role and SELECT, INSERT, UPDATE, DELETE permission on the tables plus EXECUTE permission on necessary procedures.
I verified on sql server that TCPIP and NamedPipe are enabled using SQL Network utility.
Still I do not get any error but other developer get error when he runs the same code from VS 2005 IDE!!
Any help?
KD
|
|

February 24th, 2007, 11:02 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Sorry I missed this post earlier.
Anyway, I don't really understand you. Is your database somewhere else in a different domain? If that's the case, you can't use integrated security directly. You could either create a trust between the domains, or use SQL Server authentication.
Regarding cassini: there isn't much to add. With cassini, your own local account (Machine\YourUserName is used. From there, everything is the same as with other accounts.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Not Enuff Love by Faithless (Track 2 from the album: Outrospective) What's This?
|
|

February 26th, 2007, 01:18 PM
|
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
SQL Server reside on machine in different domain.
I checked with my network administrator.
There is trust relation between two domains.
Kd
|
|

February 26th, 2007, 01:38 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
This may be an issue where the other account isn't propagated from the original work station to the web server to the database server.
You may need to enable kerberos authentication, although for me it's hard to tell if you really need that as I don't know the exact details of your network and setup.
Search Google for kerberos and hop and see if that brings up anything useful for you.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|
 |