Security :: Membership - Single User For Multiple Application And Different Role In Each Application

Jan 30, 2010

I have two .NET applications X and Y

a. I want to have User A as a common user for both application X and Y.
b. User A can have different roles on X and Y. Eg. Read permission on Y and Write Permission on Y.

How do i configure ASP.NET membership to achieve about functionality.

View 3 Replies


Similar Messages:

Security :: Single Sign On IIS 7 Multiple Application Pool

Oct 20, 2010

We migrated our web server to window server 2008, IIS 7.

We have single sign on application - that we login through one application called "users" and then no need to login to other applications, they all use the same machine key and cookie.

it works fine when all then applications under the same application pool.

but we have one application that is asp.net 2005. (the rest are asp.net 2003) the user application is in asp.net 2003 and that other application is in asp.net 2005.

so each application is in a different application pool. -

one pool to asp.net 1.1 and other pool to asp.net 2.

when I run the asp.net 2005 application

I get the login page and after I login I get the following errer:

HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested Url: /users/Unauthorised.aspx

Important: If I switch the "user" application (the login) to work under the same pool as my asp.net 2005 application, then it works fine with the asp.net 2005 application,but I get the above error for the asp.net 2003 applications

All this happened after we switched to IIS 7 Windows 2008, with IIS 6 it works great!

View 2 Replies

Security :: Open Source User Profile And Role Management Application?

Dec 23, 2010

I am looking for an opensource .Net 4.0 user profile and role management module. I need to manage basic user profile updates and management. Does any body know if such a thing exist?

View 1 Replies

Asp.net - To Prevent A Single User Account Logging On Multiple Times In A Webforms Application

Dec 16, 2010

I am looking at how best to prevent a single user account logging on multiple times in a webforms application. I know that MembershipUser.IsOnline exists, but I've read a few forum and blog entries suggesting that this can be unreliable, particularly in scenarios where a user closes a browser (without logging out) and attempts to logon with a different machine or browser.I looked at implementing a last past the post type system; when a user logs on older users are simply kicked off. It seems that FormsAuthentication.Signout() only works for the current user.

View 2 Replies

Security :: Multiple Role Membership / How To Populate A Dropdown List With Users

Oct 13, 2010

I need to populate a dropdown list with users who match certain role criteria. For example, if I have the following roles: Manager, Employee, Supervisor I would like to populate the list with only the Manager and Employee roles. Some individuals have multiple roles and they should be excluded if they also have the Supervisor role as illustrated below:

Name: A , Role(s): Manager, Employee, Supervisor

Name: B, Role(s): Employee

Name: C, Role(s): Manager, Employee

The final list should only contain names B & C.

I can use Roles.GetUsersInRole("Employee") but I am not sure if this is efficient or not.

View 2 Replies

Security :: How To Add Multiple .Net Membership Roles For A Single Page

Mar 26, 2010

I have developed an asp.net website. I Have Used Asp.Net membership provider.My Question is , I Have Three Roles , For Eg: Basic, Intermediate, Admin ...Now , i need to apply two roles for single page say basic and admin .... How can i do this ... Plz help me .... Thanx in advance ......

if (Roles.IsUserInRole("Admin") == false)
Server.Transfer("AccessDenied.aspx");

View 6 Replies

Security :: Membership.DeleteUser (UserName,true) Not Removing User From Role

Mar 25, 2011

I have a "UserDetail" table in my "JobPost.mdf". When I click the "delete" linkbutton, it can delete the all User info from my "UserDetail" table, it also delete the corresponding "aspnet_Users" & "aspnet_Membership",but the "UserInRole" still contain that UserName. Even though I specified the Code:Membership.DeleteUser(UserName, true);

I thought true is for bool deleteallrelated data, but it doesn't really delete the userInRole. So next time the user registers with the same name, it automatically get the "admin" role right. This "deleteUser" page I keep it inside a protected "admin"folder. How to solve it? Why Membership.DeleteUser(UserName, true) doesn't delete UserInRole?

protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
string UserName = e.CommandArgument.ToString();
Membership.DeleteUser(UserName, true);
JobPostDataContext db = new JobPostDataContext();
var query = from u in db.UserDetails
where u.UserName == UserName
select u;
foreach (var item in query)
{
db.UserDetails.DeleteOnSubmit(item);
}
db.SubmitChanges();
FormsAuthentication.SignOut();
}
}
My web.config inside the protected Admin folder:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</configuration>

View 1 Replies

Security :: Custom SQL Server Membership - User And Role Provider With Aspnet_regsql Generated DB Schema?

May 26, 2010

I am trying to create a Forms Authenticated site and have already used the aspnet_regsql tool to create the necessary logic in my SQL Server DB to hold my data. Now, I am looking to create a custom Membership, User and Role provider for my DB model. I was looking at the following video: [URL]

Now, I get the concept on how to go about it but I notice that this guy uses custom DB Procedures as to the ones that are generated by the aspnet_regsql tool. Can anyone direct me on where I can find info on how to go about building the Membership, User and Role provider class using the DB structure that aspnet_regsql generates? So much junk on google that I am having a hard time finding good guidance.

View 1 Replies

Security :: Membership User Has To Logout - Login Again In Order To View New Role Assigned Functionality

Jul 15, 2010

i currently develop an asp.net mvc 2 web app using asp.net membership and role management for authenticating and authorizing my users. I get complaints though that when adding a role to some user, he is not able to see new role assigned functionality, unless he re-enters (logout and login again) the application.

View 2 Replies

Security :: Creating A Interface For User Role Management Based On Built In Membership Provider?

Feb 18, 2011

I am creating a interface for User Role Management based on built in membership provider.I want to display all the roles as check boxes for a selected user. I am able to display all the roles in the database, but not able to load the specific user roles. For example, I am able to publish role 1 role 2 role3 role 4 as check boxes. But if the user is already flagged as role 1 and role 3, I am not able to show that data (role1 and 3 should be checked when form loads, but right now, they are not checked)...How do I get the roles as checked boxes display on a page.I am using a repeater control to display roles as check boxes on the page..

<asp:Repeater ID="UsersRoleList" runat="server">
<ItemTemplate>
<asp:CheckBox runat="server" ID="RoleCheckBox" AutoPostBack="true" Text='<%# Container.DataItem %>'

[code]...

View 1 Replies

Configuration :: How Many App Domain Created When Multiple Instance Of Multiple Application Is Running On Single

Jan 12, 2011

below written question :

1.) What is the name of the OS process in which App Domain resides.

2.)if suppose There are Three Windows application hosted on a same envoirment and two instance is working for each application at a Time, means now total instance are six .what will happen among the below written cases :

a.) There will be six different app domain in a single OS process

b.) There will three app domain(one for each application) in a single OS process and some Parallel thread will be executed in each app domain for another instance.

c.) There will be Three OS process corresponding to each application.

3.) If eveything will remain same except there are three web application in place of windows in point 2, will there be any change in functioning.

View 1 Replies

Security :: How To Set A Role Of User Having Multiple Roles

Mar 5, 2010

This is my senario. I want user to login and if "LoggedIn" User has more than one role then it displays the list of radio buttons. After selection of the role user gets further privilages according to the role that he has selected.

I've a problem setting up the role. And user can change his role when ever he wants.

For Example "john" is the user having two roles "Account Manager" and "Project Manager".

View 3 Replies

MVC :: Multiple Domains In Single Application

Aug 25, 2010

I want to use my asp.net mvc application with multiple domains (maybe of hundreds),

so I have created custom Route class that matches requests including domain.

Each domain could has different routes, so the number of routes in RouteTable can be huge

(eg 500 domains, each 20 routes = 10000 routes in RouteTable).

I am considering how it will be efficient?

I have an idea to replace RouteTable.Routes (of type RouteCollection)

with custom one (of type Dictionary<string, RouteCollection>).

But how I can override default route matching mechanism with my custom mechanism which will be two step:

1) retrieve RouteCollection from dictionary based on domain name

2) retrieve specyfic Route object (standard route matching mechanism)

How can I do this?

View 4 Replies

Security :: Custom Role Provider In WinForms And Web Application?

Feb 9, 2010

I have a custom role provider class that is currently being used by a web application. We are now in the process of migrating several windows applications from VB6 to VB.Net. From preliminary research, I understand that I can use the custom role provider in win forms as well and came across Client Application Services. I understand how the Client Application Services is setup, but can't seem to find how the custom role provider code will be shared between the web apps and the windows apps.

View 3 Replies

VS 2008 - Role Based Security Not Working In Application

Jul 12, 2011

I have an asp.net application. This is a role based authorization. Basically, if the user's are in a specific AD group, it should allow them to look at the webpage. Otherwise it should error out saying "not authorized".

In the web.config file, I have the following lines of code. I made sure I am in the Apr-Sales-Writers AD group.

Code:
<authorization>
<allow roles="Apr-Sales-Writers"/>
<deny users="*"/>
</authorization>

Issue: when I go to default.aspx page, it prompts for a userid and password and even though I put correct password and userid, it says "not authorized error".

Code:
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.

In the IIS project (on IIS server), I configured it to be a "Integrated windows authentication".

View 1 Replies

Turning A Single Instance Web Application Into Multiple Instances - Concept?

Feb 11, 2010

Here is a conceptual questions that I was going over the last few days. I have a simple application that I want to turn into a hosted solution.

My take on it is that in a sense each record in the database would have its own ID representing the hosted instance of the application, rather

than installing the application each time a new one is needed. Then I can easily differentiate between the instances, however I don't want to

store the instance ID in a session (bad for URL back links etc.) and don't really want to add it as part of the URL.

What would you suggest ?

Another part of the question would be how to pragmatically create a sub-domain representing the application instance, however that's a

Whole different question J

View 2 Replies

MVC Application Fires Session_Start Multiple Times For A Single Session

Jul 29, 2010

We have an MVC.NET application that encounters fatal errors when it restarts. In our Session_Start event handler, we add the session id to a dictionary. In the Session_End handler, we remove it. Consider the following sequence of requests:

GET home.mvc
<application restarts>
GET main.css
GET banner.jpg
GET somedata.mvc
...

Because of the way the application is architected, this sort of sequence happens fairly frequently if you do a rebuild while the application is open in a browser window. That wouldn't be terribly concerning except that I see it in production environments too. For example, it will occur (albeit rarely) when you edit web.config.

The requests following the restart are all due to links in the home page or AJAX calls from JavaScript.

What I observe is that .NET handles the first 5 requests in parallel. Each such request causes it to fire the Session_Start event. After a short time, it fires the Session_End event 3 times. To be clear, each Session_Start corresponds to the exact same session. They all have the same session id and the IsNewSession property is true for all session state objects. Also, the Session_End events do not correspond to the session being killed. The session persists, along with any data stored in session state.

I need to either prevent it from firing Session_Start more than once or figure out how to tell when Session_End doesn't really mean that the session has ended.

View 2 Replies

Security :: Membership And A Desktop Application?

Feb 19, 2010

I have an MVC application which uses the Membership services.I am importing a user list from another application that doesn't have any sort of Membership use, so I'm just using a csv file for the import, and writing a standalone C# app to do it. How do I get the standalone app to use the MVC application's database? The code works, in that calls to Membership.CreateUser are returning, but I'm not seeing the users appear in the correct database. So if the database is on my local machine and called "FooBar" how do I tell the Provider to use that instead of whatever default it's using?

View 5 Replies

Security :: Link Membership DB To Application's DB?

Sep 12, 2010

