Security :: Update Roles In Form Authentication?

Feb 14, 2010

I am developing a website in which I am using ASP.NET Form Authentication and everything is working fine as I am expecting. I can authenticate user from login form, I can read user roles from database and can add authenticate ticket in which user roles are stored as user data etc. etc.

Now I want to give user a page where user can update his roles in the database by selecting any role he/she want from the list of checkboxes. I know how to update the user roles in database but I want to know how to update user roles in the authentication cookie after database update.

Let's say in the start user is in "Seller" and "Buyer" role and later he want to become member of "Agent" role as well and he update his roles from the given page and everything is updated in database. Now according to database user is member of three roles but User.IsInRole("Agent") method is returning me false because the new role "Agent" is not updating in the authentication cookie.

How can I update a newly added role in authentication cookie when user is still logged in.

View 4 Replies


Similar Messages:

Security :: Authentication - Redirect URL For Different Roles?

Mar 10, 2010

I am currently having a spot of bother in something im trying to create. I want it so when a user who is in a certain role logs in they are directed to a certain page, and any other normal users are directed to another page.

I think i have this sorted via code but...

-The first time it will work, the 'admin' user will get directed to the appropriate page

-I then log out and log in as a normal user and get directed to the appropriate page

-then when i log out of that users account and back into the admin one i get directed to the normal users page instead.

-additional to this, I tried it on a different machine logging in as the admin user only to be redirected to the normal users page (is my session being stored somewhere?)

Ive traced through the problem and the user name and password being subbmitted are what they should be, yet it skips the true part of my IF statement for being in that role.

Here is my code I am using on the login form:

[Code]....

-When stepping through if seen it work and not work with the same values, I cant understand the logic of its inconsistency

the code i am using for the logout is (this is on my masterpage):

[Code]....

View 4 Replies

Security :: Web Farm Using Window Authentication Or Form Authentication?

Aug 9, 2010

I have a web farm web project, and want to make sure windows authentication is working well without any problem in web farm, can any one give me some web sites or information about that?

View 1 Replies

Security :: How To Develop Authentication Module Using Form Authentication

Feb 8, 2010

Am going to develop authentication part in the web site. I want my authentication module should not be hacked by any one and also want in secure side.

View 1 Replies

Security :: Using AD Authentication With Form Based Authentication & AzMan

Sep 2, 2010

I needed information regarding the capabilities & integration of AzMan tool with Asp.net.Currently, I got a Sharepoint 2007 website along with ASP.NET 2008 where I am using Form Based Authenication.Now, the requirement is any user within a domain registered in AD should be able to login in website through intranet.

Can I acheive this using AzMan, or I need to create two websites one with FBA for internet users and the other one for the intranet users with AD authenication. Also my intenet website is deployed and in use where usermapping and roles are already created, so using this tool what will be the impact on existing webiste.

View 2 Replies

Security :: Form Authentcation With User Roles?

Mar 18, 2010

I have Use Repeater for my sitre nevigation with sitemap daya source

[Code]....

but my site has 3 user type employee clientadmin and globle admin so employee runs on separate section (SitemapProvider) but clientadmin and globle admin user same SitemapProvider so i need to set two pages visible false for client admin when some one logged in as a client admin how can i do it please give the way with code snippet please thank you for attention

View 7 Replies

Security :: Transfer Users Roles Etc Form One Db To Another?

Jan 27, 2011

i hve 3 applications with membership providers which are wrking perfectly.. i am storing the users , roles , profiles etc in the same database as for the each application. now i want to store users roles etc in a single db n application data in separate db.. how can i shift existing users from current db to new db without re-creating them ..

View 6 Replies

Security :: Use Or Store Roles For Add A New User Or Update?

Jul 2, 2010

Ive been exploring the tabls in the membership database to see how they are structured. If i add a new user or update an existing one i see it in the user and membership tables. But i dont understand how to use or store roles. I use the ASP.NET CONFIGURATION toll in the WEBSITE menu to create roles and create access rules, but those roles dont show up in the Roles table in the db!

Yet the roles are stored cause they keep apearing in the ASP.NET CONFIGURATION. How weird is not that? Where is it stored and how can i access it? I need to programatically check if the user who is logged in is in a certain role.

View 8 Replies

Security :: Allow Or Deny Roles To Update / Insert And Delete Records?

Sep 1, 2010

I have two roles "Admin" and "Basic". I also have a listview on the web page.

My goal is that to make "Admin" role has the highest privilege to deal with records such as "insert", "update" and "delete".

For the role "Basic", it only can update the records.

View 3 Replies

Security :: How To Login Form Authentication

Feb 23, 2010

I have some problems regarding login form authentication.Can anyone of you share running login authentication codes.

View 3 Replies

Security :: Form Authentication In A Web Service?

Dec 4, 2010

I want to create a web service that can authenticate user from my application. I will be sending user name and password from my app to the web service and that will deny or accept the user. I want to use form authentication using sql server. that this web service can be used by other team in my office so that they can just call the web service and the user will be authenticated.

Also, is it possible to use both form and windows authentication in my web service and authenticate the user both ways.

View 3 Replies

Security :: Form / Windows Authentication?

