I have my own virtual server and I am looking to deploy a website to it.
The problem I am having is setting up the database. Normally on a hosted site I just upload the mdf file and I get a connection string from them.
I tried attaching the mdf file that I created with VS2010 using Management Studio to the 'local' server on my virtual server.
It creates it with a name that is the path to the file 'c:\inetpub\wwwroot...'
How do I get the connection string I need for to use this in my web config file?
I guess I will need to also create a user login for this also?
I did try and just have it use the express connection string but I get this error Unable to open the physical file "C:\inetpub\wwwroot\gtro\App_Data\ASPNETDB.MDF". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". An attempt to attach an auto-named database for file C:\inetpub\wwwroot\gtro\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I have changed the app pools in IIS7 to use Network service in Identity.
There is definitely no database already attached with the same name either.