.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
Subhransu Sekhar Jena
abhays
SP
DotnetUser
Post New Web Links

Why do I have to specify port 1433 on my connection string?

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :Sql Server
 

Hi All,

I have a Windows 2003 Std R2 with one instance (default) SQL2000 STD and another instance (secondary) with SQL2005 STD, both instances using port 1433, firewall already configured.

I'm using the following string connection to access my server with ADO.NET 2.0:

server=mer02\dpm,1433;initial catalog=dpm;TrustServerCertificate=yes;Encrypt=yes;Connection Timeout=30;User=*******;Password=********

Well, I don't know why, but I have to specify port 1433, otherwise I'm not able to connect, I have tried to telnet to mer02 port 1433 and it answers OK, even if I use Sql Management Studio from a local pc I have to access with mer02\dpm,1433 otherwise it takes sometime to return that the server may no be configured to accept remote connections.

Any ideas ?

Thanks in advance

 

 

 




View Complete Post


More Related Resource Links

SQL Connection String

  
We can learn or know how can we connect the database from our .net. This will help for freshers or .NET beginners!

abstract away the source of the connection string using a class with a static property.

  
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Encapsulation
Let's abstract away the source of the connection string using a class with a static property.

connection string question from a newbie

  

when publishing  in the webmatrix dialogue it asks for "destination connection string" for my "database.mdf"

I was not sure what it was so I pasted this from my web.config file :

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True

it all published ok, but wont run, so I guess it has somthing to do with this connection string or some kind of configuration issue.

My question is this, What should go in the field for "Destination connection string"


localhost is not set up to establish a connection on port 51624 with this computer

  

I'm trying to run asp.net locally, but getting the error

localhost is not set up to establish a connection on port 51624 with this computer

How can I fix it?


Modifying connection String in Web config using Install Wizard

  

Hey,

Im trying to create a Web Deployment Project, the built in setup and deployment is very good in Visual Studio, i need to able to add an additional step in the setup to change the connection string in the Web config file. Ive seen a lot of articles on how to do this and in particular this http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx#7162670 I am however stuck on the final part of this tutorial, im using the code Scott provided but have two errors,  heres part of my code where the errors are



using System;
using System.Configuration;
using System.Configuration.Install;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.DirectoryServices;

 void ConfigureDatabase(string targetSite, string targetVDir, string connectionString)
        {
            // Retrieve "Friendly Site Name" from IIS for TargetSite
            DirectoryEntry entry = new DirectoryEntry("IIS://LocalHost/" + targetSit

Custom security via connection string

  
Hi Is it possible to pass information into the SQL Server relational engine via the connection string in the same way as it can be done for Analysis Services? I need to generate a user context for a forms authentication application (i.e. no windows user accounts). SSAS allows you to pass in a list of database roles or a customdata parameter on the connection string. These can be used inside the database in lieu of a windows identity. I am wondering if there are equivalent parameters available for the SQL connection string.  I guess that I could create SQL logins from each of the forms users with a system generated password and then pass the uid and password on the connection string but this seems unnecessarily complicated. Andrew Wiles - www.it-workplace.com - MDX made simple

connection string

  
on the computer with sql management installed i use this and it works(server name):  .\SQLEXPRESS the computer name is: MAINCOMPUTER2 another computer on the network would use what? i can see  the c drives on either computer from either computer so i am connected.    

Connection string

  
Hi There!I am doing a project using Visual Web Developer Express. I have built a database using MS SQL Server Express which I have installed together with Visual Web Developer Express. Please help me what sort of the connection string I should use in the pages of my website to establish connection to the database.Thank you

problem in connection string

  
i have problem in connection strin i host my siteand database is in DATA DIRECTORYmy site run successfully in offline but an error of connection string in online pls give me an example of string for onlinei use asp.net, C# and sqlserver 2005

How to change connection string of a pivot table pointing to SSAS 2005 cube using excel 2003?

  
Hi All,I am not sure if I should have posted this query to Excel 2003 forum. But posting it here as it applies to SSAS 2005 as well.Ok, let me give the background before I tell the actual problem.We have users on ABC domain and the SSAS server is also on ABC domain. Users on this domain can acess the excel pivots by connecting to cube to browse the data. They leave the Userid & password field blank while they setup the connection string and it works fine. Thanks to windows authentication that takes the credentials of user logged in. Let's say I have two users A and B, they login to ABC domain with their own windows ids.  Now when user A creates a excel file having a cube pivot and then sends this file to user B, user B can refresh and modify the same excel file (he can select new measures to pivot, new hierarchies in filters and so on).Now, let's say I have another user, user C. He has excel 2003 installed on his PC and cannot migrate to excel 2007. He is on different domain XYZ but have a valid windows userid on domain ABC. The domain ABC & XYZ can not be setup to have trusted relationship. Now, when user A sends the same excel file to user C. When user C opens the file and try to refresh it or try to modify the pivot by selecting/deselecting any elements, he gets below error prompt:" An error was encountered in the transport layer." and "Errors in the

Writing connection string in web.config file by code or dynamically

  
I want to write connection string in web.config file of my application by code. If anyone know the way or code just help me..NET,C#,SQL SERVER

help configure my connection string

  
i have created a linq to sql mapping classnow i changed the location of the server but i can't chane the connection string to the new location where can i do this ?HosDataContext db = new HosDataContext();             Sur_Accessory nor = new Sur_Accessory             {                 SurgeryAccessoriesID = Guid.NewGuid(),                 Kind = TextBox4.Text             };HosDataContext db = new HosDataContext();            Sur_Accessory nor = new Sur_Accessory            {                SurgeryAccessoriesID = Guid.NewGuid(),                Kind = TextBox4.Text            };this code brought error after changing the serverError 8 The type or namespace name 'HosDataContext' could not be found (are you missing a using directive or an assembly reference?) E:\WorksAndBackUps\Hospital\4-9-2010\MostafaRadyHospital\MostafaRadyHospital\Admin\Surgery\UCA_SurgeryRoom.ascx.cs 34 37 MostafaRadyHospital

Connection String of ActiveDirectoryMembershipProvider that points to servers of High Availabilty

  
I have 2 LDAP servers, A and B which are configured to high availability. When A fails, B will take over and vice-versa. How do I set the connection string of the ActiveDirectoryMembershipProvider in this case? Thanks in advance.   (P.S: I am using asp.net / VB.net, .net framework 2.0) 

Connection string with password or impersonation

  
Which is the best solution for a program which runs as networkservice (or defined user) and needs to be connected to a database as a specific user: DbConnection ConnectionString with username and password                                          or Impersonate Windows Identity just before running the query Keep in mind security is important in my case.  
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend