SteveoAtilla Posted August 7, 2008 Posted August 7, 2008 Hello! I am developing and maintaining a large .NET 2.0 application for a customer, and we are migrating the application to their data center. It has been working very well on the SQL Server 2005 installation, but it is being moved to the corporate data center, and they do not use the standard SQL port (1433) due to a previous virus attack. How do I specify the actual SQL port used for connections in an ASP connection string? I tried putting "port=" in the connection string, but I was told that the keyword was not supported. Here is the connection string in the web.config file: <add name="CustConnectionString" connectionString="Data Source=custSQLServer; Port=1433; Initial Catalog=custDatabase; Persist Security Info=True; User ID=dbuser; Password=p@ssw0rd" providerName="System.Data.SqlClient" /> This is what generates the error. Any ideas? Thanks. Steve Quote The three most important things in life: God, your family, and the Green Bay Packers -- Not necessarily in that order. Winning is not a sometime thing. You don't win once in a while, you don't do things right once in a while, you do them right all the time. Winning is a habit. Unfortunately, so is losing. -- Vincent T. Lombardi
Administrators PlausiblyDamp Posted August 7, 2008 Administrators Posted August 7, 2008 Try connectionString="Data Source=custSQLServer, 1433" for the data source part of the connection string. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.