Board index » Web Programming » SQL connection

SQL connection

Web Programming318
I am building my first ASP .Net web app using VB .Net and I am getting the

error:



Login failed for user '(null)'. Reason: Not associated with a trusted SQL

Server connection.



Where in my program do I set the user or what do I need to configure? I was

starting to build a windows app and it works fine there. It is just

whenever I try to do an ASP app I get this message.



Thanks for the information and any help provided.



Brad


-
 

Re:SQL connection

ASP.Net runs under a different user account than executables, which

generally run under the Local System account. It sounds like your SQL Server

is configured to use Windows Only authentication, but that may not be the

case. When using a trusted connection, you must have a domain user account

that has the necessary permissions. On the other hand, if your SQL Server is

configured for mixed authentication, you can create a SQL Server account,

give it th3e necessary permissions, and use the User ID and Password in your

Connection String.



--

HTH,



Kevin Spencer

Microsoft MVP

.Net Developer

What You Seek Is What You Get.



"Brad" <ballison@ukcdogs.com>wrote in message

Quote
I am building my first ASP .Net web app using VB .Net and I am getting the

error:



Login failed for user '(null)'. Reason: Not associated with a trusted SQL

Server connection.



Where in my program do I set the user or what do I need to configure? I

was starting to build a windows app and it works fine there. It is just

whenever I try to do an ASP app I get this message.



Thanks for the information and any help provided.



Brad







-

Re:SQL connection

Kevin,



Thank you for the help. With some tweaking, setting up users and then

granting then db_owner access, it is now working.



Brad



"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com>wrote in message

Quote
ASP.Net runs under a different user account than executables, which

generally run under the Local System account. It sounds like your SQL

Server is configured to use Windows Only authentication, but that may not

be the case. When using a trusted connection, you must have a domain user

account that has the necessary permissions. On the other hand, if your SQL

Server is configured for mixed authentication, you can create a SQL Server

account, give it th3e necessary permissions, and use the User ID and

Password in your Connection String.



--

HTH,



Kevin Spencer

Microsoft MVP

.Net Developer

What You Seek Is What You Get.



"Brad" <ballison@ukcdogs.com>wrote in message

news:ebdSQ0KMFHA.4080@TK2MSFTNGP09.phx.gbl...

>I am building my first ASP .Net web app using VB .Net and I am getting the

>error:

>

>Login failed for user '(null)'. Reason: Not associated with a trusted SQL

>Server connection.

>

>Where in my program do I set the user or what do I need to configure? I

>was starting to build a windows app and it works fine there. It is just

>whenever I try to do an ASP app I get this message.

>

>Thanks for the information and any help provided.

>

>Brad

>









-

Re:SQL connection

You're very welcome, Brad! :)



--



Kevin Spencer

Microsoft MVP

.Net Developer

What You Seek Is What You Get.



"Brad" <ballison@ukcdogs.com>wrote in message

Quote
Kevin,



Thank you for the help. With some tweaking, setting up users and then

granting then db_owner access, it is now working.



Brad



"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com>wrote in message

news:OWl5r5KMFHA.2748@TK2MSFTNGP09.phx.gbl...

>ASP.Net runs under a different user account than executables, which

>generally run under the Local System account. It sounds like your SQL

>Server is configured to use Windows Only authentication, but that may not

>be the case. When using a trusted connection, you must have a domain user

>account that has the necessary permissions. On the other hand, if your

>SQL Server is configured for mixed authentication, you can create a SQL

>Server account, give it th3e necessary permissions, and use the User ID

>and Password in your Connection String.

>

>--

>HTH,

>

>Kevin Spencer

>Microsoft MVP

>.Net Developer

>What You Seek Is What You Get.

>

>"Brad" <ballison@ukcdogs.com>wrote in message

>news:ebdSQ0KMFHA.4080@TK2MSFTNGP09.phx.gbl...

>>I am building my first ASP .Net web app using VB .Net and I am getting

>>the error:

>>

>>Login failed for user '(null)'. Reason: Not associated with a trusted

>>SQL Server connection.

>>

>>Where in my program do I set the user or what do I need to configure? I

>>was starting to build a windows app and it works fine there. It is just

>>whenever I try to do an ASP app I get this message.

>>

>>Thanks for the information and any help provided.

>>

>>Brad

>>

>

>









-