Forms Data Controls :: Custom Authentication To SQL DB Using Login Control?

Feb 7, 2011

I have an older custom classic asp app which handles time sheets for my organization. I would like to start migrate this application to asp.net. I am trying to figure out the best approach to implementing user authentication as the classic asp is built from scratch. For the new site, I would like to use the Login control to handle authentication but not sure the best way to wire it up to the existing SQL database with user name, password, and authentication levels. I have found this code snippit from the Microsoft site:

[Code]....

Unfortunately it does not suggest a connection mechanism. What would be the most logical / standardized way of making a connection to the db?

View 1 Replies


Similar Messages:

Select Login Page For Forms Authentication Based On Custom Rules?

Nov 18, 2010

i have a web site that uses forms authentication. the problem is that i have the site installed multiple times on the same production servers because i need to have a few different login pages (based on the domain in this case). after the domain specific login page, the rest of the site is the same. obviously, this requires a lot of maintenance as each new version has to be installed multiple times on the server (with varying the login page in the web.config file).

so i thought is there a way to install the site on 1 folder on the disk, have a web site on the IIS take in all the needed domains and make some http module (or some other solution) in which i could give it a list of domains and the forms authentication for that domain. this way make the login page used by each site change according to the domain while still having only one site to maintain on the server.

View 2 Replies

Custom Server Controls :: Inherit The Logion Control UI In Ascx Login Control?

Mar 14, 2011

How can I inherit the logion control UI in my custom ascx login control as well override it's OnAuthenticate event in my cusotm control code.

View 2 Replies

User Controls :: Implement Custom User Login With Roles Without Using Login Control

May 7, 2015

What if, I'm not using the LOGIN CONTROL but rather creating a Custom Control for Login. Is it possible to have user roles and a site map that redirects to its own destination when the user login?

View 1 Replies

Use Custom Login Page (Not Windows Login Box) For Windows Authentication?

Dec 30, 2010

Is there any way to use a custom Login Page (Not Windows Login Box) for Windows Authentication of SharePoint publishing sites?

View 2 Replies

AJAX :: How To Use TextBox Instead Of Login Control In Forms Authentication

May 7, 2015

Refer This : [URL] .....

I want same functionality but im not using Login Control ..I am using TextBox for Username and Password and a login Button ..can i do the same ??

FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, Login1.UserName, DateTime.Now, DateTime.Now.AddMinutes(2880), Login1.RememberMeSet, roles, FormsAuthentication.FormsCookiePath);
string hash = FormsAuthentication.Encrypt(ticket);
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hash);

[URL] ....

View 1 Replies

Getting Forms Authentication To Use 403 Custom Error Page Instead Of Login Page

Nov 19, 2010

I've a got an Asp.Net site that is using Forms authentication, I've also got custom errors configured in the web.config. One of these is a special error page for 403's (access denied). My question is how do I get Forms authentication to work smarter?

I would like Forms authentication to send users to login page only if they are not authenticated. If they are I want it to defer to the custom error pages that i've defined in the web.config. This seems like something very basic, how can this be achieved?

[code]....

View 1 Replies

Web Forms :: Login Control For Anonymous User Using Form Authentication?

Dec 15, 2010

I have a problem with using login controls form authentication ! as my website serves some pages for guest users(Anonymous user) and some pages are for only secure user(they must have to login for those requested pages)...... my problem is this that when i apply form authentication in web.config file to login control then visual studio directly shows only login page where i want that in general case only : guest user pages must be shown and if user clicks on login then after login the requested page he may open !

View 2 Replies

Security :: Login Plus Custom Login Using The Standaard Login Controls?

Apr 12, 2010

After reading a book I brought on ASP.net I fould the login controls to be very nice.I have set it up in my application so that customers can login using the standaard login controls and things were going smooth.But in my schema for my application I also have a table for customers (firstName, LastName, DOB, etc).And of course the customersID is used as a foreign key to tables such as Orders, Addresses (Home, Work, Postal).

The thing is how to i associate an asp.net login to a customer name in my table so that the CustomerID can be used through the application by knowing who is logged in.

View 7 Replies

Web Forms :: Make A Custom Login Control

Apr 25, 2010