I'm trying to convert an ASP application to a .NET one. In the old ASP application methodology we have a "users" database with all our users and is indexed by an auto-increment integer which is used across our database (~25-30 tables) relationally. I'm recreating the tables from scratch, so no need to worry about merging data. Let's assume we just have a large relational database that we want to connect to the .NET security model.

Now - with .NET, there is the concept of members and roles being handled for you. I took a look at the aspnet_Users table and it shows a GUID for members I created using the ASP.NET Configuration tool.
Basically I need advice on how to link the ASP.NET user's login to my custom database. Any tutorials/links are welcome, I'm not afraid of reading!

It would be great for the Context.User.Identity.Name to store the auto-increment integer PK as well because that could be used in all of my SQL queries to grab information for given users.

p.s. I'm trying to write it as an MVC2 application with a lot of Linq to SQL to keep it all strongly typed and awesome.

View 5 Replies

Security :: Use Two Membership Providers Within The Same Application?

Apr 3, 2010

I'd like to know if its possible to use two membership providers within a single application. I need to have a membership provider "power users" and administrators on a site and a different one for clients and customers who will want to register on the site. I'd like to know if its possible to have two different membership providers to handle these two different sets of users. If it is, how do i go about it?

View 4 Replies

Security :: Use The Concept Of Single Sign On (SSO) In Asp Application?

Sep 30, 2010

I am trying to use the concept of Single Sign On (SSO) in my asp.net application.

for the purpose i have created a main domain say
mydomain.com.

now i have 2 subdomains
sub1.mydomain.com & sub2.mydomain.com.

I am running these very fine. But now I want to have a SSO for my domains. For the same have

googled lot and found some stuff such as adding machine key to web.config and specifying domain names in cookies.

But it is not at all working for me. when I specify the domain name for cookies i am unable to sign out.

I am using FormsAuthentication in asp.net.

Following is the code I have in my web.config.

[Code]....

I have the same code in web.config of each domain.
I have placed the code for each domain in different directory on my website.
for ex. mydomain.com ---------> F:/HostedSites/mydomain
sub1.mydomain.com ---------> F:/HostedSites/subdomain1
sub2.mydomain.com ---------> F:/HostedSites/subdomain2

my Authentication code is

[Code]....
and sign out code is

[Code]....

Can anybody tell me where exactly I am wrong ? what changes do i need to do at server end also.

I am checking this on my testing domain ie. mydomain.tv. can this be a problem ?

View 2 Replies

State Management :: Sessions Got Mixed Up When Open Multiple Tab For A Single Application

Sep 10, 2010

We got a problem that Sessions got mixed up when open multiple tab in a single application. We could change the code that do not use session variable in a that level, but a tons of page need to be modified. We need to find a quick fix for this problem. Is any thing we can do in code level to prevent user open multiple tab in a single application? O any thing we can do to keep its own session for a single tab?

View 6 Replies

Security :: Add A New Column In Web Application Membership Table

Nov 19, 2010

I need to add a column name contact id in asp.net memebership table.I get the contact id from the contacts table and i need to pass that contact id in asp.net membership table when user creation event fires.

View 2 Replies

Security :: Build Custom Membership Provider In MVC 3 Web Application Using C#?

Feb 19, 2011

I am trying to build my own custom Membership Provider in an MVC 3 Web Application using C#.

Here is my code:

[Code]....

As you can see, I am just starting with it, and yet I've encountered problems. According to
this tutorial when I right click on MembershipProvider, I should get the option to [ Implement Abstract Class ], but I don't get that ! I am using Visual Studio 2010.

View 9 Replies

Security :: Use Membership Provider In Forms Application Without Defining An App.config?

Feb 17, 2011

I have a small windows forms application that uses the membership provider that is defined in my app.config file. I want to get rid of my app.config file and initialize the membership provider completely from code. The reason behind this is because I want to be able to dynamically connect to different databases containing asp.net user tables and I want the user to be able to enter the desired database information into a text box at run time. Is this possible or is it required that I have an app.config file?

View 1 Replies







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