Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 I need help giving asp permissions in sql2005 exp.

Author  Topic 

Cwm
Starting Member

39 Posts

Posted - 2008-12-18 : 16:54:27
Hi all,
I am having trouble giving aspnet permissions in sql. I keep getting this error..
login failed for servername\aspnet

So i opened up ssmexpress and opened the security folder and added a new login (myservername)\aspnet
and gave it all permissions, but when i try to add any data from the webapp i get the error that i have shown.
I have googled the error message and haven't gotten any real solutions.

So how do i go about doing this? is there a stored procedure that i can use to do this or what am i doing wrong.


Thanks
Chris

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-18 : 16:55:50
Post your connection string.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Cwm
Starting Member

39 Posts

Posted - 2008-12-18 : 18:57:07
This is the one i use in code behind
private static string cnStr = @"Data Source=HML-EOF-HMI-C02\SQLEXPRESS;Initial Catalog=EOFLOADOUT;User ID=sa; Password=loadout";
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-18 : 19:02:55
Are you sure that's your connection string as the error is indicating you are trying to use a trusted connection, yet your connection string is using sql authentication?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Cwm
Starting Member

39 Posts

Posted - 2008-12-18 : 19:11:06
you have me a little confused.

i have sql server management express set up as windows and sql authentication. That connection string is what i would use to manipulate the data..
on my laptop for my own databases on ( my laptop ) i use this connection string
private static string cnStr = @"Data Source=.\SQLEXPRESS;Initial Catalog=HMILOADOUT;Integrated Security = SSPI";
on my laptop i have windows authentication.

at work i also have tried using windows authentication, but still get the error about login failed for HML-EOF-HMI-C02\ASPNET


Chris
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-18 : 19:25:37
The fact that you are getting that error and your connection string shows you are attempting to use sql authentication means that your connection string isn't being used. The error indicates that you are attempting to use Windows authentication, otherwise it would mention a sql account.

Perhaps there's some place in a config file that you need to make a modification to. I'm not sure though as I'm not a developer. It is a config issue though outside of SQL Server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Cwm
Starting Member

39 Posts

Posted - 2008-12-18 : 19:36:18
Hi,
I'm doing alot more searching and finally finding more and more info about this issue. It has become apparent that its not sql that is the issue its my config file.

Thanks for your replies

Chris
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-18 : 19:48:07
You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -