How to fixed in this basic issue

Posted by Jayakumars under C# on 6/10/2017 | Points: 10 | Views : 266 | Status : [Member] [MVP] | Replies : 1
Hi

I have create one Mvc5 project using Edmx concept then Database create separate not in my app_code folder

My webconfig connectionstring code like this

<add name="ProductEntities" connectionString="metadata=res://*/MyProduct.csdl|res://*/MyProduct.ssdl|res://*/MyProduct.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=PC-NAME;initial catalog=DbProducts;persist security info=True;user id=userid;password=pwd;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>

above connection string correct i try to connect some other application working good

but when i host to production server i meet this issue


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: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
)


How to fix it. MVC5 with edmx how to host production server thats it.
what i need to change my webconfig connection string

i search in google some other way not working any one solve this

Mark as Answer if its helpful to you


Responses

Posted by: Jitendrasoft09 on: 6/10/2017 [Member] [MVP] Starter | Points: 25

Up
0
Down
Mention production server name or IP address instead of PC name in web.config. Try to ping the server name from remotely. For safe purpose you add multiple connection string for each environment like production, local, QA, development. Hope it helps you.

Jitendra Kumar
If my post helps you, plz mark as an answer.

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response