According to your description and screenshots, I suggest that you could check the following steps.
Check if your connectstring is right.
Open the SQL Sever Object Explorer.
Find the Database you want to connect to and right click on it to find the
Properties item.
Find the Connection string item in General settings and copy the string to Web.config.
<connectionStrings>
<add name="ConnectionStringName" connectionString="Paste the Connection string" providerName="System.Data.SqlClient"/>
</connectionStrings>
Check the settings in Sql Server Configuration Management
Open the Sql Server Configuration Management ( How to open )->SQL Server Network Configuration->Protocols for
'servername' and check TCP/IP is enabled
Open SSMS in run, and check you are able to login to server using specfied username/password and/or using windows authentication.
Repeat step 1 for SQL native client config also.
Best Regards,
Jenifer
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Contributor
2150 Points
705 Posts
Re: Server Error in '/MVCDemo' Application. The system cannot find the file specified
May 13, 2019 02:45 AM|Jenifer Jiang|LINK
Hi mahmoud_arafa,
According to your description and screenshots, I suggest that you could check the following steps.
Find the Connection string item in General settings and copy the string to Web.config.
Best Regards,
Jenifer
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.