I am trying to deploy a MVC Application on the IIS server. I have shared the sqllocaldb using command prompt and created a Private LocalDB instance with name IIS_DB
I have also changed the connection string in my Web.Config file to
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\.\IIS_DB;Initial Catalog=aspnet-MvcApplication26-20141226150050;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-MvcApplication26-20141226150050.mdf" providerName="System.Data.SqlClient" />
As of now I can view the Home Page when I click on Browse from the ISS Manager.
But when I click on the Register/Login hyperlink, I get the following error
Cannot attach the file 'C:\inetpub\wwwroot\MvcApplication26\App_Data\aspnet-MvcApplication26-20141226150050.mdf' as database 'aspnet-MvcApplication26-20141226150050'.