allow one user and deny all other users

 Hi,

 I have one question regarding web.config file in my asp.net application.

 Inside web.config I have this part of the code:

  <system.web>
      <authorization>
        <allow roles="mynet\administrator"/>
        <allow users="john.frey@mynet.com"/>
        <deny users="*"/>
      </authorization>
    </system.web>

 

I don't know what the problem is beacuse user "john.frey@mynet.com" cannot acces this application. He also is not part of the mynet\administrator group.

Is it problem that I use both...allow and deny users in the same authorization tag?

 

Any help and advise is welcome:)

 

thx

 

 

 

 

0
JohnS176
9/15/2008 12:52:20 PM
asp.net.security 27051 articles. 0 followers. Follow

3 Replies
210 Views

Similar Articles

[PageSpeed] 1

I'm no expert on the subject, but how about reversing the order ot the "allow roles" and "allow users" tags?


Thanks, Ed

Microsoft MVP - ASP/ASP.NET

0
ecbruck
9/15/2008 12:58:34 PM

try this: <allow users="domainname\username"/>

instead of <allow users="john.frey@mynet.com"/>


/GuruBhai
0
guru_sarkar
9/15/2008 3:28:07 PM

Works!

I don't know why "john.frey@mynet.com" won't work ...

I will use your solution in future guru sarkar.

 thx again both of you for help!

0
JohnS176
9/15/2008 5:28:37 PM
Reply:

Similar Artilces:

want to call one c#.net function in one user control from another user control
hi i have two user controls info.ascx and personal.ascx i have a function like in info.ascx i have a function like showdetails() {   } now i want to access this function from personal.ascx can i do this ? thanks in advance. shwetaThanksshwetaIn a day when don't come across any problem -you can be sure that you are traveling in wrong path  you should better create a class where you will define the "functions" that you need in both files. declare "static" the function and call it like nameofclass.nameoffunction In a web project you can...

Is this possible
Greetings all, Here is my scenario. We have a front desk that has a few people throughout the day that use it. Currently we have a "generic" user that the staff use to log on to the machine. This works fine and dandy until the day the password needs to be changed, someone is fired, or the fact that the password is shared willingly because it is a "shared" account, thus creating a security issue. What I'm wondering is if there is a way that I can define a group of people/accounts that can unlock the workstation of each other. This way, I can assign usern...

siteMapNode denying users (not allow)
Hi I am using security trimming with a sitemap.  I want to stop a node showing if a user has logged in. Can I use something like deny users="?" and allow users="*" <siteMapNode deny users="?" allow users="*" url="usercreate.aspx" title="Register"></siteMapNode> If anyone can help I'd be eternally grateful (well for at least five mins) cheers twisted Danny just posted a great blog post on this topic: http://blogs.msdn.com/dannychen/archive/2006/03/16/553005.aspx Hope this helps, Scott You can take a look at this article I wrote http://gridviewguy.com/Art...

Can I block all e-mails coming into a user but only allow one account e-mail the user?
Not sure is possible, but I was asked by an administrator. Jon Street Network Administrator Greater Johnstown School District CNE, ASE, CCA, A+ 518-762-5972 I also need to block all outgoing from same user. I only want him to receive mail from only one user. Jon Street Network Administrator Greater Johnstown School District CNE, ASE, CCA, A+ 518-762-5972 On Mon, 17 Mar 2008 19:20:03 +0000, Jon Street wrote: > Not sure is possible, but I was asked by an administrator. You can block incoming and/or outgoing Internet messages for a user by using the class of service ...

At a time one user allow to one login only
hi to all I create a web application. i create a users. if one user login. application does not allow to same user login at a time. please guide me. regards devan.g  ypu just save the user name in session and compare if the same user is logged in again just give him a message stating that u r already logged inChandra mohan.Ihttp://chandu2u.wordpress.com/. Hi try this <asp:Login ID="Login1" runat="server" BackColor="#FFFBD6" BorderColor="#FFDFAD" BorderStyle="Solid"          &n...

Can <deny users="*"/> be overwritten by <allow users="admin1,admin2"> ??
If I want to allow only a few usernames in my database to access the /admin directory, will the code below work or will <deny users="*"/> keep everyone out? Thanks <location path="admin"> <system.web> <authorization> <deny users="*"/> <allow users="username1,username2"> </authorization> </system.web> </location> The first rule from top to down that matches the particular user is used, meaning that in this case all use...

All users are logged off when one user loggs off
I have an application developed with ASP.NET and VB.NET now i am facing a very big problem.That is when in application if anyone user does signout all users who have logged in are also signed out.This means that if 1000 users are logged in and one loggs off then all other 999 users are also logged off. This is a tedious problem and i need it to be solved as soon as possible.Please help me out as soon as possible if you have any kind of solutions.   Hi Could you post more details especially what is the solution in your code and what is your authentication setting in IIS?Best...

