How to connect SQL Server from ASP.NET Page

  • Thread starter Thread starter Rik
  • Start date Start date
R

Rik

Hello Experts,

I am new to ASP.NET, I already have hosted my Web site, which Open a SQL
Connection to my Static IP Address, But I can't make it happens.

My Connection Looks Like this.

Data Source = 120.xxx.xxx.xxxx,1444

And rest is the same, it work locallay but not when I launch it on web?

Can any body guide me please.......

Thanks ia Advance.

Rik
 
Data Source = 120.xxx.xxx.xxxx,1444
Rik is that only ur connection?
how can that connect ..
And pls ask the Admin where u are hosting ur website whats the database
server name u are connecting to and ur password and username.
And tthen use the string below to connect:-
"Data Source=DatabaseServerName;Initial Catalog=DatabaseName;User
Id=;Password=;"
Hope it helps.
PAtrick
 
Patrick,

I really appriciate you response.

strCmd = "user id=sa;password=testserver;initial catalog=TestDatabase;data
source=210.xxx.xxx.146,1444;Connect Timeout=30"

The IP Address is our Static IP Address, which is linked with my system, and
My System have SQL Server running on it.



I generated a ASP.NET page, and Launched it on the free trial Web Hosting
web site "Webmatrixhosting.net"

Now when I want to connect to the my Static IP Address, It raised an Error,
SQL Server Does not exit.

Waiting for further help please....

rik
 
Rik,

offhand, why are you using port 1444 ?
The usual port is 1433.

Did you change SQL Server's port ?



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================
 
Yes I did change the Port Setting of Sql server, as I came to know that mist
of the ISP are blocking the 1433 port. So I changed it from 1433 TO 1444.

Thanks for your Reply,

Any more clues?
 
Back
Top