need some guidance on how to make a custom login control where a user needs to input 3 field of input e.g Username, Password and Member ID number in order for them to be able to access a website.

View 3 Replies

Forms Data Controls :: Custom Gridview / Insert The Custom Dropdown Button Using Server Control For Each Column?

Aug 18, 2010

i've created a webform with one gridview having connected with the database using datasource. i.e password database with three colomn .

now want to insert the custom dropdown button using server control for each column.

when i select the dropdown list the list should display the value as required.

e.g if i click the uname dropdownlist then it should show the list of names.

if i click on pwd dropdownlist then it should show the list of numbers.

if i select any one of the value in the dropdown list then it should insert into the

database.

can i get code on this type of question...?

View 3 Replies

Set The Authentication Ticket Manually When Using The Login Control?

Mar 11, 2011

I am using the ASP.NET login control. I want to be able to set the timeout for Forms Authentication individually for each user (instead of globally in the web.config). From what I understand the only way to do this is to set the timeout on the AuthenticationTicket manually. Is there a way to do this when using the Login Control? It seems to me that the Login Control abstracts away all of this. I am hoping that there is some way to continue using the Login Control, but also have the ability to set the FormsAuthentication timeout individually for each user.

View 2 Replies

Security :: Using Login Control In Website For Authentication?

Dec 4, 2010

I am using login control in my website for authentication. after login successfully i am storing value in session variable in session["LoginId"] and after login the template of login control gets converted into loggedInTemplate by calling authentication.redirectFromLoginPage(). But sometimes what happens the login template is gets converted into anonymous template while there is a session value in session variable i.e. session["LoginId"] variable has the value still login control shows anonymous template.

View 1 Replies

Security :: Login Control With Windows Authentication?

Apr 20, 2010

i want to create a login page and i have to use windows authentication. so what are the steps i have to follow to achive login contorl with windows authentication.

View 1 Replies

Web Forms :: Custom Login Control In Masterpage With Coded User Validation?

Jan 17, 2010

I have a little doubt about creating a login control in the master page within a contentplaceholder.

What i want is to create my own login control in the masterpage, using a loginview inside a contentplaceholder. The code is the following:

[Code]....

So far so good, but now i want to create the logic to do the actual login. In a regular aspx page i'll do it in the cmdlogin click event, but as i'm in the masterpage, i'm not sure if i can do that. I actually tried to do it in the code behind of the masterpage, but it didn't work. What can do?? do i ahve to use the asp.net login control?

View 4 Replies

How To Do Forms Authentication And Login Controls

May 12, 2010

I am upgrading a website written using ASP.NET 1.1 and the logic for the login page includes verifying the credentials, calling FormsAuthentication.SetAuthCookie() and populating the Session with the user information.

I am updating this page to use Login controls and the Membership API and am trying to wrap my head around the concepts that have been changed.

Most of the samples I see do not do anything on the login button event handler, so is the logic of setting the cookie abstracted out into the control?

Also, how do I check if a user is logged in or not on other pages. Does it still store user information using the Session?

How do I check if a user belongs to a particular role or not (Earlier, I would look in the Session object to do something like this)Is the Session a bad way of storing user info?

View 1 Replies

Security :: Active Directory Authentication With Login Control 3.5 Or 4?

May 7, 2010

I am trying to follow instructions on how to create a login page that tests against active directory. My issue is all of the tutorials seem to be written for ASP.NET 2.0. When I try to follow them I cannot get them to work. Does anyone have any tutorial or information for .NET 3.5 or 4.0?

View 11 Replies

AJAX :: Redirect To Login Modal Popup Instead Of Login Page In Forms Authentication

Dec 1, 2010

I have my website in which there are free links and links that require login. Free links open even if the user is not logged in. But in case of links that require login, redirect to login.aspx specified in Web.Config in loginURL tag.

I want some way to override this and show Ajax modal popup (Ajax extender toolkit) with login control for only thos links that require login (not for the free links).

View 5 Replies

Can Login With Forms Authentication And Then Transfer That 'login' To A PHP Application

Mar 7, 2011

Our website runs on ASP.NET v4 and users log in user Forms authentication.

