Groups | Blog | Home
all groups > dotnet academic > september 2005 >

dotnet academic : web.config file


Rafael Chemtob
9/1/2005 5:00:09 PM
hi
i have a web.config file that specifies the connection string for my
database. the database server on the ISP is using a different port than
1433. how do i specify in the connection string to use a specific port
number?
i tried the <ip address>:<port number> and that didn't work.
any ideas?
thanks

Mona
9/6/2005 12:00:00 AM
Hi Rafael,

Regarding this issue of specifying the connection string to use a specific
port number, I would like to know the database you are using. In case you
are using the SQL Server, then you can change the port number in the
connection string itself as follows :

"Data Source=190.190.200.100,1433;Ne­twork Library=DBMSSOCN;Initial
Catalog=pubs;User ID=sa;Password=asdasd;"

You can change the port number directly from the connection string as shown
above.

One most important thing to remember is that you should always use a comma
Vs a colon to specify the port number. Also, I would request you to please
go through the following article :

[HOW TO: Use the Server Name Parameter in a Connection String to Specify the
Client Network Library]
http://support.microsoft.com/default.aspx?scid=kb;en-us;313295

Hope this helps.

Regards,
Mona [Grapecity]

[quoted text, click to view]

AddThis Social Bookmark Button