Login failer to my DB using ASP.NET 2.0???

Using Visual Studio 2005 Pro with the accompanying install of SQL Server Express.  I'm running a Visual C# GUI that reads from SQL Server a DB that I also need to be read from a ASP.NET 2.0 app that I'm running in IIS 5.1 my GUI has a user of 'TUDOR\Windows' and works perfectly but when I try to make a connection in my ASP.NET app I get a debug error (see below).  In the design view I can set the sqldatasource, bind it to a datagridview and test my query but if I debug it just doesn't work and the same when I visit the site, just gives the debug error of:

Cannot open database "ATSDB" requested by the login. The login failed.
Login failed for user 'TUDOR\ASPNET'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "ATSDB" requested by the login. The login failed.
Login failed for user 'TUDOR\ASPNET'.

I really know nothing about SQL Server, dbo_owners, security etc what do I need to do to get this going   I really need this to work as I'm running out of time.  The GUI is done and static parts of the site are done too just need to hook up the dynamic bits by Wed morning.  Any help would be much appreciated :)



Answer this question

Login failer to my DB using ASP.NET 2.0???

  • PeterLu

    You need to add rights in the database for the user tudor\aspnet, I suggest starting by giving the app db_reader and db_writer

  • marco1974

    I really know very little about SQL Server. I've only used Access up to recently for small company sites before. How do you do that Do you have a URL that I can follow some steps I've been accessing my DB through the Server Explorer in VS2005 this whole time and can't find any menus that say anything about adding rights to my DB and don't know where else to look
  • Login failer to my DB using ASP.NET 2.0???