Solved

"your login attempt was not successful" Please try again

Posted on 2010-09-17
35
807 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:lefty431
  • 18
  • 14
  • 2
  • +1
35 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 33702981
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
 
LVL 1

Author Comment

by:lefty431
ID: 33703048
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 33703086
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
 
LVL 1

Author Comment

by:lefty431
ID: 33703115
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 33703197
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
 
LVL 1

Author Comment

by:lefty431
ID: 33703282
That is way above what I do.  I'm not really a programmer.

Any other way we can accomplish that?

Sorry
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 33703371
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
 
LVL 1

Author Comment

by:lefty431
ID: 33703681
is it true that if the database wasn't connected the login screen woudn't show?
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 33703727
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
 
LVL 1

Author Comment

by:lefty431
ID: 33703765
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
 
LVL 1

Author Comment

by:lefty431
ID: 33703995
I am unable to do anything suggested....   not for lack of trying either..  sorry
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 33704067
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
 
LVL 1

Author Comment

by:lefty431
ID: 33704125
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 33704165
So there you have the error.
Is "clipper" the user, with permission to access the server database?
0
 
LVL 1

Author Comment

by:lefty431
ID: 33704198
clipper is the user I added to the sql server.

I added the login first.  then I added a user to the database.
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 33704853
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
 
LVL 1

Author Comment

by:lefty431
ID: 33704937
stand by
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:lefty431
ID: 33704972
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 33705003
yes make it a db_owner to your users db.
0
 
LVL 1

Author Comment

by:lefty431
ID: 33705034
so it is still failing..  

what a databaser have access to open  SQL Server Manager?

0
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
ID: 33705101
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
 
LVL 1

Author Comment

by:lefty431
ID: 33705123
it is in moxed mode....

0
 
LVL 1

Author Comment

by:lefty431
ID: 33705173
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 33705180
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
 
LVL 1

Author Comment

by:lefty431
ID: 33705192
if I change it to windows authentication i can get in just fine
0
 
LVL 1

Author Comment

by:lefty431
ID: 33705197
its 2008 server.  same procedure?
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 33705215
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
 
LVL 1

Author Comment

by:lefty431
ID: 33705227
Yes.  Grant and Enabled for both.  

the last box under Locked out is grayed out.
0
 
LVL 41

Expert Comment

by:guru_sami
ID: 33705237
Ok go with creating a new one....the steps should be pretty much be the same for 2008.
0
 
LVL 1

Author Comment

by:lefty431
ID: 33705257
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 33705282
Sure.
Don't select the options to 'Enforce password expiration' and 'User must change password at next login' option while creating login.
0
 
LVL 5

Expert Comment

by:ina_don
ID: 33709205
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
 
LVL 1

Author Comment

by:lefty431
ID: 33709229
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
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 33709941
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 33709943
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now