Error connecting to SQL Server 2012 database - using IIS 7.5 server

2

I'm getting this error.

  

Network-specific or instance-specific error when connecting to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - A Local Database Runtime error has occurred.   ).

This error occurs when attempting to connect to the database using IIS 7.5, but through IISExpress, which starts directly through Visual Studio Web 2013, the connection usually occurs.

Connection Data:

  

Connection String:   Data Source = (LocalDB) \ v11.0; AttachDbFilename = C: \ inetpub \ wwwroot \ LocalIIS \ secondsite \ App_Data \ aspnet-secondsite-91d3d8bf-0c8d-4f0a-9165-96960db8ab1b.mdf; Initial Catalog = aspnet-secondsite-91d3d8bf -0c8d-4f0a-9165-96960db8ab1b; Integrated Security = True; User Instance = False

Provider:

  

.NET Framework Data Provider for SQL Server

Type:

  

Microsoft SQL Server

Version:

  

11.00.3000

    
asked by anonymous 07.04.2015 / 21:39

1 answer

1

Just try

Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\inetpub\wwwroot\LocalIIS\secondsite\App_Data\aspnet-secondsite-91d3d8bf-0c8d-4f0a-9165-96960db8ab1b.mdf;Integrated Security=True;Connect Timeout=30
    
07.04.2015 / 22:33