Solved

Directory Authorization in asp.net application

Posted on 2011-09-27
4
190 Views
Last Modified: 2012-05-12
We have a Web Site http://Server1/MyWebApp
The permission is set on this so that everybody has access .
There is a directory under MyWebApp line http://Server1/MyWebApp/HR, i would like to have only HR people access to this directory.
So i removed all the users for this directory and kept only HR users.  Now none of the users can access the HR section including HR group. If i add NETWORK and NETWORK SERVICE to the permission then everybody has access to the HR area.

How do i set the permission on the directory so that only HR group have access.

I am doing this on the server- IIS - MyWebApp- HR - Right Click -> Permissions.
0
Comment
Question by:kingsbury
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 36710615
You need to allow the account IIS runs under to have access as well.  By default this is IUSR_something, but it can be changed.  If you set permissions for that and the HR group you should be okay.
0
 

Author Comment

by:kingsbury
ID: 36712358
I tried adding the IIS user, but it didnt help.
Only when i add Network and network service thats the time i get access. and it also opens up access to all the users.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 36712545
Is IIS running under the either of those accounts?  That's the only reason I can think of why that would happen.
0
 
LVL 8

Accepted Solution

by:
jagrut_patel earned 500 total points
ID: 36714539
Assuming your ASP.NET app is using Windows authentication check whether this helps. It is about configuring ASP.Net app for Windows authentication.

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_27082464.html

You can place additional web.config file in HR directory to allow only users with HR role to access the contents of HR directory and deny (*) rest of the users.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question