Re: SQL2005: Cannot connect error 11001
- From: Landon Kelsey <landonmkelsey@xxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 14:59:02 -0700
I can connect easily using C# & ADO.NET on standalone programs.
I am trying to connect from a web site program under .NET 1.1 VS 7 and
always get
Login failed for user 'LANDON\ASPNET'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'LANDON\ASPNET'.
Source Error:
Line 46: private void Page_Load(object sender, System.EventArgs e)
Line 47: {
Line 48: sqlConnection1.Open();
Line 49: ds = new DataSet();
Line 50: daAttendees = new SqlDataAdapter(
Source File: c:\inetpub\wwwroot\pcswebapp2\webform1.aspx.cs Line: 48
having signed in under IE6 using:
http://localhost/PCSWebApp2/WebForm1.aspx
I've tried everything to fix the problem;
"Stephan (Germany)" wrote:
Hello,.
update: I don't know how but now the database server accepted
<domain>\Administrator as new login account. Enabled, access granted as
syadmin, user mapped to one database. (note: I'm not using SQLexpress, I'm
still trying to find out how it works with MSSQLserver).
In the meantime, I have switched to tested the SQL authentification. This is
working with TCP settings, so the TCP protocoll settings (together with the
port) seem to be correct. I have now switched back to Windows
authentification only. Does the issue has to do with the login account / user
group ?
Any idea?
"Stephan (Germany)" wrote:
Hello,
I believe the complete Windows auth user access is too complicate, not
really recommendable.
I really don't even know where to start.
The error is coming now:
Login failed for user ''. The user is not associated with a trusted SQL
Server connection. [CLIENT: <Ip address of the calling client will be
displayed>]
So, which trusted connection is meant? Windows authentification?
This is the setting I have choosen (and no SQL direct login should be
possible withuser and password which can be hacked/sniffed).
Maybe I have not understood coorectly the complete login stuff.
If I try now to create a login for a domain group Administrators for
instance, I use the Security-->Logins path in Server Management Studio and
select "New login".
Then, if I try to select exisiting domain users, only the local users on the
laptop running the database will be displayed. Any further trial to enter
<domain>\<usergroup> with usergroup "Administrators" for example will not be
accepted. User unknown.
So, what in general has to be done to get the simple stuff running?
Thanks
Stephan
"Rick Byham [MS]" wrote:
Odd
, because it sounds like this should work. Try starting the SQL Server
Browser Service on the laptop and connecting again, just to see if the port
information is what you think it is. For instance, if you changed the port
but didn't restart, it would still be listening on the old port. With
Browser on, try connecting to the computer_name for the default and
computer_name\SQLEXPRESS for the named instance.
--
Rick Byham
MCDBA, MCSE, MCSA
Documentation Manager,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"Sue Hoegemeier" <Sue_H@xxxxxxxxxxxxx> wrote in message
news:112k2295qpa5ovldjfvs2rdjbf5i5mq8f4@xxxxxxxxxx
Check the SQL Server error log to verify that it is
listening on the port, IP you specify. Try connecting from
the command line using osql:
osql -S tcp:Laptop\InstanceName, <PortNumber> -E
-Sue
On Tue, 28 Mar 2006 15:04:52 -0800, Stephan (Germany)
<StephanGermany@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,
within my network, one laptop get installed MSSQL2005, all services are
activated, network configuration as follows:
shared memory -- enabled
named pipes -- disabled
TCP/IP -- enabled
VIA -- disabled
For TCP/IP:
Protocol: yes
IP Adresses:
========
IP1 :
enabled = yes
IP address: the one of the laptop
TCP dynamic ports: (blank)
TCP port: I have given a port number
IP2:
besides IP address -- same settings like IP1.
IP address: 127.0.0.1 (local loop)
IP all:
dynamic ports -- (blank)
TCP port: I have given a port number (differnt to the others above)
All services restarted in order to activate the settings.
If I use know a second laptop where SQL Server Management Studio is
installed,
I try to connect as follows:
Login -> Database Engine (server type),
Servername: <IP address of MSSQL laptop above)>,<Portnumber
of
IP ALL>
Connection properties: connect to database (default), network protocol
(TCP/IP)
If I press now the button Connect, the error message appears:
Cannot connect to tcp:<Ip address of MSSQL laptop>,<Portnumber of IP ALL>
An error has occured while establishing a connection to the server. When
connecting to SQL server,2005, the failure may be caused by the fact that
under the default settings SQL Server does not allow remote connection.
(provider: tcp provider, error: 0 - not such host is known). (MS SQL
error:
11001)
I have sent a ping to the MSSQL laptop -- ping is responding.
Trying to check with TELNET <IP address of MSSQL laptop>:<Portnumber of IP
ALL>, the telnet will fail.
I don't know why the host is unknown.
On the MSSQL laptop, SQLexpress and MSSQLSERVER are running as instances.
Is there a special settings necessary because of having a named instance
"MSSQLSERVER" ?
What can be the reason for this?
Firewall is deactivated (windows firewall as well as F-Secure firewall).
nethertheless, in Windows firewall an exception rule already exists for
MSSQLSERVER and the port I'm using in IP ALL. The port number is not the
standard number 1433.
Thanks for any help.
Stephan Hofmann.
- Follow-Ups:
- Re: SQL2005: Cannot connect error 11001
- From: Stephan Hofmann
- Re: SQL2005: Cannot connect error 11001
- Prev by Date: Re: SQL.Net connection in VS2005 from local IIS to local SQLExpres
- Next by Date: Re: SQL.Net connection in VS2005 from local IIS to local SQLExpres
- Previous by thread: Re: connect to SQL 2005 fails
- Next by thread: Re: SQL2005: Cannot connect error 11001
- Index(es):
Loading