Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

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

Hi everybody,
I am using asp.net and sql server database to develop a website
I am using Windows NT integrated security instead of username and
password
in web.config i added the connection string as
<appSettings>

<add key="ConnectionString" value="workstation id=JABBAR;packet size=4096;user id=jabbar;integrated security=SSPI;data source=SERVER;persist security info=False;initial catalog=BRYGOS" />
</appSettings>

and also I added
<system.web>
<identity impersonate="true" />
</system.web>

but when i launch the web page i am getting error

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

can anybody suggest me exactly what to do
[843 byte] By [jabbarsb] at [2007-11-11 7:52:21]
# 1 Re: Login failed for user (null). Reason: Not associated with a trusted SQL Server c
Is SQL Server installed on your web server or a remote machine?
pclement at 2007-11-11 23:13:38 >
# 2 Re: Login failed for user (null). Reason: Not associated with a trusted SQL Server c
Dear jabbarsb,

Check under which user id your web site is running and whether that user having access to your SQL Server i.e. that user should have corresponding user in SQL Server.
egurdarshan at 2007-11-11 23:14:33 >
# 3 Re: Login failed for user (null). Reason: Not associated with a trusted SQL Server c
the following link may be helpfull to you
http://msdn2.microsoft.com/en-us/library/bsz5788z.aspx

All the Best!
krishna
vcs at 2007-11-11 23:15:32 >