.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

Need to solve Form Authentication Problem

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
Hi all, I have a web site with login page and other pages. For login page currently i put authentication mode = Form. Problem is, when login 2 diffenent user in same pc and 1 browser with 2 tab, first tab is 1 user and 2nd tab is another user. I used Form Authentication ticket ,so for each users has different tickets. After login the 1st user and create a entry , then 2nd user login and trying to create entry that time 2nd user ticket is reset to 1st user ticket. is it any way to avoid this issue? if anyone knows about this please give me your suggestion and example. Thanks S.Shangar  

View Complete Post

More Related Resource Links

Form based Authentication - OpenLdap problem

Hi everyone,   I try to set up FBA with LdapMembership provider.   I have configured web app + STS like this : <add name="LDAPMember" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" server="server" port="389" useSSL="false" connectionUsername="uid=portal_sharepoint,ou=people,dc=corp,dc=contoso,dc=com" connectionPassward="somthing" userDNAttribute="distinguishedName" userNameAttribute="cn" userContainer="ou=people,dc=corp,dc=carrefour,dc=com" userObjectClass="person" userFilter="((eduPersonOrgUnitDN=cn=portal_sharepoint,ou=applications,ou=organizations,dc=corp,dc=contoso,dc=com))" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" />   I can without problem use the people picker and get user information from it. But when i try to authenticate user i have an error that say : An exception occurred when trying to issue security token: The security token username and password could not be validated.   If i look my log on the ldap i see that all the time it's the portal dn that is used to authenticate user.   I

problem in form authentication with asp.net 4.0


Hi All,

we are upgrading the asp.net 2.0 web application to asp.net 4.0. we are using form authentication.

<authentication mode="Forms">
	<forms name=".ASPXAUTH" protection="All" timeout="30"  loginUrl="user/login.aspx"></forms>

	<deny users="?"/>

<location path="default.aspx">
			<allow users="?"/>


the site default page is default.aspx

in version 2.0, working fine with form authentication.

after the upgradion

whenever call website .com/" mce_href="http://www..com/">http://www.<domainname>.com, it is redirected to login page

.com/user/login.aspx?ReturnUrl=%2f" mce_href="http://www..com/user/login.aspx?ReturnUrl=%2f">http://www.<domainname>.com/user/login.aspx?ReturnUrl=%2f 

if we call .com/default.aspx" mce_href="http://www..com/default.aspx">http://www.<domainname>.com/default.aspx, it is working fine

How can i fix

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!

Commerce with ASP.NET: Leverage the Authentication and Form Validation Features of ASP.NET to Bolste


If you're planning to build an e-commerce site, you'll be pleased to see that ASP.NET makes it easier than ever. Existing controls can be used and extended to add a great deal more functionality than you might expect. In this article, forms-based authentication is used to verify the identity of users and make certain areas of the site, such as the check-out page, inaccessible to unauthorized users. The power and flexibility of validation controls are demonstrated using the CustomValidator control to connect to a Web Service that verifies addresses. A shopping cart is then implemented in ASP.NET using the DataGrid, and finally, credit card authorization and billing are performed.

Jason Lefebvre and Robert Lair

MSDN Magazine August 2002

c# form problem with list item


I've got a c# form containing a listbox how ever i cant get

listbox1.items.Selected      to work



neither work. both not giving me the option for .selected nor selectedvalue

how does this work on c# forms as it works the above way on webforms....

Windows authentication login form issue


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,


Form authentication by using 2 different machine



          i want to use form authentication.i have 2 different application.both are at different machine.i want to use common form authentication. suppose i have 2 application called "app1" and "app2".

There is one form called CElaunch.aspx page in app2.and i want to use this page in app1. we cant navigate the this page directly it should be ask to login page when we open directly. login page is from app1.

app2 web.config file

<authentication mode="Forms">
      <forms loginUrl="http://slx75pc/SlxClientSC73/Login.aspx" domain="configengine.com" protection="All" timeout="30"
    name=".SLXAUTH" path="/" defaultUrl="default.aspx" requireSSL="false" slidingExpiration="true"
    cookieless="UseDeviceProfile" enableCrossAppRedirects="true"/>

How can I solve this problem?::Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.Cryst


I upgraded my web application from visual studio 2003 to 2008. When I want to create a report in visual studio 2008 and receiving this error at runtime. I am able to compile but when runnning thats when I am getting this error.

How can I solve this problem? please help.

Compilation Error

Server Error in '/IRPSDEV' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\irpsdev\9e97e0a9\94a2ecd\assembly\dl3\151eb571\00df56e1_6064c201\CrystalDecisions.Web.DLL'

Source Error:

Line 161:        
Line 162:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 163:        private global::CrystalDecisions.Web.CrystalR

How to solve the problem " FAILED TO LOAD udRBIctrls.ocx" Your version may be outdated??

I am getting the error message "Failed to load control 'udspinbutton'from udRBIctrls.ocx.Your version of udRBIctrls.ocxmay be outdated.Make sure you are using version of the control was that was provided with version". I have windows server 2008 64-bit o/s. I have installed my application on it. But in the application when i click few of the tabs of my applicaiton the above error message is being shown. I have searched the internet for the file , but didnt find it on the internet. Please help me to solve the problem.   

POST from html form viewstate problem

<p> Hi all, I have a website where people need to pay for a specific download (.pdf file). After they payed they get the download(A). My payment-provider can do a HTML-Postback to the site i want, for each succesfull payment. So the idea is that if someone payed, they do a postback to my server with a couple of parameters, so i can know that that specific email address has payed, and they get the download. I tested localy with a .html file on my desktop to postback a set of parameters to my local asp.net website. But in ONLY works if i include the __VIEWSTATE in my html file. And i cant get rid of the viewstate in my HTML of the aspx page. >test.html: <html><head></head><body> <h1>Dit is een test</h1> <form id="form1" action="http://localhost:25659/WebForm1.aspx" method="POST"> <input id="Button1" type="submit" value="submit!"/> 'IT ONLY WORKS IF I INCLUDE THE NEXT LINE: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjA0OTM4MTAwNGRk" /> </form></body></html> Has anybody an idea to acomplish my goal? Maybe i can get some info about the postback in my global.asax? or create a HttpHandler for .html files? Anyone?   Thanks in advance, Vincent   </p>

Form authentication and custome provider

hello frndsi am developing security module in asp.neti am using form authentication along with login control and create user control provided by asp.net.Now, as u guys know that form authentication create aspnet_users table in the database which have limited columns.i also want to maintain additional user information such as address, city etc in the database.how can i achive this?shall i use another user table? if yes then how? and how to synchronize it with aspnet_users table?if instead of aspnet_users table, i should use only user table then how to validate user from login control provided by asp.net?Please guide me or provide me with an example, how to implement this.Thanks in advanceRegardsVipul 

Can you solve this T-SQL problem?

Who can come up with a good T-SQL solution to this problem? http://ask.sqlservercentral.com/questions/17499/phil-factor-speed-phreak-challenge-6-the-stock-exchange-order-book-state-problem Johan Åhlén http://blogical.se/blogs/jahlen  

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

namespace of fields problem when creating form template from xml?

I created a form template from a predefined xml, where I do not have any namespace. Later I added more fields. The output xml of the form is for the fields from the xml they have not prefix, for those added later, they have prefix my. I already have them all done. How can I make them consistent to have prefix my? Is there any options in InfoPath to turn on or off the prefix my?   thanks,

ListData.svc form library problem

Hey, I can use this listdata.svc/Tasks?$select=title for a list. but I can't use it $select=name/Name for a form library, it saids "web page can't be found". but if I remove $select=name it can be displayed. Does anybody have idea about $select columns for a form library? Thanks in advance! Lindyhttp://www.dreamingcatstudio.com

First time facing this problem in aspx page how to solve this..go to now

Hi . We have developed an asp.net application in Visual Studio 2008 with built in crystal report version =10.5.3700.0 , which is working fine in our local server. Our hosting server has crystal report file version =, Which is running on windows server 2008 (x64) with IIS 7. On load my crystal report aspx page am getting the following error. Error in File UNKNOWN.RPT: The request could not be submitted for background processing. 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.Runtime.InteropServices.COMException: Error in File UNKNOWN.RPT: The request could not be submitted for background processing. Source Error:  Line 32:         string user = ConfigurationManager.AppSettings["Userid"]; Line 33: Line 34:         crReportDocument.Load(Server.MapPath("CrystalReport.rpt")); Line 35: Line 36:         crConnectionInfo.ServerName = Server1; Source File: d:\inetpub\vhosts\xxxx.com\httpdocs\DT\Default.aspx.cs    Line: 34  Stack Trace:  [COMException (0x800002ad): Error in F

Forms Authentication - IE problem

Hi folks,I already implemented some kind of Forms Authentication. I got the following problem - When I'm using IE(7, 8) ONLY (FF, Opera, Chrome - they are OK) it is impossible to to get logged and get redirect to specified page from the Login.aspx. This problem occurs ONLY with IE. After passing some validations and creating ticket the Login page is reloaded again, and NO redirect to Default page exists. Address bar consists always this string:      http://localhost:3706/Login.aspx?ReturnUrl=%2fdefault.aspx  In Global.asax - HttpContext.Current.User is ALWAYS NULL under IE.Here is my code implementation:Web.config:<authentication mode="Forms">   <forms defaultUrl="Default.aspx" loginUrl="Login.aspx" protection="All" timeout="30"> </forms> </authentication>  <authorization>    <deny users="?"/> </authorization><!-- Allow anonymous access (non-Forms login) to the Images folder --> <location path="Images">   <system.web>      <authorization>          <allow users="*"/>      </authorization>   </system.web> </location>Global.asax:protected void Application_AuthenticateRequest(object sender, EventArgs e) {    // look if any security information exists for this request    if (H
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