How to connect SQL Server from ASP.NET Page

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
 
P

Patrick Olurotimi Ige

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
 
R

Rik

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
 
J

Juan T. Llibre

Rik,

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

Did you change SQL Server's port ?
 
R

Rik

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top