.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 pages without using Forms authentication

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


I want to create a website that a user can logon and view their data. They should also be able to logout. I'm wondering how to achieve this WITHOUT using the Membership provider api provided by Microsoft. This is what I think should happen , please advise me if I'm incorrect.

1. user enters name and password and clicks button.

2.If username and password are correct the user is redirected to a webpage with their details.

3.A session is created.

4.The user logouts and the session is deleted.

Is this the way to go about it? If anyone has some similar code that I could reference that would be great

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? 

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

Forms Authentication shared between 2 Applications, but still getting directed to login page

my scenario is: Single Sign-on Within a Sub Domain (two virtual directories under the same sub domain)I've setup both sites using the same forms authentication info in my web.config. both sites have the same machine key's as well. I sign into site1. i click a link that directs to site2. site2 still redirects me to the login page, however on the login page I test HttpContext.Current.User.Identity.IsAuthenticated and it returns true. I also tested on site2's login page to pull the ticket's information and it's pulling everything. so it looks like SSO is working as far as sharing the authentication ticket, yet I cannot figure out why it still puts me on the login page? site 1: https://mysub.mydomain.com/site1/ link in site1 that directs to site2: site 1: https://mysub.mydomain.com/site2/mypage.aspx any ideas? appreciate any help someone could give.

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

asp.net forms authentication with route handling - error, routes not recognized, returns to login


 I just created a small site with form authentication with route handling.  Without forms authentication, the pages route just fine.  With forms, it returns back to the login page as it is not one of my allowed locations specified in my web.config file.


I know I probably need to write a custom route handler.  Does anyone have an example I can follow for this?  Thanks.

Forms Authentication -> login.aspx bypass and auto-create user?


Can I do the following, if I have 'this' within my web.config:

        <authentication mode="Forms">
            <forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" timeout="120"/>

        <authentication mode="Forms">

            <forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" timeout="120"/>


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

Building a custom Login Page which does not use forms or windows authentication



I would like to build a custom login page which doesnt uses the windows or forms authentication but I am troubled as to how I should do that. I tried to follow the default AccountController.vb file but it doesnt help me much as it doesnt show where its connecting with the database.

What is need is:

Database Table User

columns are userid, email, password

to write a login page that will use my sql server to login rather than using the forms or windows authentication

Explained: Forms Authentication in ASP.NET

This module explains how forms authentication works in ASP.NET version 2.0. It explains how IIS and ASP.NET authentication work together, and it explains the role and operation of the FormsAuthenticationModule class.

Using Forms Authentication in ASP.NET - Part 1

Classic ASP developers often had to "roll their own" authentication scheme, however, in ASP.NET much of the grunt work has been taken out. This article outlines how things have changed and how FormsAuthentication can be used to secure a Web site with a minimal amount of code.

ASP.NET Forms Authentication - Part 1

Often, in legacy Web applications, users authenticate themselves via a Web form. This Web form submits the user's credentials to business logic that determines their authorization level. Upon successful authentication, the application then submits a ticket in the form of a cookie, albeit a hard cookie or session variable. This ticket contains anything from just a valid session identification access token to customized personalization values.

ASP.NET forms authentication with roles

.A timeout is specified in minutes. This is "time since last request" not the "time since login". If a login is indicated to be persistent (described later) this is ignored.
.A protection method is specified for the cookie.
Next I wanted to specify a folder to which access is restricted to people who have logged in. To do this I entered the following code in the web.config file (beneath

Forms Authentication in ASP.NET

In this tutorial you will learn about Forms Authentication in ASP.NET 2.0 - Forms Authentication class, Cookie Domain, Forms Cookies, The Login Control, Signin, Signout, Authenticate, Redirect, Login Status, Login Name and Login View Controls.

Problems with Forms Authentication in DD 4 site


Hello,  I am seeing a strange problem with Forms Authentication in my DD site.   A user logs into and can view/edit/delete data all day, but when they execute a Custom Filter against data (for example , a control DynamicData/Filters/CustomerLastNameSearch.ascx ) then the site auth fails, and redirects to the log in screen.

in web.config I have

     <authentication mode="Forms">
            <forms name=".Star" loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" path="/" timeout="43200" cookieless="UseCookies" />     

Offhand, I am thinking two things : that DynamicData/Filters path requires some special handling for some reason, or the control extension ascx is causing auth to get confused.   Has anyone else experienced this or have any suggestions?  Thanks!

403 Forbidden - Forms Authentication


Form template has cascading dropdown lists.  When item selected from first list, form code executes a FileQueryConnection to retrieve data from a list to populate 2nd listbox.  Getting 403 forbidden when explicitely attempting to retrieve data from code.  Form is using connections from a data connection library.  The template works perfectly when deployed to a windows authenticated site.  Fails when executed from the forms authenticated site.


It's possible to using sharepoint services 3.0 hosted site without authentication login ?

It's that any way to able user read / write by without login authentication for sharepoint services 3.0. because i'm having problem when external user need to access to our sharepoint pages, but their can login to it.
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