We are considering purchasing a web application that will add to our services. The only problem is that this new website is written in PHP.

We would like users to login to our ASP.NET site and then navigate to the PHP site. The PHP site should notice that users are logged-in though. So we probably need to transfer the ASP.NET SessionID cookie and somehow use that to verify whether or not the user has been authorized.

View 4 Replies

C# - Change Login Control Layout In Custom Control?

Jun 21, 2010

Is it possible to create a Custom Control which inherits from System.Web.UI.WebControls.Login and change its layout and add additional controls such as a DropDownList. I have tried various ways to do this by overriding the Render Contents methods but each time I have to recreate the controls which are already present in the main Login control. Is it possible to somehow get a reference to the controls in the parent class and then override the Render Contents method to render the controls how I need them?I would like if at all possible to use the controls and functionality that already exist in the Login control but just change the layout and add in an additional DropDownList control.

View 1 Replies

Security :: How To Create A Customized Login Control And Calls For Membership Authentication

Mar 18, 2010

I just like to know how can i create my own authentication(calling the ASP .net membership, role) page with the same function as the LOGIN Control. Your wondering, why not use the Login control instead. I have my own design and i don't know how to pattern my design to the built in Login Control. I tried editing the login template, but it's pretty hard to pattern it to my design.

This is my design

Basically what would like to know how the Login Control calls for the authentication, and when authenticated, it will pass the user(full name) to my LoginView Control without any coding. Or is it possible that I remove default login button in the LOGIN Control then create my own button and trigger the authentication or validation? But if you have other suggestion that can follow my design and call the authentication, i would be happy to know.

View 3 Replies

Custom Server Controls :: Why Custom Control Write Data Only One Time

Dec 26, 2010

I have built a custom control. when i add this custom control in my page twice or more then the it write only one time of its render contest data.

View 4 Replies

Custom .Net Membership And The Login Control?

Mar 16, 2010

I am creating a custom membership provider for a web app that already has it's users stored in an existing database table. I used some code from a tutorial to help jump start my provider but I am a bit lost on how i can interact with the actual log in process.My custom provider has an override method for ValidateUser() and at the moment I am just returning true there. But I want to create a current user object to store in session scope. This object will just store some specifics about the user.

I guess another option would be to use the ASP.Net profile provider but again I am not clear on where to hook into log in process to run some code that would either create this user object or populate the profile information for the current user.

View 2 Replies

C# - Login Control And Custom Membership Provider?

Oct 11, 2010

I am working on implementing a custom membership provider that works against an existing schema in my database and have a few thoughts/questions.The login control will automatically call the ValidateUser method of the membership provider, so no matter how I implement the provider the only thing the login control cares about is the bool value returned by this method. What I am confused about is there could be numerous reasons why a login attempt failed; user is locked out, too many tries in a period of time, etc. There is no way that I see to convey that to the control so it could display the proper message. Other properties of the membership provider such as PasswordStrengthRegularExpression have absolutely no effect on the login control as well (out of the box), I would have hoped that it would automatically somehow translate into regular expression validators, but that doesn't seem to be the case. So it seems that I need to initialize the login control properties with these settings out of the provider configuration if I want them to take on the control itself.

If the only thing that the Login control does out of the box (without manually handling events and doing the initialization as described above) is call the ValidateUser method on the membership provider, I see no way to convey back to the Login control why the validation failed or even doing things like throttling the validation requests based on a certain time window. Ultimately my question is why would I even use the membership provider then in conjunction with the login control? It seems like it was only designed for a Yes/No type response, which is very restrictive. If I want to build in logic with different messages back to the user I need to handle the login control events and call my own authentication classes that will handle all of my business requirements as well as return a custom error message back to the Login control to display to the user so they know why their attempt is invalid.Unless I am wrong in my assumptions, it seems that the interface between the Login control as the membership API is too restrictive to be useful. Perhaps the API works better for other auth controls like ChangePassword better but for the actual Login control I don't see the point.

View 3 Replies

Security :: Add Another Custom Dropdownlist In Login Control To Authenticate The User?

Aug 13, 2010

how can add another dropdown inside the login control and authenticate the user on the basis of user name,password,and location.

is there any other way?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved