Help with anonymous authentication

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9iZQ==?=, May 3, 2007.

  1. 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.
    =?Utf-8?B?Um9iZQ==?=, May 3, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Um9iZQ==?=

    Aidy Guest

    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" <> wrote in message
    news:...
    > 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.
    Aidy, May 3, 2007
    #2
    1. Advertising

  3. 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" wrote:

    > 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" <> wrote in message
    > news:...
    > > 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.

    >
    >
    >
    =?Utf-8?B?Um9iZQ==?=, May 3, 2007
    #3
  4. =?Utf-8?B?Um9iZQ==?=

    Aidy Guest

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

    "Robe" <> wrote in message
    news:D...
    > 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" wrote:
    >
    >> 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" <> wrote in message
    >> news:...
    >> > 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.

    >>
    >>
    >>
    Aidy, May 4, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darren Oakey

    Anonymous login and Windows Authentication

    Darren Oakey, Oct 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,609
    Lyndon Hills
    Oct 29, 2003
  2. Curt_C [MVP]
    Replies:
    2
    Views:
    348
    Curt_C [MVP]
    Sep 21, 2004
  3. =?Utf-8?B?U2hhcmlm?=

    use anonymous but get get an authentication box

    =?Utf-8?B?U2hhcmlm?=, Sep 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    =?Utf-8?B?U2hhcmlm?=
    Sep 21, 2004
  4. Reporter
    Replies:
    3
    Views:
    464
    Mike Schilling
    May 12, 2007
  5. Replies:
    1
    Views:
    212
Loading...

Share This Page