newbie to asp.net...

D

dave

I'm using XP pro and devloping web app using studio 2003. This is very basic application , just trying to connect to database (sql 2000) which is hosted somewhere else.
when i hit debug button i am getting following error..

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

After searching on google I added following link in my web.config file..
<identity impersonate="true" />

Now i m getting following error...

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Snippet from web.config file...

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<appSettings>

<add key="connectionstring" value="data source=210.120.235.69,4656; initial catalog=mydb; User ID=user1;pwd=password; Integrated Security=SSPI" />

</appSettings>


<system.web>

<identity impersonate="true" />

<compilation defaultLanguage="vb" debug="true" />

<customErrors mode="RemoteOnly" />

<authentication mode="None" />

<authorization>

<allow users="*" /> </authorization>




</system.web>

</configuration>

snippet from .aspx file...

Dim connstring as string connstring = ConfigurationSettings.AppSettings("ConnectionString") 'i checked value in connstring..it shows correct value tht i had stored in web.config file..

Dim Source As DataView

Dim MyConnection As SqlConnection

Dim MyCommand As SqlDataAdapter

MyConnection = New SqlConnection(connstring)

MyCommand = New SqlDataAdapter("select * from M_PhonePrice", MyConnection)

Dim ds As New DataSet myCommand.Fill(ds, "M_PhonePrice")

Source = New DataView(ds.Tables("M_PhonePrice"))

I'm running application on localhost...and integrated windows authintication is on IIS setting...If i turn off , i cant compile , debug and run on localhost...Anonymus access is also checked on in IIS setting...

Can any one help me to solve out this problem..

thanx in advance..

dave
 
G

gh0st54

if you use userid and password in your connection string you don't really need intergrated security

remove integrated security and make sure that the user id and password can connect to the database




I'm using XP pro and devloping web app using studio 2003. This is very basic application , just trying to connect to database (sql 2000) which is hosted somewhere else.
when i hit debug button i am getting following error..

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

After searching on google I added following link in my web.config file..
<identity impersonate="true" />

Now i m getting following error...

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Snippet from web.config file...

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<appSettings>

<add key="connectionstring" value="data source=210.120.235.69,4656; initial catalog=mydb; User ID=user1;pwd=password; Integrated Security=SSPI" />

</appSettings>


<system.web>

<identity impersonate="true" />

<compilation defaultLanguage="vb" debug="true" />

<customErrors mode="RemoteOnly" />

<authentication mode="None" />

<authorization>

<allow users="*" /> </authorization>




</system.web>

</configuration>

snippet from .aspx file...

Dim connstring as string connstring = ConfigurationSettings.AppSettings("ConnectionString") 'i checked value in connstring..it shows correct value tht i had stored in web.config file..

Dim Source As DataView

Dim MyConnection As SqlConnection

Dim MyCommand As SqlDataAdapter

MyConnection = New SqlConnection(connstring)

MyCommand = New SqlDataAdapter("select * from M_PhonePrice", MyConnection)

Dim ds As New DataSet myCommand.Fill(ds, "M_PhonePrice")

Source = New DataView(ds.Tables("M_PhonePrice"))

I'm running application on localhost...and integrated windows authintication is on IIS setting...If i turn off , i cant compile , debug and run on localhost...Anonymus access is also checked on in IIS setting...

Can any one help me to solve out this problem..

thanx in advance..

dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top