Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 27, 2011 03:32 AM by jacobambat
Nov 21, 2005 06:44 PM|LINK
Dec 19, 2005 02:52 AM|LINK
Rob, did you figure out how to resolve this?
Having the same problem and have spent 2 frustrating days trying to figure it out. Project runs from within VS.net OK -- because VS is authenticating as [machine]\ASPNET -- but if I try to run as http://localhost/[application] I just get the "Cannot open
user default database..." error. I've created a [machine]\ASPNET user account in SQL Server Express, assigned it to sysadmin role, have set SQL Express to run in mixed-mode, but all to no avail.
Jan 08, 2006 02:45 PM|LINK
Hi, I am just now making the transition from classic ASP to ASP.Net, I must say getting off the ground and running has been an extreme challenge. The help of these forums are great but all of a sudden I am now getting the same
System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user 'SERVER\ASPNET'
Have you figured this out yet? If I do I will let you know.
Jan 08, 2006 10:44 PM|LINK
Verify the SQL connection string in the web.config file. Are you able to connect to the SQL server that is specified there?
You might need Microsoft SQL Server Management Studio Express avalible at http://www.microsoft.com/downloads/details.aspx?FamilyID=82afbd59-57a4-455e-a2d6-1d4c98d40f6e&DisplayLang=en
Jan 09, 2006 03:04 PM|LINK
I was able to fix the problem by setting up user impersonation in the asp.net configuration. I don't know enough yet to know if this is a good thing or not. Is it OK, security wise to allow this setting? Also here is my connection string from my web.config
Jan 23, 2006 08:21 PM|LINK
I had the same use and tried a whole bunch of things, but this is what solved it for me:
- it seems I had the DB still opened inside my IDE (Visual Web Developer Express), in the database explorer. Right-clicking the database and selecting "close connection" fixed it.
Hope this helps.
Feb 06, 2006 03:47 PM|LINK
I have had the same problem and it is really getting frustrating after spending a whole weekend trying to figure it out. Here is what I have done and it's really not a good thing to do, but nothing else works:
I am running Windows XP Pro SP 2 with VS 2005 and SQL Express. I can run the site fine through VS, but when I Publish it to a different folder that my IIS Website is pointing to, I get the same error message when I pull it up in a browser. I am not connected
to a domain, but have the machine setup as a workgroup. The ASPNET id needs access to the folder where the database files are stored. Since I am running the machine as a workgroup, I can't give specific permissions to each user. I put the MACHINENAME\ASPNET
user in the admin group on the machine. I know this is a terrible idea because of security, but it's the only way it will work for me. I think there is some kind of bug in SQL Express and using it under a workgroup instead of a domain, but nobody has actually
figured this one out yet. Hope this helps. Let me know how it goes or if you've come up with another solution.
Feb 07, 2006 01:49 AM|LINK
A couple of things you might want to consider in your environment.
You can get the security tab to work in Windows XP Professional that is installed in a workgroup by changing the following registry key
When security settings are set in Windows XP, the following registry key is used:
The values are:
Changing the value to 0 will give you the security tab in your folders, file properties window.
Also I have noticed sometimes that programs may write to the windows\temp directory, the asp.net user may need rights to this folder on the server machine only. Of course this may not be your case.
Anyway I hope this helps with assigning the user rights in Windows XP Professional.
Feb 27, 2006 08:39 PM|LINK
Apr 03, 2006 08:16 PM|LINK
, u r a life saver.This is also solved the problem