Help with anonymous authentication


G

Guest

Hi,

I'm doing a survey through a web page using VS 2005 and I need that people
who want to participate don't have to identify them self.

Running the project inside the IDE it works perfectly but when I try to run
it from the web browser and I push the submit button I get the following issue

Login failed for user 'ROBE\ASPNET'.


Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'ROBE\ASPNET'.

Source Error:
Line 39: SqlDataSource1.Insert();

Stack Trace:


[SqlException (0x80131904): Login failed for user 'ROBE\ASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
command, DataSourceOperation operation) +401
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
values) +447
System.Web.UI.WebControls.SqlDataSource.Insert() +13
_Default.Button1_Click(Object sender, EventArgs e) in d:\Robe\My
Documents\Visual Studio 2005\WebSites\EncuestaInformatica\Default.aspx.cs:39
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
+107

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


Can someone help me?

Thanks,

Robe.
 
Ad

Advertisements

A

Aidy

Change your connection string so that you connect using SQL authentication;

uid=sqluser;pwd=yourpassword

What is happening is that you are using Windows Integrated security so your
connection uses the user the code is running as, which is your ROBE\ASPNET
user and they haven't been given the appropriate rights to access your
database.

So create a new SQL User and use their username/password instead.

Robe said:
Hi,

I'm doing a survey through a web page using VS 2005 and I need that people
who want to participate don't have to identify them self.

Running the project inside the IDE it works perfectly but when I try to
run
it from the web browser and I push the submit button I get the following
issue

Login failed for user 'ROBE\ASPNET'.


Exception Details: System.Data.SqlClient.SqlException: Login failed for
user
'ROBE\ASPNET'.

Source Error:
Line 39: SqlDataSource1.Insert();

Stack Trace:


[SqlException (0x80131904): Login failed for user 'ROBE\ASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
+170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
command, DataSourceOperation operation) +401
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
values) +447
System.Web.UI.WebControls.SqlDataSource.Insert() +13
_Default.Button1_Click(Object sender, EventArgs e) in d:\Robe\My
Documents\Visual Studio
2005\WebSites\EncuestaInformatica\Default.aspx.cs:39
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument)
+107

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


Can someone help me?

Thanks,

Robe.
 
G

Guest

Hi Aidy,

I've done what you told me but I get the same error.

Do I've to change the authentication mode or something else?

Thanks for your help,

Robe.

Aidy said:
Change your connection string so that you connect using SQL authentication;

uid=sqluser;pwd=yourpassword

What is happening is that you are using Windows Integrated security so your
connection uses the user the code is running as, which is your ROBE\ASPNET
user and they haven't been given the appropriate rights to access your
database.

So create a new SQL User and use their username/password instead.

Robe said:
Hi,

I'm doing a survey through a web page using VS 2005 and I need that people
who want to participate don't have to identify them self.

Running the project inside the IDE it works perfectly but when I try to
run
it from the web browser and I push the submit button I get the following
issue

Login failed for user 'ROBE\ASPNET'.


Exception Details: System.Data.SqlClient.SqlException: Login failed for
user
'ROBE\ASPNET'.

Source Error:
Line 39: SqlDataSource1.Insert();

Stack Trace:


[SqlException (0x80131904): Login failed for user 'ROBE\ASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
+170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
command, DataSourceOperation operation) +401
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
values) +447
System.Web.UI.WebControls.SqlDataSource.Insert() +13
_Default.Button1_Click(Object sender, EventArgs e) in d:\Robe\My
Documents\Visual Studio
2005\WebSites\EncuestaInformatica\Default.aspx.cs:39
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument)
+107

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


Can someone help me?

Thanks,

Robe.
 
Ad

Advertisements

A

Aidy

In Enterprise Manager right click your server and select Properties then the
Security tab and make sure "SQL Server and Windows" is selected.

Robe said:
Hi Aidy,

I've done what you told me but I get the same error.

Do I've to change the authentication mode or something else?

Thanks for your help,

Robe.

Aidy said:
Change your connection string so that you connect using SQL
authentication;

uid=sqluser;pwd=yourpassword

What is happening is that you are using Windows Integrated security so
your
connection uses the user the code is running as, which is your
ROBE\ASPNET
user and they haven't been given the appropriate rights to access your
database.

So create a new SQL User and use their username/password instead.

Robe said:
Hi,

I'm doing a survey through a web page using VS 2005 and I need that
people
who want to participate don't have to identify them self.

Running the project inside the IDE it works perfectly but when I try to
run
it from the web browser and I push the submit button I get the
following
issue

Login failed for user 'ROBE\ASPNET'.


Exception Details: System.Data.SqlClient.SqlException: Login failed for
user
'ROBE\ASPNET'.

Source Error:
Line 39: SqlDataSource1.Insert();

Stack Trace:


[SqlException (0x80131904): Login failed for user 'ROBE\ASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +734995

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String
newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean
redirectedUserInstance)
+170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
+28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424

System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496

System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82

System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111

System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
command, DataSourceOperation operation) +401
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
values) +447
System.Web.UI.WebControls.SqlDataSource.Insert() +13
_Default.Button1_Click(Object sender, EventArgs e) in d:\Robe\My
Documents\Visual Studio
2005\WebSites\EncuestaInformatica\Default.aspx.cs:39
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument)
+107

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5102


Can someone help me?

Thanks,

Robe.
 

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