Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SQL connection

Reply
Thread Tools

SQL connection

 
 
Brad
Guest
Posts: n/a
 
      03-24-2005
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


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      03-24-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
 
 
 
 
Brad
Guest
Posts: n/a
 
      03-25-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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
>>

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      03-25-2005
You're very welcome, Brad!

--

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Brad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>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
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
Do the Self-Paced Training Kits: Microsoft SQL Server 2000 include Eval copy of SQL Server? Brian Whiting Microsoft Certification 2 12-29-2005 04:24 AM
How to perform cleanup for javax.sql.DataSource, like we do for java.sql.Connection HalcyonWild Java 2 12-19-2005 08:54 AM
DBI SQL column datatype not jiving with SQL statement requirement dna Perl 1 01-18-2004 04:15 PM
Re: SQL statement working in SQL Server but not in .aspx.cs page William \(Bill\) Vaughn ASP .Net 0 08-21-2003 10:41 PM



Advertisments