asp.net - Can't access .mdf on IIS, only on IIS local -


I am able to use a .mdf file on local IIS. However, when I move it to the server under ap_data, I can not. Am I losing a step?

Additional information

  1. .mdf is under api.data on the server.

  2. It seems like trying to connect, but maybe.

  3. The connection string is as follows:

      democracy SQL_PRO string = "data source = (localDB) \ v11.0; AttachDbFilename = | data directory | \ MyDB.mdf; Integrated Security = true "    

    Update 2

    Here is an error message that is installed on SQL Express 2008 IIS < / P>

    A network-related or instance-specific error has occurred when setting up a connection to SQL Server. The server was not found or was not accessible. Verify that the example name is correct and SQL Server is configured to allow remote connection. (Provider: SQL Network Interfaces, Error: 52) Unable to detect local database runtime installation. Verify that SQL Server Express is properly installed and the local database runtime feature is enabled.)

    Thanks,

    Eric

    Your VS In the project, in Solution Explorer, select MDF and select Properties (Alt + Enter), to copy into the output directory, always choose Copy After publishing, pack on your file thinking Is not done

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -