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:
- install sql server management studio;
- created server name (fictious)
mycpu/sqlexpress
- created in database named
myproject1
and have set sizes best figure out - added in security login user named
test
/password
for connection tests; - sql server configuration manager tells me sql server service running, sql server agent stopper , sql server browser running;
- got ip of machine (fictious)
254.254.254.123
- in windows firewall, have added inbound rule named sql server port
9999
(9999 being proper port supposed listened server); - 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;
- 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="data source=254.254.254.123;initial catalog=mycpu/sqlexpress\myproject1;user id=test;password=password;multipleactiveresultsets=true;app=entityframework"" 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
Post a Comment