Click here to Skip to main content
15,909,822 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
this is lokesh

my problem is i developed one website "groups.aspx" for this i created one login page for that to allow to enter username and password and

i used sqlserver 2008 in same computer its working fine
HTML
add name="sqlcon" connectionString="server=KIRAN-EBF343820\SQLEXPRESS;user id=sa;password=abc;database=@MobileTrack" 


in browser i searching like (http://localhost/TrackingBefore/Login.aspx[^]


but the main task is

i want to access my website in remote computer that is like
HTML
<a href="http://localhost/TrackingBefore/Login.aspx">http://49.204.58.114/TrackingBefore/Login.aspx</a>[<a href="http://localhost/TrackingBefore/Login.aspx" target="_blank" title="New Window">^</a>]


it accessing fine but sql server is not connection in that movement

i changed the connection string like this
HTML
add name="sqlcon" connectionString="server=49.204.58.114,KIRAN-EBF343820\SQLEXPRESS;user id=sa;password=abc;database=@MobileTrack"


its not working how to solve this task any one please help to me
Posted
Updated 17-Aug-12 20:33pm
v2
Comments
AmitGajjar 18-Aug-12 2:34am    
have you checked KIRAN-EBF343820\SQLEXPRESS SQL server is accessible from your web server(from 49.204.58.114) ? or try with 49.204.58.114\SQLEXPRESS
lokesh lokesh 18-Aug-12 3:07am    
i tried like this but not connecting
connectionString="server=49.204.58.114\SQLEXPRESS;user id=sa;password=abc;database=MobileTrack"

For proper connection strings, please refer to http://www.connectionstrings.com/sql-server-2008[^].

If the connection string is correct, you need to check that proper protocol (typically TCP/IP) is enabled and that there is no firewall blocking the conversation to the database and that the SQL Server is up and running.
 
Share this answer
 
Comments
Espen Harlinn 19-Aug-12 8:32am    
5'ed!
Wendelius 21-Aug-12 1:05am    
Thank you Espen :)
Try this connection string

C#
ConnectionString="Data Source=49.204.58.114;Initial Catalog=MobileTrack;User ID=sa;Password=abc;Integrated Security=no;"


I am facing this problem in my project and i added Integrared Security=no then it will be solved my problems.

I hope it will be help you.
Thnak You.
 
Share this answer
 
hii dude first you need to enable your sql server for remote access
for this refer

http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx[^]

or

http://mushtaqnaik.blogspot.in/2010/12/how-to-enable-remote-connection-on-sql.html[^]

and then use following

connection string
SQL
connectionString="Data Source=49.204.58.114;Initial Catalog=MobileTrack;User ID=sa;Password=abc"

it will work fine

have happy coding
 
Share this answer
 
v2
SQL
Try This
connectionString="Data Source=49.204.58.114;Initial Catalog=@MobileTrack;User ID=sa;Password=abc"
 
Share this answer
 
Comments
lokesh lokesh 18-Aug-12 3:14am    
i changed like this even now also not connected

connectionString="Data Source=49.204.58.114;Initial Catalog=MobileTrack;User ID=sa;Password=abc"


error like this


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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900