ok my ASP.net website is running as long I do not use the database. I guess the problem is that I do not really understand the setup of the connectionstring and struggle do find the correct answer.
My connection string looks like this: "ConnectionStrings" "Add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=aspnetdb;AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=SSPI" providerName="System.Data.SqlClient" /" "add name="ApplicationServices" connectionString="Data source=.;Integrated Security=True;Initial Catalog=aspnetdb" /" "/connectionStrings"
===> I had to change the code as it wouldn't display otherwise (sorry)
When I run the application and want to login on localhost I get the following error: (website is on the server versus SQL is on the C drive installed):
Database 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\aspnetdb.mdf' already exists. Choose a different database name. Cannot attach the file 'S:\H-L\legaldocsnsw\WebSite1\App_Data\aspnetdb.mdf' as database 'aspnetdb'.
On the internet there is a database master and my database I created CID05220_aspnetdb: CREATE DATABASE permission denied in database 'master'. Cannot attach the file 'C:\inetpub\vhosts\legaldocsnsw.com.au\httpdocs\App_Data\aspnetdb.mdf' as database 'aspnetdb'.
How do I have to change the connection string to access these either locally or on the net. Could someone please help and maybe even explain what I am doing wrong please?
Kind Regards, Rene