.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

login fails for (some) users.

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :ASP.Net

Dear All,

My site (asp.net 2.0 c#)  has 3 login fields, Group, User and Password.  I use forms authentication with the following authentication section in my web.config :

    <authentication mode="Forms">
              name =".LoginCookie"

Most of my users can login no problems, but for about 1 in 5 of them, they receive no error message at all and are thrown immediately back to log in page.

Every login attempt is written to a security log and according to that they passed my own inbuilt validation,

View Complete Post

More Related Resource Links

Forms based users being prompted for windows authentication login for My Sites photos in user lists

Here's an issue I didn't see coming for our forms based authentication users. 

We have a web application extended to an external url to handle forms based authentication for users outside of our domain. Our setup looks like this...

Internal Users/Windows Authentication - moss.domain.com
External Users/Forms Based - mossext.domain.com
My Site for Internal Users - mysites.domain.com

When our forms based users are accessing user lists, or discussion pages that display user pictures, they are getting a windows authentication login for our internal users (mysites.domain.com) who have populated their my site with personal photo.

How do we fix this? 

SharePoint 2010 AD FS 2.0 Integration - login works then fails, looping back to the adfs server

Hello, I setup SharePoint 2010 Claims auth with AD FS 2.0 following this post: http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx.  I have no access to the ADFS server, but I think they followed the steps as outlined.  If I do an iisreset (or just recycle the app pool of the SharePoint site) I can login successfully using the remote credentials.  Also I can under security in SharePoint search for and find users and roles from the remote ADFS server. If I close my browser, open a new browser and go to the site I am prompted to login again (this is fine).  I do, using the same credentials, and the login fails because I am redirected between the SP and ADFS servers until the ADFS server stops the redirecting.  I have been doing some digging and I found this post: http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx, which describes the situation I have in point # 3 at the bottom.  I have tried setting the token time out as low as 1 second but this hasn't helped. I have also, just to see, tried setting all the other lifetime settings to 1 second - but no luck.  Because the initial login works I think the setup is correct, but something is maintaining some state that is causing the loop

Login goes to Sql server for users and to sqlExpress for roles

Hi all,I have a site witl forms authentication using te login control. I altered my sql server, I added a connectionstring and used the connectionstring in both, <rolemanager> and <Membership>. That part of the web.config is listed below.The pronlem is that the login control goed to SQLserver to check the users and their passwords, but it goed to the SQLExpress database for the roles..... who can help me because it's driving me crazy!!!!!!<connectionStrings>    <clear/>    <remove name="Conn"/>    <add name="Conn" connectionString="Server=SERVER;Database=DBNAME;User Id =USERNAME;Password=PASSWORD;Integrated Security=False"                       providerName="System.Data.SqlClient"/>    <remove name="LocalSqlServer"/>    <add name="LocalSqlServer" connectionString="Server=SERVER;Database=DBNAME;User Id =USERNAME;Password=PASSWORD;Integrated Security=False" providerName="System.Data.SqlClient"/>  </connectionStrings>  <system.web>    <membership>      <providers>     &nbs

PassThrough authentication fails: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I've tried it with every AuthenticationMode! But no one seems to work correctly in my case. I thought that PassThrough should work with a preset User ID and password. This would be enough for the moment, but even this doesn't work!! With WindowsCredentials I get the following error: The Property with name 'SsoApplicationId' is missing on the LobSystemInstance. SsoApplicationId I tried to set this with the SharePoint SSO but I've no such services. How can I set this just for the current WindowsCredentials (of the current Sharepoint user)? With RevertToSelf I get the following error: "An error occurred while retrieving data from MyLOBInstance. Administrators, see the server log for more information." The server log contained no useful information for me. With PassTrough I get the following error: "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: <local machine>]" Why are the lines <Property Name="RdbConnection User ID" Type="System.String">MyDomain\Administrator</Property><Property Name="RdbConnection Password" Type="System.String">mYpAssWoRd</Property> being ignored? Everything (MOSS, SQLServer,...) is on a single machine, so I don't need to activate Kerberos, do I? <LobSystemInstance Name="SEPInstance1207">   <Properties>    <Property Name="DatabaseAccessProvider" Type="Micros

Reading users department fails


I'm trying to get the currents users department name in a Sharepoint feature, but I get an error when i try to runthe code :  Here the code: 

private string GetUserIdent(SPWeb web, SPSite site)


track users without login info


Hi there. This should an easy question.

I'm trying to build the chat (it is already built here - http://www.codeproject.com/KB/aspnet/WebChatAsp35LinqAjax.aspx)

The only thing I want to change is: remove login control.

Instead of login I want to assign random usernames to people who open my webpage. Also, when somebody closes page and reopens it again in, say 10 minutes, I want this user to have the same username and data.

This is kinda easy, just need to get an idea.

Thank you

how to make login control allow users to login by either username or email address


how to make login control allow users to login by either username or email address 

Sharepoint asks to login three times then fails



Hi All,


Sharepoint 2007 problem. I've recent done a DCPROMO demote on my sharepoint server (and then tried re-promoting it to see if it makes a difference)

When using Internet explorer (version 8) it asks for the username/password three times, and then says 'you are not authorized to view this page'

However, if I use either Firefox, or google chrome, it asks for username and password once, and then works fine.

Does anyone have any ideas? 

Many thanks,


Membership Provider - Login fails after change in database name


Hi Experts,

I am in the process of deploying an website developed in ASPNet 2.0 and using the login control and membership provider features. The site was deployed fine and was working perfectly till I changed the database name and user name to access the database. I changed the accordingly in the web.config to point to the new database. Everyting is working file except when the user tries to login into the website.

The error log says that login failed because it is trying to open the old database.

Any idea how I can solve the issue? Thanks for your help.



create a custom login WebPart for FBA users



I've configured FBA in my SharePoint 2010 site.And i've added the users in my database.Now i want to create a custom login WebPart.How do i check the user credentials.Please help me.

Create a login that can grant permissions to other users?


Ive been asked to create a SQL Login for a developer that can grant permissions to other users. 

Anyone know how to do this?



Login Fails


I am using the ASP login control. It was working correctly, then it started to fail the first time I would log in, then ir will  succeed the second time. I have tried it several times and I am using the same credentials. Any one run into this?

Settting password expiry to login/users without domain policy dependency


Hi Friends,

I would require your help,in setting password expiry for login/users.But this shouldnt have any dependency with Windows Domain users expiry policy.For example our domain user expiry policy 45 days but we want sql server login/users password expiry to be 180days.For any clarifications




Active Directory Issue : Validation fails for newusers and few randon users


Hi All,

We started observing this behaviour from past couple of days. Even the AD Validation fails for the newly created users. So there are few users for whom the Active Directory authentication fails. We are not sure why it is happening. The code and configuration is not a problem since the same code works for other environment which has different domains. Has some one seen this kind of behaviour before. Infact we had a service to authenticate users so initial culprit was the service but now we have minimize the problem domain to AD. I created a simple application which JUST VALIDATES the user against the AD but still the same problem.  I am getting very generic error which does not seem to help in debugging.

Any help will be highly appreciated.

Event Type:   Information

Event Source: ASP.NET 2.0.50727.0

Event Category:       Web Event

Event ID:       1315

Date:            4/5/2011

Time:            3:35:42 PM

User:            N/A

Computer:     TRNMCS001


Event code: 4006

Event message: Membership credential verifi

Moving MySites to a users new login



I could not find a MOS 2007 forum, so I will try it here, sorry!?

We have recently changed user login (username) and not by rename but new logins!
Now I want to move the "old" MySites from the "old" username to the new username!

Anyone has a solution!?

Linked server fails -Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. with SQL2008R2


Hi, Kerberos seems to be malfunctioning with SQL2008R2.


I have a new dev SQL2008R2 server called BDSDEV2 and an upgraded(in-place) SQL2008R2 server BDSTEST2.

From BDSDEV2 , I can successfully issue a linked server query to BDSTEST2

select * from bdstest2.eis_prod.dbo.wcs_agent


But from my client in SSMS, connected to BDSDEV2  , the double hop is failing to BDSTEST2 for same query 

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.


I have another BDSDEV1 server, which is SQL2008 and there double hop IS WORKING

From my client in SSMS, connected to BDSDEV1  ,I can successfully issue the query to BDSTEST2 .


The service accounts  for MSSQLSERVER are both local admins on their servers and sa's

I have confirmed SPN is OK 

This is from BDSDEV2 - sql2008r2 server.

C:\Program Files (x86)\Resource Kit>setspn -L tsqlssvc

Registered ServicePrincipalNames for CN=TSQLSSVC,OU=SvcAcct,DC=corp,DC=saif,DC=c


MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend