"your login attempt was not successful" Please try again

I have a web server and a database server.

I am installing a web application on the web server and the database on the database server.

The web application is a .net applicaton with the .net login control.

No matter how I configure this, I get a message
"your login attempt was not successful" Please try again

when I login.

If I put the website and sql server on the same computer, I can get it to work just fine.

Both servers are members of a domain.

anyone have any ideas?

Thanks
LVL 1
lefty431Asked:
Who is Participating?
 
guru_samiConnect With a Mentor Commented:
Just to be sure...your Server has Sql Server authentication enabled right...?
I mean it is not set to just windows authentication but is set to mix-mode.

I did not get your last question.
0
 
guru_samiCommented:
Make sure the connectionString used by membership provider in web.config is correct.
Some troubleshooting tips here: http://www.codeproject.com/KB/aspnet/LoginControlError.aspx
If it does not help please provide your web.config code here.
0
 
lefty431Author Commented:
here is the connection string

<connectionStrings>
        <remove name="companynameConnectionString" />
            <remove name="LocalSqlServer" />
        <add connectionString="Server=10.1.0.44;Database=user;User ID=companydomain\user;Password=!password!" name="companynameConnectionString" />
            
                  </connectionStrings>

on the SQL server, I have a database..  there is a database user called "user" and the password is "!password!"

I've tried this using domain username, local username, Intergrated, SQL.  you name it, I think I might have tried everything except what works..

these are both brandnew 2008 R2 Servers.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
guru_samiCommented:
Ok so you are not able to connect at all to the Database...i mean none of your database operations work or just the membership data access is failing?
0
 
lefty431Author Commented:
whenI open the webpage, I get the login screen.

when I type the login informaiton, I get the message posted.

so I can't get any further.

I have the same system setup all on one server and it works. I used IIS to configure the connection string.
SQL authentication.   I created a login in SQL.  Then I created a login on the database and pointed it to the sQL login.

then I when to IIS and picked SQL authentication and just type in the credentials from the SQL user.

everything works.

now I have deplying into a different place with two servers.  Trying the steps above and replacing Localhost with the server's IP address (which I thought would work) doesn't.

0
 
guru_samiCommented:
For Troubleshooting...
1: Drop a GridView on the login page
2: Add a SqlDataSource and configure it using your remote server and "Select * from aspnet_Users"
3: bind that SqlDatatSource to your GV.

Mostly, you will get an error in step 2 if when you try connecting using your sql use credentials.

0
 
lefty431Author Commented:
That is way above what I do.  I'm not really a programmer.

Any other way we can accomplish that?

Sorry
0
 
guru_samiCommented:
I want you to connect to your database and display some data on your login.aspx itself. One was is what I suggested. you can do it any other way you are comfortable with.
Or
Here is what a link of what I said earlier, in action:
http://www.asp.net/data-access/tutorials/querying-data-with-the-sqldatasource-control-cs

Follow step 2 and step 3.
In step2, you can select appropriate connectionsString (Figure 7) or create a new connection.
0
 
lefty431Author Commented:
is it true that if the database wasn't connected the login screen woudn't show?
0
 
guru_samiCommented:
Not necessarily. It will show if the page load successfully. i.e. there weren't any errors processing that page.
If there were, you will get some error message.

why did the question arise?
0
 
lefty431Author Commented:
well, I was just trying to see if it is a connection issue, or a permission issue...

I am able to telnet port 1433 successfully from one server to the other..  

0
 
lefty431Author Commented:
I am unable to do anything suggested....   not for lack of trying either..  sorry
0
 
guru_samiCommented:
Don't worry, coz i might be wrong as well, pointing you in wrong direction (guessing)

What I wanted you was to put this on your login.aspx page:

    <asp:GridView ID="GridView1" runat="server"
        DataKeyNames="ApplicationId,LoweredUserName"
        DataSourceID="SqlDataSource1">
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:companynameConnectionString%>"
        SelectCommand="SELECT * FROM [vw_aspnet_Users]">
    </asp:SqlDataSource>

Make sure you have companynameConnectionString in your web.config.
Now run your login.aspx and see if any errors are thrown.
0
 
lefty431Author Commented:
Login failed for user 'clipper'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'clipper'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[SqlException (0x80131904): Login failed for user 'clipper'.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +6244425
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2811
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +53
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +248
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +6260362
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +6260328
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +354
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +703
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +54
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +6261592
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +81
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1657
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +88
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6265031
   System.Data.SqlClient.SqlConnection.Open() +258
   System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +53
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +188
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +573
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +161
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2782566
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +27
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +261
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +95
   System.Web.UI.Control.EnsureChildControls() +146
   System.Web.UI.Control.PreRenderRecursiveInternal() +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927
0
 
guru_samiCommented:
So there you have the error.
Is "clipper" the user, with permission to access the server database?
0
 
lefty431Author Commented:
clipper is the user I added to the sql server.

I added the login first.  then I added a user to the database.
0
 
guru_samiCommented:
Interesting...Try this...
Open Sql Server management studio and try connecting it to your remote server using "clipper"'s user credentials.
See if you still get the same error or allowed to login.
0
 
lefty431Author Commented:
stand by
0
 
lefty431Author Commented:
ok.  so that failed.  

however there is a login called clipper

it isn't a db owner or anything. . should I change that?

"master" is the default db.  should I change that to my db?
0
 
guru_samiCommented:
yes make it a db_owner to your users db.
0
 
lefty431Author Commented:
so it is still failing..  

what a databaser have access to open  SQL Server Manager?

0
 
lefty431Author Commented:
it is in moxed mode....

0
 
lefty431Author Commented:
so how do I get that user account the ability to login?

I even just gave it  serveradmin under rules.  it was just public
0
 
guru_samiCommented:
Ok how about connecting to the server using your admin credentials ...and create a new login from scratch:
http://publib.boulder.ibm.com/infocenter/cqhelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearquest.install_upgrade.doc/install/t_cr_sql_logins_05.htm

Or
Do you have any other working login, i mean other than clipper?
0
 
lefty431Author Commented:
if I change it to windows authentication i can get in just fine
0
 
lefty431Author Commented:
its 2008 server.  same procedure?
0
 
guru_samiCommented:
Check the user's status:
1: Connect to your server
2: Security->Logins-> clipper -> RightClick-> Status
See it has permission to connect and also is enabled.
0
 
lefty431Author Commented:
Yes.  Grant and Enabled for both.  

the last box under Locked out is grayed out.
0
 
guru_samiCommented:
Ok go with creating a new one....the steps should be pretty much be the same for 2008.
0
 
lefty431Author Commented:
ok.  I am going to work on this tonight.  see if I can get anywhere with it.  what I  pain..  

Ill keep you posted.

thanks

0
 
guru_samiCommented:
Sure.
Don't select the options to 'Enforce password expiration' and 'User must change password at next login' option while creating login.
0
 
ina_donCommented:
If I understand you well, are you saying that you are able to connect to the database server from the application server using SQL Management Studio on the application server when you logon using windows authentication?

Are you able to logon with clipper using SQL Management Studio from the database server itself?
0
 
lefty431Author Commented:
So I put the SQL server in SQL authentication mode from mixed and now all works???  Not sure what the problem was but it is fixed...
0
 
Kumaraswamy RCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.