permissions

M

Maximus

Have any of you ever set permissions programatically on a folder aspnet
user thorugh an application.

Any help will be greatly appreciated.

Thanks.
 
M

Maximus

Kevin said:
My apologies, Maximus. I copied the URL from the browser address window, but
it was not the URL of the page I was looking at. Here is the correct URL:

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPermissions.asp?frame=true
Hi Kevin,

I thought for this you need to use WMI. What I was looking for an
example which I can refer to as I have been trying to use WMI the
examples have been refering to need the DACL property of the folder to
be accessed. Due to some reason when I get the Security settings, I see
only description and Return value as the properties I do not see the
DACL. I was wondering why?

Any help will be appreciated.

Thanks.
 
K

Kevin Spencer

I'm a little lost here. What namespace are you referring to, and what
classes are you using? If you're asking about WMI, I can't answer, as I've
never used it. I do know that the System.Security.Permissions Namespace has
the classes you need to set permissions on files an folders. Specifically,
the FileIOPermission class.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
M

Maximus

Kevin said:
I'm a little lost here. What namespace are you referring to, and what
classes are you using? If you're asking about WMI, I can't answer, as I've
never used it. I do know that the System.Security.Permissions Namespace has
the classes you need to set permissions on files an folders. Specifically,
the FileIOPermission class.
Hi Kevin,

Do you think using FileIOPermission Class I will be able to change
permission settings on a folder, which I created through my application,
for the ASPNet user. If so can do you have an example? As I did not find
anyway by which I could set permission settings for any user(ASPNET in
my case).

If you could send me an example or something I will greatly appreciate it.

Thanks.
 
M

Maximus

Maximus said:
Hi Kevin,

Do you think using FileIOPermission Class I will be able to change
permission settings on a folder, which I created through my application,
for the ASPNet user. If so can do you have an example? As I did not find
anyway by which I could set permission settings for any user(ASPNET in
my case).

If you could send me an example or something I will greatly appreciate it.

Thanks.
Hi Kevin,

Please help, I have been breaking my head for a few days now but to no
avail. I have no clue as to how I will set permission on a folder
created thorugh the appliction for aspnet user. Any example for the same
will be greatly appreciated.

Thanks.
 
K

Kevin Spencer

Hi Maximus,

If you follow the link I posted to the System.Security.Permissions page
(http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPermi
ssions.asp?frame=true), and follow the link on that page to the page about
the FileIOPermission class
(http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemsecuritypermi
ssionsfileiopermissionclasstopic.asp?frame=true), there are examples right
on that page you can go by.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
M

Maximus

Kevin said:
Hi Maximus,

If you follow the link I posted to the System.Security.Permissions page
(http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPermi
ssions.asp?frame=true), and follow the link on that page to the page about
the FileIOPermission class
(http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemsecuritypermi
ssionsfileiopermissionclasstopic.asp?frame=true), there are examples right
on that page you can go by.
Hi kevin,

Even if I follow the link I dont see how I can specify the ASPNET user
in the FileIOPermission class. I dont see any function that will let me
specify for what user I can change the permission. Do you think its
possible if so can you pinpoint the function I can use?

Thanks.
 
K

Kevin Spencer

Okay, the FileIOPermission class sets permission for the code being run. If
you want to set Permission for a specific user, use the PrincipalPermission
class.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top