Saturday 15 January 2011

c# - Issues Connecting to hosted SQL Server 2012 from ASP.net MVC 4 -



c# - Issues Connecting to hosted SQL Server 2012 from ASP.net MVC 4 -

i having issue keeping connection between sql server , asp.net app. have basic template given when creating asp.net mvc 4 project within of visual studio 2013. added hosted database server explorer , created 1 role - "administration". added connection string connection string property within of web.config file project "default connection". ran project , able create user , login , out of user.

this created datatables in db , able see values using server explorer. made entry in userinroles tie newly created user "administration" role. added code below render new link dependent on if user had administration role or not:

<ul id="menu"> <li>@html.actionlink("home", "index", "home")</li> <li>@html.actionlink("search", "search", "home")</li> <li>@html.actionlink("contact", "contact", "home")</li> @if (user.isinrole("administrator")) { <li>@html.actionlink("testing", "contact", "home")</li> } </ul>

this worked little while started exception thrown "system.web.httpexception" additional info stating "unable connect sql server database". digging inner exceptions following:

"a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name right , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified)"

i know server setup correctly , each time pull downwards fresh version of project bitbucket -> runs fine. when stop , create modifications or effort re-run - presented error again.

i able navigate server using server explorer in visual studio , can see server setup , running when logged godaddy account.

i have deleted projects , gone through whole process multiple times , come same result each time. have spent great deal of time trying find info on go next have not been able come anything. help appreciated!

you need create sure have entered right details. please check hosting provider. error message show sql server details incorrect.

c# asp.net-mvc-4 sql-server-2012 godaddy sqlconnection

No comments:

Post a Comment