one user preventing other user connection
Helo all I'm using ASE 12.0 running on Solaris and with this environment I meet a problem about connection. Some times I meet that it is a connection without user (A connection tha was disconnected but without killing process) appeared. If this problem occured other user can not make connection to server. Other users only be able to make connection if the process killed manually or the server risky restarted. may anybody help me? please! Thk for all ...

Allowing users to change their user name
I have a need to allow update of user names.  I remember visiting one DNN site where this was implmented, but can't remember where it is.  Does anyone have a quick, clean solution?   Jonathan Palmer I don't think its possible with the new membership provider.. You'd need to write a custom provider that modifies the username directly in the aspnet_Users and DotNetNuke Users tables.  The sprocs in the default setup do not provide this functionality. I think MS is going the route of "Not Allowing it" through the membership provider... as suggested earlier ...

Allow User to change other users passwords
What do I need to do in order to give a user the ability to change other users passwords and not have any other admin rights? Mike Finnegan wrote: > What do I need to do in order to give a user the ability to change other > users passwords and not have any other admin rights? You can use the password management acl. See http://support.novell.com/cgi-bin/search/searchtid.cgi?/10015319.htm for the idea in general although it is written for nw5, -- -andy Andy Thompson (SysOp) wrote: > Mike Finnegan wrote: > >> What do I need to do in order to give a...

Allowing users to view other users profiles
 Iv created a basic social networking site Using the built in membership roles provider and its working great. So far users can signup and create a profile, login edit their profile and upload an avatar. Also close their account and view a list of all site members.  But the one thing Iv not firgured out yet is how to allow users to view the profiles of other users. What I want to do is have a the usernames in the userlist display link to the the profile of the particular user. Now I assume I will have to send the username in the query string to the profile page but how do I extract...

Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers. Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication? Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx    Ple...

External User not allowing a Period in User Name
Hello! I have several External users internet e-mail addresses that I need to enter into our GroupWise system via ConsoleOne. They have addresses like this: fred.smith@somewhere.com ConsoleOne will not allow me to type in fred.smith Does anyone know a work around for this? Thank you for any help you can provide. -Kelly D. kelly.deshon@salemhospital.org wrote: > Hello! > > I have several External users internet e-mail addresses that I need > to enter into our GroupWise system via ConsoleOne. They have > addresses like this: > > fred.sm...

Using one users personalization for a group of users
   Hi, I'm new to Web Parts. I wonder if it is possible to let one user customize the layout for a page using web parts and then let all other users use his customization? So in my project I want the administrator being able to change the looks for the rest of the users. /Carl You betcha Carl.  Search for "entersharedscope" and "togglescope" in msdn library, thats two searches. Then add to your web.config so you can personalize for everyone else. <webParts> <personalization> <authorization> <allow users="Carl" verbs="enterSharedScope, modi...

Web resources about - allow one user and deny all other users - asp.net.security

Nearly 1,000 'security risks' denied entry to France since Paris attacks
Nearly 1,000 people thought to pose security risks have been denied entry into France since stepped-up border controls were imposed ahead of ...

‘Fantastic Beasts’ Stars Afraid To Give Away Spoilers: Here’s What’s Been Revealed So Far
Fantastic Beasts and Where to Find Them is currently being filmed in the UK, but they have run into a bit of a snag. It seems that while they ...

It Is Time To Rethink Donald Trump’s Candidacy
From the very beginning of his campaign (and perhaps before), Donald Trump has gathered a following of supporters using his blunt, no-holds-barred ...

Russia should nuke enemy number one Turkey as tensions continue to escalate - Latest News - Breaking ...
RUSSIA is ready to "use nuclear weapons on enemy number one" Turkey, one of the country's leading politicians has announced.

‘Rabid Dogs’ No More? Ben Carson Meets With Syrian Refugees In Jordan
As part of a “fact finding” endeavor to learn more about the plight of Syrian refugees, Republican presidential candidate Ben Carson departed ...

Pro tip: Access all your cloud accounts from one location on Android
Tired of navigating between various cloud apps on your Android device? If so, Jack Wallen shows how to centralize all your cloud accounts with ...

California may be a leader on climate change, but it still has plenty of work to do
When Gov. Jerry Brown arrives in Paris next week for a major international conference on climate change, he will showcase one of the world’s ...

Seriously, People Are Upset This Year’s Reese’s Peanut Butter Christmas Trees Don’t Look Enough Like ...
As if the Starbucks’ red cup controversy and whether to say “Merry Christmas” or “Happy Holidays” isn’t enough for you, now, there’s something ...

Pope Francis visits Ugandan shrine amid gay rights debate
Reuters Pope Francis visits Ugandan shrine amid gay rights debate Reuters NAMUGONGO, Uganda Pope Francis traveled to Uganda's holiest shrine ...

Adele 2016 Tour Unveiled à La Harry Potter As ’25’ Tops Sales & Album Download List: Why U.S. Fans Wail ...
Adele announced her 2016 tour by borrowing from Harry Potter. And while Adele even had a magic wand to wave in making her 2016 tour announcement, ...

Resources last updated: 11/28/2015 12:04:59 PM