|
-
Oct 22nd, 2002, 06:43 AM
#1
Thread Starter
Member
-
Oct 22nd, 2002, 06:58 AM
#2
Have you checked the Users for your database?
-
Oct 22nd, 2002, 10:00 AM
#3
Junior Member
I am experiencing the same exact problem.
I am reading the Karl Moore book, and I am currently on page 202 going over SQL transactions. I got to the first part where you can test the find users feature, and I keep getting an error. I think there is a problem with my SQL configuration. The error message is :
Cannot open database requested in login 'KeepFit'. Login fails. Login failed for user 'JBECKSERVER\ASPNET'.
I am not sure where I can set logins. I did try OSQL and I added a login and password. When I try using this instead of a trusted connection I get the following error message:
Login failed for user 'ASPNET'. Reason: Not associated with a trusted SQL Server connection.
Any help from the master would be greatly appreciated.
Thanks,
Jay
-
Oct 23rd, 2002, 04:00 AM
#4
Thread Starter
Member
-
Oct 23rd, 2002, 09:22 AM
#5
Yes trusted_connection has to be in place. ASPNET account has to exist in windows. So the connection string has to be something like this:
server=COCLAP-9\NETSDK;database=KeepFit;trusted_connection=yes
-
Oct 23rd, 2002, 09:29 AM
#6
Thread Starter
Member
It's working
Hey Guys,
I got my DB to work by changing ASPNET from a Debugger to an Administrator. Administators have complete and unrestricted access to the PC or Domain
Change it in the Users and Passwords in Control Panel. You have to reboot and then it's away. Kuwel
-
Oct 23rd, 2002, 04:29 PM
#7
Hyperactive Member
Well giving administrator rights to ASPNET user is not the best solution.
You need to give the ASPNET windows account rights to access the database.
When you install the NETSDK databse it has scripts that installs databases and also gives rights to the "guest" to access them.
This should be sufficient. To do this execute the following:-
use databasename
EXEC sp_adduser 'guest'
If you have problems running this then perhaps give the ASPNET user administrator rights to do it and then put it back to user.
-
Oct 23rd, 2002, 08:26 PM
#8
Lively Member
If you use Windows Integrated Security in IIS (or Basic Auth.) you could also set impersonation=true in web.config and enable the specific windows account access to sql.
-
Oct 25th, 2002, 04:04 AM
#9
Thread Starter
Member
Hhmm, that sounds interesting. I'll have play over this weekend.
shpadoinkal did you do this? Have you sorted your problem, if so how did you do it?
Thanks for input
-
Oct 25th, 2002, 05:18 AM
#10
Thread Starter
Member
-
Oct 25th, 2002, 02:18 PM
#11
Hyperactive Member
The commands I gave you are sql server commands. Nothing to do with windows.
I am talking about giving rights to the windows user ASPNET to sql server. This is done IN sql server.
-
Oct 28th, 2002, 05:38 AM
#12
Thread Starter
Member
Aahh! I'm using the NETSDK version of SQL Server. I understand it is fully functional but a cut down version for VS.NET. So, all my work is done within the VS.NET environment. So, how do I issue these commands from VB.NET? 
Or should I go for the Web Config idea, impersonation=true ?
Thanks for your time
-
Oct 28th, 2002, 08:25 PM
#13
Hyperactive Member
If you have no standard way of issuing commands to sql server then try the impersonate=true method
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|