cannot connect to database, login failed RRS feed

  • Question

  • User120353699 posted

    Hi all.


    I recently upgraded a WinXP machine that had been running VWD 2005 to a Win7 machine using VS 2010.  The application targets .Net 2.0, but since the upgrade, I cannot get VS to connect to my database and this is the first time I've tried working on the site since upgrading, so no changes have been made to any code (with the exception of trying to change my connection string so I can connect).  The specific error is:

    Cannot open database requested in login 'dbName'. Login fails. Login failed for user 'SqlLogin'

    The sql database is on another machine and I was assigned the login/password; I know the login works because I can connect to it with SQL Server Management Studio.  Having read several posts and still having trouble, I tried to do a couple things.  First I modified my web.config connection string, which looks like this:

    <add name="ConnectionString" connectionString="Data Source=server1;Initial Catalog=db1;Persist Security Info=True;User ID=userid;Password=pwd; providerName="System.Data.SqlClient"/>


    When that did not work, I deleted the connection string from the web config and dragged a sqldatasource control onto a page and tried to use the connection string builder while in design mode.  Then the error I got was:

    The database db1 does not exist or you do not have permission to see it.  Would you like to attempt to create it?


    I'm not sure I understand that there is a problem at all, except that I upgraded the OS/IDE.  I'm using IIS 7.5 on my local machine to serve the development site while connecting to the development sql server on the other machine.  Since I can't use the IIS aspnet account on the remote sql server and my assigned login is verfied working through sql management studio, what else can I do to get my developement site working again? 

    Thanks for the forums and help!



    Friday, August 20, 2010 12:55 PM


All replies