Hello,
I have an asp.net application which connects to SQL server using the
normal ado.net mechanism. One customer cannot get it to connect to the
database. his connection string is
user id=aaaa;password=bbbb;initial catalog=cccc;server=dddd
and he gets the message:
Cannot open database requested in login 'cccc'. Login fails. Login
failed for user 'aaaa'.
The customer insists that he has the values in the connection string
correct; the only unusual thing is that dddd is actually the IP address
rather than the host name of the SQL server box.
I am not in a position to do any direct investigation myself. many
other customers are using the same software without problems. does
anyone have any clues what might cause this error, other than invalid
username/password combination?
TIA
Andyajfish@.blueyonder.co.uk wrote:
> Hello,
> I have an asp.net application which connects to SQL server using the
> normal ado.net mechanism. One customer cannot get it to connect to the
> database. his connection string is
> user id=aaaa;password=bbbb;initial catalog=cccc;server=dddd
> and he gets the message:
> Cannot open database requested in login 'cccc'. Login fails. Login
> failed for user 'aaaa'.
> The customer insists that he has the values in the connection string
> correct; the only unusual thing is that dddd is actually the IP
> address rather than the host name of the SQL server box.
> I am not in a position to do any direct investigation myself. many
> other customers are using the same software without problems. does
> anyone have any clues what might cause this error, other than invalid
> username/password combination?
>
That's the only cause I know of.
if the IP address was the problem, he would be getting a "not found"
message rather than "login failed", which implies a connection to the
database was initiated, but terminated due to improper credentials.
The customer should check the sql error logs as well as the event logs
to see if any other errors or warnings are present.
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.|||If the Sql Server is not enabled for "Mixed mode" (both SQL and Windows)
authentication, they could possibly get that error.
Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"ajfish@.blueyonder.co.uk" wrote:
> Hello,
> I have an asp.net application which connects to SQL server using the
> normal ado.net mechanism. One customer cannot get it to connect to the
> database. his connection string is
> user id=aaaa;password=bbbb;initial catalog=cccc;server=dddd
> and he gets the message:
> Cannot open database requested in login 'cccc'. Login fails. Login
> failed for user 'aaaa'.
> The customer insists that he has the values in the connection string
> correct; the only unusual thing is that dddd is actually the IP address
> rather than the host name of the SQL server box.
> I am not in a position to do any direct investigation myself. many
> other customers are using the same software without problems. does
> anyone have any clues what might cause this error, other than invalid
> username/password combination?
> TIA
> Andy
>|||"Bob Barrows [MVP]" <reb01501@.NOyahoo.SPAMcom> wrote in message
news:enZRMTliGHA.4776@.TK2MSFTNGP05.phx.gbl...
> ajfish@.blueyonder.co.uk wrote:
> That's the only cause I know of.
when I looked at the error message a little closer and reproduced it, I
realised the problem was actually down to the database name being incorrect,
not the username and password
d'oh !
> if the IP address was the problem, he would be getting a "not found"
> message rather than "login failed", which implies a connection to the
> database was initiated, but terminated due to improper credentials.
> The customer should check the sql error logs as well as the event logs
> to see if any other errors or warnings are present.
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>|||"Bob Barrows [MVP]" <reb01501@.NOyahoo.SPAMcom> wrote in message
news:enZRMTliGHA.4776@.TK2MSFTNGP05.phx.gbl...
> ajfish@.blueyonder.co.uk wrote:
> That's the only cause I know of.
when I looked at the error message a little closer and reproduced it, I
realised the problem was actually down to the database name being incorrect,
not the username and password
d'oh !
> if the IP address was the problem, he would be getting a "not found"
> message rather than "login failed", which implies a connection to the
> database was initiated, but terminated due to improper credentials.
> The customer should check the sql error logs as well as the event logs
> to see if any other errors or warnings are present.
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts
Wednesday, March 21, 2012
Monday, March 19, 2012
Failed login MyMachine\ASPNET
I just wanted to write a simple WebService to return a dataset.
But when I am trying to debug it under Visual Studio, I get an exception
when calling conn.Open( ). The error message is "Failed to login user
myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent that
account, if it fails to connect to my local MSDE? What can I do about it?
Please, I am not an administrator, so I need every detail.Make sure that you have a right Login as well as check if you have Windows
Authentication only. Change it to Mixed Authentication
"N Thorell" <NThorell@.discussions.microsoft.com> wrote in message
news:06CD83E4-9F83-4BE2-A695-652A7C4A7DF9@.microsoft.com...
> I just wanted to write a simple WebService to return a dataset.
> But when I am trying to debug it under Visual Studio, I get an exception
> when calling conn.Open( ). The error message is "Failed to login user
> myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent
that
> account, if it fails to connect to my local MSDE? What can I do about
it?
> Please, I am not an administrator, so I need every detail.|||The local ASPNET Windows account is created automatically when you install
ASP.NET. This account is used by default as the security context for
ASP.NET applications.
You can either grant ASPNET access to SQL Server or reconfigure ASP.NET to
use a different account. See
http://support.microsoft.com/defaul...kb;en-us;316989 for details
on how to do this.
Hope this helps.
Dan Guzman
SQL Server MVP
"N Thorell" <NThorell@.discussions.microsoft.com> wrote in message
news:06CD83E4-9F83-4BE2-A695-652A7C4A7DF9@.microsoft.com...
>I just wanted to write a simple WebService to return a dataset.
> But when I am trying to debug it under Visual Studio, I get an exception
> when calling conn.Open( ). The error message is "Failed to login user
> myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent
> that
> account, if it fails to connect to my local MSDE? What can I do about
> it?
> Please, I am not an administrator, so I need every detail.
But when I am trying to debug it under Visual Studio, I get an exception
when calling conn.Open( ). The error message is "Failed to login user
myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent that
account, if it fails to connect to my local MSDE? What can I do about it?
Please, I am not an administrator, so I need every detail.Make sure that you have a right Login as well as check if you have Windows
Authentication only. Change it to Mixed Authentication
"N Thorell" <NThorell@.discussions.microsoft.com> wrote in message
news:06CD83E4-9F83-4BE2-A695-652A7C4A7DF9@.microsoft.com...
> I just wanted to write a simple WebService to return a dataset.
> But when I am trying to debug it under Visual Studio, I get an exception
> when calling conn.Open( ). The error message is "Failed to login user
> myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent
that
> account, if it fails to connect to my local MSDE? What can I do about
it?
> Please, I am not an administrator, so I need every detail.|||The local ASPNET Windows account is created automatically when you install
ASP.NET. This account is used by default as the security context for
ASP.NET applications.
You can either grant ASPNET access to SQL Server or reconfigure ASP.NET to
use a different account. See
http://support.microsoft.com/defaul...kb;en-us;316989 for details
on how to do this.
Hope this helps.
Dan Guzman
SQL Server MVP
"N Thorell" <NThorell@.discussions.microsoft.com> wrote in message
news:06CD83E4-9F83-4BE2-A695-652A7C4A7DF9@.microsoft.com...
>I just wanted to write a simple WebService to return a dataset.
> But when I am trying to debug it under Visual Studio, I get an exception
> when calling conn.Open( ). The error message is "Failed to login user
> myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent
> that
> account, if it fails to connect to my local MSDE? What can I do about
> it?
> Please, I am not an administrator, so I need every detail.
Friday, February 24, 2012
Extracting the sql query in the stored procedure in asp.net
Hi,
I have set programmaticaly as follows for sql dataadapter
Commandtext="name of stored proc "
commandtype="stored proc"
now I want the query in the stored proc which i will store in the string .is there any way to get the query from sp progrmmaticaly?
Swati
Usesp_helptext
Labels:
aspnet,
commandtext,
commandtype,
dataadapter,
database,
extracting,
follows,
microsoft,
mysql,
oracle,
proc,
procedure,
programmaticaly,
query,
server,
sql,
stored
Subscribe to:
Posts (Atom)