0

I`ve created MVC 5 project with Entity Framrwork Code First. In the project there are 5 model classes - some of them have foreign keys. After I start the project I can no loger access to MS SQL 2014 Management Studio. There is error:

    A network-related or instance-specific error occurred while establishing a connection 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------
    Error Number: 2
    Severity: 20
    State: 0

MSSQL is running on my local machine. I used to log in with sever name = .

miechooy
  • 3,178
  • 12
  • 34
  • 59
  • It is very unlikely that this is the issue. Are you sure you are connecting to the right server and to the right database? Have you tried looking into the event log? – hbulens Nov 12 '15 at 08:56
  • connectionString="Data Source=.;Initial Catalog=DDP;Integrated Security=True" – miechooy Nov 12 '15 at 08:57
  • That's great but that doesn't help a bit. Please elaborate your details in your question or check the many other available questions on this forum, like this one: http://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci – hbulens Nov 12 '15 at 08:59
  • Is it the master database you are changing? It maybe you have altered the DB SQL Server uses for login – Mark Homer Nov 12 '15 at 09:52
  • I have only one SQL Server and all the time I was logging by '.' – miechooy Nov 12 '15 at 09:55

0 Answers0