.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 problem

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :ASP.Net

Hi, i have an application that make consecutive writings to the database, the problem is that sometimes it use BulkInsert others row insert and when different kind of inserts happens in less than 10 seconds i have an error "login failed for the user", if i wait for 20 or more seconds beetween the two kinds of insert it doesn't give the error.

Any idea of the problem.

Ps, when use the same kind of insert and have a lot of consecutive inserts there is no problem.


View Complete Post

More Related Resource Links

Problem with LayoutTemplate and the Login-control

Hi, I'm trying to make a login-form for my website, but i needed to customize the standard-layout, because the validators made the login-button move a couple of pixels to the right of the textfieldsWhen using the LayoutTemplate, I can't seem to get the login to work.. When adding a button with "Login" as the ID, shouldn't that button handle the loginprocess from the membership-providers validateuser-method?If not, and I'm supposed to handle the loginprocess myself? And if so, how do I get to the validateuser-method? I don't wanna have the method in two seperate places if I can avoid it..

Creating Login Page Problem

I doing a login page using visual c# and encounter some problem on it. my database got Username, Password, and UserType I want to create a login page redirect the user to different page based on their roles. It show that there is an error on the code (line 24). Any idea on create a login page that redirect the user to different page based on their roles?It shows this message :   this type or namespace name 'DataView' could not be found(are you missing a using directive or an assembly reference)Here the code, protected void Page_Load(object sender, EventArgs e) { string connectionString = "Data Source =.\\SQLEXPRESS;" + "AttachDbFilename=\"C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\DATA\\UserDB.mdf\";" + "Integrated Security=True;" + "Connect Timeout=30;" + "User Instance=True;"; System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(connectionString ); System.Data.SqlClient.SqlCommand cmd = conn.CreateCommand(); conn.Open(); } protected void Button1_Click(object sender, EventArgs e) { SqlDataSource sds = new SqlDataSource(); sds.SelectParameters.Add("Username", TypeCode.String, this.TextBox1.Text); sds.

Login by FBA and Licensing problem

My sharepoint 2010 server will use FBA for login ,do I need buy any user Cal ? Thx  

membership provider with custom login form problem / question

Hi all, I am using the .net membership provider, and I can get past the membership.validate user ok and into my secure page.   The problem I have is that when I reach the secured page, I have a login status control which isn't changing from login to logout.   Below is my login code:If Membership.ValidateUser(txtUsername.Text, txtPassword.Text) Then Response.Redirect("/auth/Default.aspx") If chkRememberMe.Checked Then FormsAuthentication.SetAuthCookie(txtUsername.Text, True) Else FormsAuthentication.SetAuthCookie(txtUsername.Text, False) End If Else lblLoginStatus.Text = "Oops! Login not found!" End If    Thanks in advance.

Forms Based Authentication - problem with custom master page and login page



I have successfully enabled and set up FBA (Forms Based Authentication) on my SharePoint 2010 Foundation server. The thing is that I need to customize the look and feel of the login page. I have successfully customized the page (and master page) to look the way I want, however, when I try to log in, I get the following error/message on the page:
"Forms Based Authentication on classic Web applications has been deprecated".

What I've done:
Made copies of /_layouts/simple.master and /_layouts/login.aspx and renamed the copies. The markup in the master page is MUCH simpler than the original, but I've kept all the ContentPlaceholders that I don't use (most of them) in a hidden <asp:Panel at the bottom of the page.

I've changed the web.config file:
<authentication mode="Forms">
      <forms loginUrl="/_layouts/loginCustom.aspx" />

So, I'm not getting any errors on the page until I try to log in. When I use the default settings (login.aspx and simple.master) it works just fine (but damn that page looks ugly!).

Does anyone know what I might be missing?

Update: I believe the reason it doesn't work is because my custom login aspx is not part of the Claims Based Web Application (because it's sitting

Login problem with existing browser window


Hi All,

We are developing ASP.net 2.0/C# web application.

Once Login is expired the page is redirected to login page automatically. again If I am trying to login with same window, login is not working. Login is working when the application is opened in new browser.

What is the problem and how can i fix that error?

Beta 2 - login problem


At login I get this message:

Exception Details: System.Data.SqlServerCe.SqlCeException: The column name is not valid. [ Node name (if any) = ,Column name = PasswordFailuresSinceLastSucess ]

And even on this site I can't find any sample of login code: http://www.asp.net/webmatrix/tutorials/16-adding-security-and-membership

After installing Beta 2 I only have problems for now :)


"403 forbidden" Error in my Custom login page, cant find problem

I Created a custom login page using Sharepoint Application page which is cofigured with FBA.  but every time redirect to http://testsp.max-perf.com/_layouts/DataQ.Extranet/test.aspx?ReturnUrl=%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F .  I have  Win2008 (not r2) and sp2010. Thank you.

Account login problem


I have some problems with sahrepoint 2010 account management...

In my windows 7 i have 2 accounts: an administrator account (let's call it "admin") and a standard user (called "reader"). In the SP2010 central administration i have correctly added both accounts as "managed accounts". In my site i have modified the "site permissions": "admin" account was already in the "[Site collection name] Owners" group, and i have added the "reader" account to the "[Site collection name] Visitors" group.

When i open a SP website i have to login: let's say i log in as "reader". Then i want to log in as "admin", so i select "Sign in as a different user" in the top-right corner of the page. Now when i insert username and password of the "admin" account, i get some kind of error, as if the password is wrong (but i get no message, just the same window again asking me for username and password). At the third attempt, i get the 401 UNAUTHORIZED page. But when i close the page a re-open it, i result logged in as "admin", without having to insert username and password!

Is this a normal behavior? Otherwise, what could be the problem?

login page problem



In login.aspx I have used login control to enter user name and password, the problem is: even my caps lock is off when I enter user name it prints in capital letters but size is small size (when I copy and paste in note pad or msword it paste in small letters not in capital letters), when I turn on my caps lock on and type - it prints in bigger size as if I am typing in capital letters.  

ex:  1. temp is my user name if my caps lock is off it shows like this TEMP (but size in smaller than 2nd one)

       2. if my caps lock is on is shows like this as if I am typing capital letters TEMP

what do you think the problem is how can I fix it?



Login problem with new asp site


 I am new to asp.net. I have created a test site and copied to www.eddiepricetest.com but when I try to login and create a new user account i get the below error. When I do this locally on my pc it works but when I copy to the web server i get the error. Any ideas?



Server Error in '/' Application.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the data

stsadm change in 2010? login as system account problem


I have installed SharePoint 2010 beta 2 on a HP Blade in a Domain Environment. SQL Server 2008 SP1 CU2 is on a seperate Blade. Installation and configuration went ok. Everything runs under my Domain-Admin Account (SQL, Farm, ...)

The first few sites went smooth, after a while i noticed that not my Domain-Admin Account was written in the top-right corner, but "System Account". I remembered that problem from MOSS 2007 and tried stsadm updatefarmcredentials. Result after 30 seconds of waiting:
Value cannot be null.
Parameter name: farm

To be exactly i tried: stsadm -o updatefarmcredentials -userlogin XXX -userpassword XXX

There is definatly no typo and i tried varios different things like with "" and without "", with -identitytype and withou, and so on..

When i change the Farm-Account at the GUI, to a normal Account, i see my Domain-Admin Account in the top right corner again instead of System Account. When i change back, the same problem occurs.

Im pretty sure i resolved the issue in 07 with the command written above. Did the syntax change? Do i have to use Powershell? It looks like i have to specify the farm somehow (even thou there is only one farm consisting of one server on which im running the command)

Of course i'd be happy for any other solution to th

Login problem with MySQL forms authentication


I can login in locally using the development server, but after uploading the files- including MySql.Data.dll and MySql.Web.dll - to my hosting server I can't. There is no errors, it just won't login. I can get records from my database, so I know it's not the connection.

Here is my Web.config

<?xml version="1.0"?>

    <clear />
    <add name="LocalMySqlServer" connectionString="server=db_server_name;database=tempdb;user id=user_name; password=my_password" providerName="MySql.Data.MySqlClient" />

    <customErrors mode="Off"/>

    <membership defaultProvider="MySQLMembershipProvider">
        <clear />
        <add connectionStringName="LocalMySqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwo

Login problem with multi website on a server.


I write 2 websites and deloy on a server, they're difference folder. A problem when I login on a website, then open 2nd site I see login cookie still keep in 2nd site. My system: Window server 2003, .Net 2.0, IIS. 

Login code:

FormsAuthentication.SetAuthCookie(dataUserName.Text, true);   


<authentication mode="Forms" >
<forms loginUrl="~/Login.aspx" timeout="2880"/>

Microsoft Sql Server 2008 r2 Login Problem


Hi guys....

              I am facing the problem to acess the Data Base.

              some time ago i am easily acess the data base by typing the server name(like and type the user id and password   from  web.config file but now i am find the error.like .

Login failed for user 'NSAdmin' (Microsoft Sql Server, Error:18456).

please anybody help me out to finding the solution of the problem asap.


Linked server login problem -- Msg 15007


I need to have an access database as a linked server, which can be queried from a web application.  It's all set up on an old machine with 2003 server and SQL 2005 express, but now I am trying to migrate to a new machine with 2008 everything.  The linked server itself was not a problem, but creating a login refuses to work.  I tried the following:

sp_addlinkedsrvlogin 'nameoflinkedserver', false, 'NT AUTHORITY\IUSR', 'Admin', NULL

which is roughly what worked on the old system.  Alas, it fails with:

Msg 15007, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 76
'NT AUTHORITY\IUSR' is not a valid login or you do not have permission.

That does seem to be a valid login; 'NT AUTHORITY\IUSR' is listed as one of the server's logins, and is the one that gives the web application access to the SQL server database itself.  I am logged in as administrator on the machine and can do everything else regarding SQL Server, so it's odd that I would not have permission for this.  Does anyone have a guess why this happens?

Using Login Form with Windows Authentication Problem


Hi all,

I have developed an Interanet web application using the windows Active directory authentication  if user find then it automaticaly authenticated working correctly now  my user wants the capability of being able to login to the intranet site as another user by providing the username and Password .  For example, Team lead needs to login  on other team memeber System to pefrom some task on his behalf  if he or she is not aviable in office .

I have created a standard MS Login Page.  However when I try to login on the page only by providing the Username system authenitcate the user ( not validating the password of that user)

My Web.config is shown below

            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        <authentication mode="Windows"></authentication>
        <identity impersonate="true"/>
            <allow users="*"/>
            <deny users="?"/>


Thanks for your help!

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