I use sa account to establish connection from .NET web application with SQL
database.
Now I have to use windows authentication and any combination of windows
accounts with different rights have been failed. I'm always getting the same
error:
System.Data.SqlClient.SqlException: Login failed for user 'username'.
any ideas will be appreciated.
Thanks,Hi,
You want to use Integrated Security, right?
cnn.ConnectionString = "integrated security=SSPI;data source=" & dbServer &
";" & _
"persist security info=False;initial catalog=VPOInventory"
HTH
--
Dan Artuso, MVP
"Alan" <Alan@.discussions.microsoft.com> wrote in message news:76566908-5D49-4A5E-8F0C-343B9
1CD0FE2@.microsoft.com...
> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||Check to see if you are using mixed mode for sql server
authentication(windows/sa).That might be your problem.you might have used 's
a
authentication only'
"Alan" wrote:
> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||check to see if you are using mixed mode sql server authentication.that migh
t
be your problem.you might be using 'sa only' authentication.
"Alan" wrote:
> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||did it help?
"Alan" wrote:
> I use sa account to establish connection from .NET web application with SQ
L
> database.
> Now I have to use windows authentication and any combination of windows
> accounts with different rights have been failed. I'm always getting the sa
me
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||Hello Alan,
Also, please never use SA in your application. You should create an account
for your application to run as and only grant the necessary permissions to
that user. The same goes for Windows Authentication. Don't grant the user
you use for running your application membership into the system administrato
rs
role.
Aaron Weiker
http://aaronweiker.com/
http://sqlprogrammer.org/
> I use sa account to establish connection from .NET web application
> with SQL
> database.
> Now I have to use windows authentication and any combination of
> windows
> accounts with different rights have been failed. I'm always getting
> the same
> error:
> System.Data.SqlClient.SqlException: Login failed for user 'username'.
> any ideas will be appreciated.
> Thanks,
>|||Thank you,
your advise was very helpful.
"Dan Artuso" wrote:
> Hi,
> You want to use Integrated Security, right?
> cnn.ConnectionString = "integrated security=SSPI;data source=" & dbServer
& ";" & _
> "persist security info=False;initial catalog=VPOInventory"
>
> --
> HTH
> --
> Dan Artuso, MVP
>
> "Alan" <Alan@.discussions.microsoft.com> wrote in message news:76566908-5D4
9-4A5E-8F0C-343B91CD0FE2@.microsoft.com...
>
>|||Our SQL server is running in mixed mode and I want to move it to Windows onl
y
mode.
Thank you.
"Preeta" wrote:
> did it help?
> "Alan" wrote:
>|||Thank you - I'm trying to get rid of this account.
First I want to move all our SQL servers to Windows only mode.
Thank you.
"Aaron Weiker" wrote:
> Hello Alan,
> Also, please never use SA in your application. You should create an accoun
t
> for your application to run as and only grant the necessary permissions to
> that user. The same goes for Windows Authentication. Don't grant the user
> you use for running your application membership into the system administra
tors
> role.
> --
> Aaron Weiker
> http://aaronweiker.com/
> http://sqlprogrammer.org/
>
>
>
Showing posts with label sqldatabase. Show all posts
Showing posts with label sqldatabase. Show all posts
Tuesday, February 14, 2012
connection string
Labels:
application,
authentication,
combination,
connection,
database,
establish,
microsoft,
mysql,
net,
oracle,
server,
sql,
sqldatabase,
string,
web,
windows
Friday, February 10, 2012
Connection Problem accessing a SQL server
Hello,
I have a PC with an application using SQL on a SBS 2003 server and the SQL
database is on a SBS 2000 server. I get from the SBS 2003 server to the SBS
2000 server through a router. The IP address are non-routable so it does
not go out over the internet. When I execute the application on the SBS
2003 the first couple of screens that access the database work just fine and
the response time is good. I then try another transaction and I get the
Connection failed: SQLState '01000' SQL Server Error: 10060 followed by
Connection failed: SQLState '08001' SQL Server Error: 17. I do not have a
clue what is causing this problem nor can I find a reason. If I reply
'yes' to the connection boxes that come up on the screen eventually the
connection is re-instated and I can do a couple more transactions before the
failure occurs again. I am using ODBC to connect any help would be
appreciated. I am wondering if the topology of the network is an issue.
The sequence of events is PC --> Switch --> SBS 2003 Server --> Router -->
SBS 2000 Server --> SQL 2000. I do not think this is the problem but I
thought I mention it. I also thought about ISA but I can do the
transactions initially that must mean the ports are opened. If I direct
connect the PC to the SBS 2000 server I do not have a problem with the
transactions timing out..
Thank You,
Joe
Hi
You may want to look at SQL profiler to see what statements are being
executed by the SQL Server and if the statements complete after the client
has timed out. You may also want to look for blocking.
If you are getting timeout errors, have you configured the timeout? What
time does it take to timeout?
You may also want to look at the protocols you are using and try a different
one.
John
"Joe Bucar" <jbucar@.hotmail.com> wrote in message
news:uLVa%234HlFHA.1148@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have a PC with an application using SQL on a SBS 2003 server and the
> SQL database is on a SBS 2000 server. I get from the SBS 2003 server to
> the SBS 2000 server through a router. The IP address are non-routable so
> it does not go out over the internet. When I execute the application on
> the SBS 2003 the first couple of screens that access the database work
> just fine and the response time is good. I then try another transaction
> and I get the Connection failed: SQLState '01000' SQL Server Error: 10060
> followed by Connection failed: SQLState '08001' SQL Server Error: 17. I
> do not have a clue what is causing this problem nor can I find a reason.
> If I reply 'yes' to the connection boxes that come up on the screen
> eventually the connection is re-instated and I can do a couple more
> transactions before the failure occurs again. I am using ODBC to connect
> any help would be appreciated. I am wondering if the topology of the
> network is an issue. The sequence of events is PC --> Switch --> SBS 2003
> Server --> Router --> SBS 2000 Server --> SQL 2000. I do not think this
> is the problem but I thought I mention it. I also thought about ISA but I
> can do the transactions initially that must mean the ports are opened. If
> I direct connect the PC to the SBS 2000 server I do not have a problem
> with the transactions timing out..
> Thank You,
> Joe
>
I have a PC with an application using SQL on a SBS 2003 server and the SQL
database is on a SBS 2000 server. I get from the SBS 2003 server to the SBS
2000 server through a router. The IP address are non-routable so it does
not go out over the internet. When I execute the application on the SBS
2003 the first couple of screens that access the database work just fine and
the response time is good. I then try another transaction and I get the
Connection failed: SQLState '01000' SQL Server Error: 10060 followed by
Connection failed: SQLState '08001' SQL Server Error: 17. I do not have a
clue what is causing this problem nor can I find a reason. If I reply
'yes' to the connection boxes that come up on the screen eventually the
connection is re-instated and I can do a couple more transactions before the
failure occurs again. I am using ODBC to connect any help would be
appreciated. I am wondering if the topology of the network is an issue.
The sequence of events is PC --> Switch --> SBS 2003 Server --> Router -->
SBS 2000 Server --> SQL 2000. I do not think this is the problem but I
thought I mention it. I also thought about ISA but I can do the
transactions initially that must mean the ports are opened. If I direct
connect the PC to the SBS 2000 server I do not have a problem with the
transactions timing out..
Thank You,
Joe
Hi
You may want to look at SQL profiler to see what statements are being
executed by the SQL Server and if the statements complete after the client
has timed out. You may also want to look for blocking.
If you are getting timeout errors, have you configured the timeout? What
time does it take to timeout?
You may also want to look at the protocols you are using and try a different
one.
John
"Joe Bucar" <jbucar@.hotmail.com> wrote in message
news:uLVa%234HlFHA.1148@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have a PC with an application using SQL on a SBS 2003 server and the
> SQL database is on a SBS 2000 server. I get from the SBS 2003 server to
> the SBS 2000 server through a router. The IP address are non-routable so
> it does not go out over the internet. When I execute the application on
> the SBS 2003 the first couple of screens that access the database work
> just fine and the response time is good. I then try another transaction
> and I get the Connection failed: SQLState '01000' SQL Server Error: 10060
> followed by Connection failed: SQLState '08001' SQL Server Error: 17. I
> do not have a clue what is causing this problem nor can I find a reason.
> If I reply 'yes' to the connection boxes that come up on the screen
> eventually the connection is re-instated and I can do a couple more
> transactions before the failure occurs again. I am using ODBC to connect
> any help would be appreciated. I am wondering if the topology of the
> network is an issue. The sequence of events is PC --> Switch --> SBS 2003
> Server --> Router --> SBS 2000 Server --> SQL 2000. I do not think this
> is the problem but I thought I mention it. I also thought about ISA but I
> can do the transactions initially that must mean the ports are opened. If
> I direct connect the PC to the SBS 2000 server I do not have a problem
> with the transactions timing out..
> Thank You,
> Joe
>
Labels:
accessing,
application,
connection,
database,
microsoft,
mysql,
oracle,
sbs,
server,
sql,
sqldatabase
Connection Problem accessing a SQL server
Hello,
I have a PC with an application using SQL on a SBS 2003 server and the SQL
database is on a SBS 2000 server. I get from the SBS 2003 server to the SBS
2000 server through a router. The IP address are non-routable so it does
not go out over the internet. When I execute the application on the SBS
2003 the first couple of screens that access the database work just fine and
the response time is good. I then try another transaction and I get the
Connection failed: SQLState '01000' SQL Server Error: 10060 followed by
Connection failed: SQLState '08001' SQL Server Error: 17. I do not have a
clue what is causing this problem nor can I find a reason. If I reply
'yes' to the connection boxes that come up on the screen eventually the
connection is re-instated and I can do a couple more transactions before the
failure occurs again. I am using ODBC to connect any help would be
appreciated. I am wondering if the topology of the network is an issue.
The sequence of events is PC --> Switch --> SBS 2003 Server --> Router -->
SBS 2000 Server --> SQL 2000. I do not think this is the problem but I
thought I mention it. I also thought about ISA but I can do the
transactions initially that must mean the ports are opened. If I direct
connect the PC to the SBS 2000 server I do not have a problem with the
transactions timing out..
Thank You,
JoeHi
You may want to look at SQL profiler to see what statements are being
executed by the SQL Server and if the statements complete after the client
has timed out. You may also want to look for blocking.
If you are getting timeout errors, have you configured the timeout? What
time does it take to timeout?
You may also want to look at the protocols you are using and try a different
one.
John
"Joe Bucar" <jbucar@.hotmail.com> wrote in message
news:uLVa%234HlFHA.1148@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have a PC with an application using SQL on a SBS 2003 server and the
> SQL database is on a SBS 2000 server. I get from the SBS 2003 server to
> the SBS 2000 server through a router. The IP address are non-routable so
> it does not go out over the internet. When I execute the application on
> the SBS 2003 the first couple of screens that access the database work
> just fine and the response time is good. I then try another transaction
> and I get the Connection failed: SQLState '01000' SQL Server Error: 10060
> followed by Connection failed: SQLState '08001' SQL Server Error: 17. I
> do not have a clue what is causing this problem nor can I find a reason.
> If I reply 'yes' to the connection boxes that come up on the screen
> eventually the connection is re-instated and I can do a couple more
> transactions before the failure occurs again. I am using ODBC to connect
> any help would be appreciated. I am wondering if the topology of the
> network is an issue. The sequence of events is PC --> Switch --> SBS 2003
> Server --> Router --> SBS 2000 Server --> SQL 2000. I do not think this
> is the problem but I thought I mention it. I also thought about ISA but I
> can do the transactions initially that must mean the ports are opened. If
> I direct connect the PC to the SBS 2000 server I do not have a problem
> with the transactions timing out..
> Thank You,
> Joe
>
I have a PC with an application using SQL on a SBS 2003 server and the SQL
database is on a SBS 2000 server. I get from the SBS 2003 server to the SBS
2000 server through a router. The IP address are non-routable so it does
not go out over the internet. When I execute the application on the SBS
2003 the first couple of screens that access the database work just fine and
the response time is good. I then try another transaction and I get the
Connection failed: SQLState '01000' SQL Server Error: 10060 followed by
Connection failed: SQLState '08001' SQL Server Error: 17. I do not have a
clue what is causing this problem nor can I find a reason. If I reply
'yes' to the connection boxes that come up on the screen eventually the
connection is re-instated and I can do a couple more transactions before the
failure occurs again. I am using ODBC to connect any help would be
appreciated. I am wondering if the topology of the network is an issue.
The sequence of events is PC --> Switch --> SBS 2003 Server --> Router -->
SBS 2000 Server --> SQL 2000. I do not think this is the problem but I
thought I mention it. I also thought about ISA but I can do the
transactions initially that must mean the ports are opened. If I direct
connect the PC to the SBS 2000 server I do not have a problem with the
transactions timing out..
Thank You,
JoeHi
You may want to look at SQL profiler to see what statements are being
executed by the SQL Server and if the statements complete after the client
has timed out. You may also want to look for blocking.
If you are getting timeout errors, have you configured the timeout? What
time does it take to timeout?
You may also want to look at the protocols you are using and try a different
one.
John
"Joe Bucar" <jbucar@.hotmail.com> wrote in message
news:uLVa%234HlFHA.1148@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I have a PC with an application using SQL on a SBS 2003 server and the
> SQL database is on a SBS 2000 server. I get from the SBS 2003 server to
> the SBS 2000 server through a router. The IP address are non-routable so
> it does not go out over the internet. When I execute the application on
> the SBS 2003 the first couple of screens that access the database work
> just fine and the response time is good. I then try another transaction
> and I get the Connection failed: SQLState '01000' SQL Server Error: 10060
> followed by Connection failed: SQLState '08001' SQL Server Error: 17. I
> do not have a clue what is causing this problem nor can I find a reason.
> If I reply 'yes' to the connection boxes that come up on the screen
> eventually the connection is re-instated and I can do a couple more
> transactions before the failure occurs again. I am using ODBC to connect
> any help would be appreciated. I am wondering if the topology of the
> network is an issue. The sequence of events is PC --> Switch --> SBS 2003
> Server --> Router --> SBS 2000 Server --> SQL 2000. I do not think this
> is the problem but I thought I mention it. I also thought about ISA but I
> can do the transactions initially that must mean the ports are opened. If
> I direct connect the PC to the SBS 2000 server I do not have a problem
> with the transactions timing out..
> Thank You,
> Joe
>
Labels:
accessing,
application,
connection,
database,
microsoft,
mysql,
oracle,
sbs,
server,
sql,
sqldatabase
Subscribe to:
Posts (Atom)