Thursday, February 9, 2012

"Cannot Open Database" problem when copy project to IIS

Hi all.

I use VWD 2005 Express with SQL Server 2005 Express as a database.

I copy my project to IIS and try to run it at the IIS Web Server.

I already amended the connection string at web.config file as below:

<connectionStrings> <add name="GeekSpeakConnectionString" connectionString="Data Source=SEN-M09\SQLEXPRESS;Database=GeekSpeak.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient" /></connectionStrings>
But, I got this error:

Cannot open database "GeekSpeak.mdf" requested by the login. The login failed.
Login failed for user 'SEN-M09\ASPNET'.

I also has granted to userSEN-M09\ASPNET .Still, I got this error. Why?

I manage to solve this problem after reading the articlehere.

Thanks.

No comments:

Post a Comment