asp.net mvc - Cannot connect to remote SQL Server with SQL Server Management Studio with Visual Studio -


i'm developing small app on own , trying install database on local machine using development.

so far have done of these things:

  1. install sql server management studio;
  2. created server name (fictious) mycpu/sqlexpress
  3. created in database named myproject1and have set sizes best figure out
  4. added in security login user named test / passwordfor connection tests;
  5. sql server configuration manager tells me sql server service running, sql server agent stopper , sql server browser running;
  6. got ip of machine (fictious) 254.254.254.123
  7. in windows firewall, have added inbound rule named sql server port 9999 (9999 being proper port supposed listened server);
  8. i have linksys router and, on router, in security tab, single port forwarding, have remote desktop connection external / internal port routing port 9999 ip 254.254.254.123 , enabled;
  9. i have authorized tcp/ip protocol on server.

this resumes have done best remember have tried many things. objective connect myproject1 using connection string in visual studio; not know how format connection string, using modified connection string took project connects on remote database works (but not located @ home):

<add name="mydatabaseconnection"       connectionstring="metadata=res://*/models.database.myproject1.csdl|res://*/models.database.myproject1.ssdl|res://*/models.database.myproject1.msl;provider=system.data.sqlclient;provider connection string=&quot;data source=254.254.254.123;initial catalog=mycpu/sqlexpress\myproject1;user id=test;password=password;multipleactiveresultsets=true;app=entityframework&quot;"       providername="system.data.entityclient" /> 

however when try connect database, visual studio shows me following error:

a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: named pipes provider, error: 40 - not open connection sql server)

the system cannot find file specified

i need troubleshooting find exact cause of problem , connect database remotely, mean lot me. if have questions in process or think there information missing, feel free ask.

you incorrectly specified data source , initial catalog properties in connection string. instead of

data source=254.254.254.123;initial catalog=mycpu/sqlexpress\myproject1` 

try specify

data source=254.254.254.123\sqlexpress;initial catalog=myproject1 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -