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

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

Windows authentication login form issue

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :ASP.Net

Hi guys,

I have an application that requires windows authentication to login, the problem is that every time an user logs in under IE and win XP, the username is pre filled with the IP address of the server as instance and the username. I need to replace the server ip with  XXXX instance name instead of doing this manually.

Could anyone pleas help me out with this one?

Thanks in advance,


View Complete Post

More Related Resource Links

Create single custom login page for Windows Authentication and Form Based Authentication.


I want to create a custom login page for both Windows Authentication and Form Based Authentication.

I mean to I have to create only single login page for both authentication.

How can I create this kind of page?

G. Goyal

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!

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? 

windows authentication issue with different domain

Webservice(frame work 2.0 & VB.NET) connecting to SQL Server 2008 in Windows Authentication mode and WS configured on App pool with domain\user id credentials and granted full access to temp folder still getting the following error. System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\WINDOWS\TEMP\ixymjcwh.0.cs' could not be found error CS2008: No inputs specified at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence) at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.H

how do i create a windows form application login for to validate username and password from sql serv

 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

Multiple Windows Authentication options on login after Web App restore

Hi I have a question regarding SharePoint Foundation 2010 and backup / restore jobs... I'm doing nightly farm backups using PowerShell: Add-PsSnapin Microsoft.SharePoint.PowerShell Set-location $home Backup-SPFarm -Directory \\same-server\***** -BackupMethod Differential This morning I decided to try and restore a single web application, just to make sure it works. In Central Administration I selected the latest farm backup and then selected the node for the Web Application and choose restore (using option: Same configuration) because it's the same server. Restore process went fine, no failure messages, and I can see that it has restored the content I deleted for testing. BUT when I enter the site. I'm presented with a Login page (that you would see if you have also configured Forms Authentication for the same zone, which I have not) and the drop down box show two options: "Windows Authentication" and "Windows Authentication". Both let me use windows credentials to login so basically the login page is pointless and it wasn't there before. I should note: The Web Application was and is configured to use Claims Based Authentication and for Windows Authentication: Kerberos. Nothing for forms. Default sign in page. And I was never presented with this redundant login page before the restore. Anyone knows why this could be happening and how to solve it?? Than

HttpWebRequest Form Authentication Not Getting Past Login Page

Hey Guys,I am trying to use HTTPWebRequest to login to a site and then retrieve the page after login. However, it seems as if I can't get past the login. I also investigated with Fiddler and tried mimicking Fiddler almost completely and still no luck.Any idea what I am doing wrong?Thanks,Mohammed    Dim webRequest As HttpWebRequest Dim responseReader As StreamReader Dim responseData As String Dim postData As String = "login=testexpert@yahoo.com&password=testexpert" Dim cookies As CookieContainer = New CookieContainer() Dim requestWriter As StreamWriter Try 'post form data to page strUrl = "https://www.ideeli.com/login" webRequest = HttpWebRequest.Create(strUrl) webRequest.Method = WebRequestMethods.Http.Post webRequest.ContentType = "application/x-www-form-urlencoded" webRequest.CookieContainer = cookies webRequest.ContentLength = postData.Length requestWriter = New StreamWriter(webRequest.GetRequestStream) requestWriter.Write(postData) requestWriter.Close() 'recieve cookie webRequest.GetResponse().Close() 'now we send the cookie webRequest = HttpWebRequest.Create("http://www.ideeli.com") webRequest.CookieContainer = cookies responseReader = New StreamReader(webRequest.GetResponse.GetResponseStream()) responseData = responseReader.ReadToEnd() res

LDAP - directory entry issue with out user and password using impersonate and windows authentication

Hi All I am using the below code to fetch the user information from LDAP             DirectoryEntry entry = new DirectoryEntry("LDAP://DEV");             DirectorySearcher searcher =  new DirectorySearcher(entry);             SearchResult result;             searcher.Filter = "samaccountname=testuser";             result = searcher.FindOne(); here i am using windows authentication always and along with that when i enable the impersonate = true ,  the code fails at "result = searcher.FindOne();" with message "object reference not set to instance of an object "  also with the same code if i give the username and password along with the impersonate tag >> it works  or if i am using the user and password along with the DirectoryEntry  object then also it will work  but it fails with same user that i gave in impersonate tag / directory entry object with windows authentication enabled  and the  user logged to the application and no username and password tag in directory entry / impersonate tag  Interesting thing is that  in our development server ,  i am able to execute the same code with out user name p

Form based authentication Sharepoint 2007 gets redirected to login page

Hi We have sharepoint 2007 site deployed on Windows server 2008, IIS 7.0.  We extended the web application to enable forms based authentication referring to link http://msdn.microsoft.com/en-us/library/bb975136(office.12).aspx#MOSS2007FBAPart1_Intro, we selected Kerberos instead of NTLM, behavior is like, when user tries to login into the site using OOB login.aspx, user again gets redirected to the login page. We tried to extend the web application again but this time we selected NTLM, but this time farm account (also is application pool identity) is not able login and exhibits same behavior as above, but for other users we are able to login. Has anyone come across this behavior? can anyone please guide me in correct the behavior? Regards, RK  Radhakrishna

how to change the web application Database connection form Windows authentication to SQL Server acco

Hi, I have a web application created and Database connection authentication was given as Windows authentication. how can i change it to a SQL server account in MOSS 2007. Thanks in advance.

Cannot Login with Forms Based Authentication to SharePoint 2010 - Issue with the SecurityTokenServic

Please be advised I have followed the steps on http://donalconlon.wordpress.com/2010/02/23/configuring-forms-base-authentication-for-sharepoint-2010-using-iis7/. I have tried to fix the following issue for a week using different farms and SharePoint 2010 installations, however I am getting the following error when trying to authenticate using Forms Based into a Claims site: Cannot get Membership Provider with name FBARoleProvider The membership provider for this process was not properly configured. You must configure the membership provider in the .config file for every SharePoint process. 1. I am certain the membership provider is configured in the SecurityTokenServiceApplication webservice as I can manage users and roles in IIS7 using the SecurityTokenServiceApplication website. 2. I am certain that membership provider is configured in the both the Claims Web Application and Central Admin as I can manage users and roles in IIS7 using their websites. 3. I know the issue is the SecurityTokenServiceApplication service as I had to set <serviceDebug includeExceptionDetailInFaults="true" /> to get the error above. 4. I can log into the Claims Based Application using windows authentication, however I am unable to see the users on the people picker despite that I can see them from the application's site on IIS

Login issue using authentication mode="Forms"

Hi,I am using authentication mode="Forms" with ldap, i manage to login and logour fine but when user 1 is logged and when user2 logs, user1 gets the user2 session. Any idea why this might be happening? Here is some code:     <authentication mode="Forms">            <forms name="login" loginUrl="Login.aspx" />        </authentication>        <authorization>            <allow roles="auditor"/>            <allow roles="approver"/>            <allow roles="user"/>            <deny users="?"/>        </authorization>        <identity impersonate="true"/>protected Boolean ValidateUser(String strUsername, String strPassword)        {            //Return true if the username and password is valid, false if it isn't             &n

Windows Authentication install and the sa login


If you install SQL2005 and above with Windows Authentication does the sa login get created? If it does is it disabled?




Check out issue - authentication modal dialog on every checkout, Explorer View or Open With Windows



I got users that have an issue when trying to check out document, using the Explorer View or using Open With Windows Explorer.

Users are on Vista, IE 7 and Win 7, IE8

I have seen this Warning in the Application Event log:

"WMI ADAP was unable to retrieve data from the PerfLib subkey: SYSTEM\CurrentControlSet\Services\SSO\Performance\Library, error code: 0x80041009"

Any help would be very much appreciated!


Using Logon Form with Windows Authentication


I have created an Intranet site using windows authentication based on role membership.  It is working great.  My Web.config is shown below.

  <authentication mode="Windows" />
  <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" />
   <allow roles="D820\Developers, D820\IT, D820\Staff, D820\Providers, D820\Supervisors, D820\Directors, D820\Interns" />
      <deny users="?"/>

Now my user wants the capability of being able to login to the intranet site as another user.  For example, IT guy needs to login on a user's system to set some data.

I have created a standard MS Login Page.  However when I try to login on the page I get the message

Your login attempt was not successful. Please try again

I do not have a database (aspnetdb.mdf) storing user information but login against the active directory.  Can you use the login form with windows authentication without a database?

If yes, can you point me to an article that describes how to do it?

Thanks for your he

Website converts to windows authentication issue


I've been having an occasional issue with my website "converting" to site that requires windows authentication.  This happens every few months and the only way to fix it to recycle the application pool.

This issue is actually happening with a hosting company and my site is on a shared server.  I believe I have my own application pool and I'm able to recycle it myself using their web administration tools.  Fortunately,  I know how to fix and have the ability to do it myself but it is embarrassing when my site now longer works and I have a client email there is a problem.

Anybody have any ideas?  I'm running .NET 3.5 with latest SP.  Thanks!

Cannot login with Windows Authentication.


I am using MSSQL 2005 in Windows 7.

I login as 'sa', under security I deleted all the user accounts, including BUILT-IN\ADMINITRATOR and all windows accounts.

Now I could not login to MSSQL using windows authentication, and I have forgotten sa password.

Is there any way to login using windows authentication again? 

Any registry that I can edit to enable windows authentication?





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