Apr 18, 2010

Form / Windows authentication?

View 3 Replies

Security :: Missing In Form Authentication?

Feb 21, 2010

- I have a ASP.Net Application . And I want to user Forms Authntication in it .

- So I do the Following Steps :

1- I cerate a folder in my application called "Admin" .

2- I Created a page inside this folder called "Default.aspx" .

3- I Create a page called "LogIn.aspx " in the site .

4- I Drag and drop a button in this page and write the following code :

protected void Button1_Click(object sender,
EventArgs e)
{
[code]...

- When I view Browse the Default.aspx in Admin folder . I Redirect to Login.aspx .

When I Press the Button the page postback and return to Login.aspx again . and why the default.aspx not opened after pressing the button .

View 1 Replies

Security :: Using Asp.net Form Authentication With Silverlight?

Apr 28, 2010

i intent to use asp.net authentication ticket system to validate users on my silverlight application.

View 1 Replies

Security :: Using Login Form With Windows Authentication?

Nov 25, 2010

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

[Code]....

View 5 Replies

Security :: How To Know That Form Authentication Session Timeout

Nov 19, 2010

I have a question regarding Form Authentication Session Timeout

I have a form authentication and i have set the session timeout in my webconfig.

After I login to website using my form authentication, the session is not timing out even after i login more than 30 minutes.

It seems i'm still authenticated and can access everything.

Is it normal ? I thought if we set the timeout in webconfig it will automatically log you out because the session expire.

<authentication mode="Forms">
<forms name=".authentication" loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" enableCrossAppRedirects="true" domain="" />
</authentication>

View 2 Replies

Security :: Redirecting Inside Pop Ups With Form Authentication?

Mar 10, 2010

I'm using Form Authentication in my web application.In my application I have a lot of pop up windows that include form inside.when the form ticket expires the user is redireced to Login page.Also it happens inside a popup window. If user leaves the pop up open and come back after the ticket is expired, it redirects him to the Login inside that pop up.

View 11 Replies

Security :: How To Control With Window Authentication And Form

Feb 21, 2011

Asp.net can be use window authentication. In my web site i want to control with window authentication and form. Is it possible to do?

If it possible to do how can be make it? Another one is, if i use window authentication, how can be identify group. For example. Sales group cannot be see purchase or etc. Window log in can be give group. So how can i define this part?

View 2 Replies

Security :: Cannot Use Form Authentication For Dynamic Data

Jul 17, 2010

I want to use directly form authentication by editing the web.config like this:

<authentication mode="Forms">
<forms loginUrl="Authenticate.aspx" protection="All">
</forms>
</authentication>
<authorization>
<deny users="*"/>
<allow users="abc"/>
</authorization>

Then I add a Login control in Authenticate.aspx, after click Login button there is an error like this:

An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 1802 and the SqlException message is: CREATE DATABASE failed. Some file names listed could not be created. Check related errors.Is there anyone know what the problem that Form authentication cannot directly apply to Dynamic Data site as usual?

View 4 Replies

Security :: Form Authentication Group Role?

Aug 5, 2010

I'm doing form authentication with roles to access areas of a website. The authentication is working great, but I'm having trouble with the roles piece. On the page in question (needing to narrow the access), the top lblGrps.text (below) shows I'm in the group I need to be in, while the response.write (also immediately below) reads false for the EdIT group:

[Code]....

View 1 Replies

Security :: Using Logon Form With Windows Authentication?

Oct 13, 2010

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" />
<authorization>
<allow roles="D820Developers, D820IT, D820Staff, D820Providers, D820Supervisors, D820Directors, D820Interns" />
<deny users="?"/>
</authorization>

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?

View 1 Replies

Security :: Add Form Authentication On Nested Folder?

Feb 7, 2011

I have simple structure:

root

root/Admin

I would like to add form authentication only on Admin folder.

when I add this into Admin/web.config

[Code]....

I'm getting this error:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

How to add form authentication on nested folder?

View 2 Replies

Security :: Form Authentication With Multiple Login Pages?

Mar 10, 2011

I have read the many posts of people trying to use two different login pages: one for users and one for admins. My question is very different. I have a Site.master page with a LoginView and LoginControl. I then have three root level pages Default.aspx, About.aspx, and Contact.aspx that derive from the Site.master. All three pages are set in the web.config to be allowed to all users. I then have a MemberPage in a Member folder which is only accessible to authenticated users. What I want to have happen is to be able to login from either the Default, About, or Contact pages and then be directed to the MemberPage.

View 2 Replies

Security :: Manually Check Form Authentication Cookie Value?

Feb 18, 2011

My requirements is when one other website call my service (httphandler) and in response i will provide one parameter which is

value of form authentication cookie

now that website call my website with that cookie value as query string , how to check from that cookie value that particular use is authenticated or not ?

View 3 Replies

Security :: How To Add Pages In Form Authentication Sample Code

Mar 7, 2011

how to add pages in the Form Authentication Sample Code. I am required to add a registration form in this Custom Security Solution. It lets me add the .cs files but when I add .aspx file, it gives errors in building. let me know what architecture have they followed? Why they have .resx files?

View 2 Replies







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