Saturday, March 24, 2012
permissions
user thorugh an application.
Any help will be greatly appreciated.
Thanks.Hi Maximus,
See
http://msdn.microsoft.com/library/d...tclasstopic.asp
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Maximus" <me@.maximus.net> wrote in message
news:esai$jw9DHA.3816@.tk2msftngp13.phx.gbl...
> Have any of you ever set permissions programatically on a folder aspnet
> user thorugh an application.
> Any help will be greatly appreciated.
> Thanks.
Kevin Spencer wrote:
> Hi Maximus,
> See
> http://msdn.microsoft.com/library/d...tclasstopic.asp
Hi Kevin,
Thanks for the link, but my problem was i created a folder thorugh my
application and now I want to assign the ASPNET user modify permission
on this folder. How do you think I will be able to do that using
PermissionSet, the example doesnt seem to help with that, is there any
other way of doing this.
Thanks.
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/e...asp?frame=true
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Maximus" <me@.maximus.net> wrote in message
news:#QMIlSy9DHA.2064@.TK2MSFTNGP11.phx.gbl...
> Kevin Spencer wrote:
> > Hi Maximus,
> > See
http://msdn.microsoft.com/library/d...tclasstopic.asp
> Hi Kevin,
> Thanks for the link, but my problem was i created a folder thorugh my
> application and now I want to assign the ASPNET user modify permission
> on this folder. How do you think I will be able to do that using
> PermissionSet, the example doesnt seem to help with that, is there any
> other way of doing this.
> Thanks.
Kevin Spencer wrote:
> 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/e...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.
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.
"Maximus" <me@.maximus.net> wrote in message
news:eWdKWLz9DHA.1672@.TK2MSFTNGP12.phx.gbl...
> Kevin Spencer wrote:
> > 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/e...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.
Kevin Spencer wrote:
> 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.
Maximus wrote:
> Kevin Spencer wrote:
>> 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.
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.
Hi Maximus,
If you follow the link I posted to the System.Security.Permissions page
(http://msdn.microsoft.com/library/e...emSecurityPermi
ssions.asp?frame=true), and follow the link on that page to the page about
the FileIOPermission class
(http://msdn.microsoft.com/library/e...emsecuritypermi
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.
"Maximus" <me@.maximus.net> wrote in message
news:en8zlF09DHA.2324@.tk2msftngp13.phx.gbl...
> Maximus wrote:
> > Kevin Spencer wrote:
> >> 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.
> 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.
Kevin Spencer wrote:
> Hi Maximus,
> If you follow the link I posted to the System.Security.Permissions page
> (http://msdn.microsoft.com/library/e...emSecurityPermi
> ssions.asp?frame=true), and follow the link on that page to the page about
> the FileIOPermission class
> (http://msdn.microsoft.com/library/e...emsecuritypermi
> 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.
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.
"Kevin Spencer" <kevin@.takempis.com> wrote in message
news:OL0jrw79DHA.3428@.tk2msftngp13.phx.gbl...
> Hi Maximus,
> If you follow the link I posted to the System.Security.Permissions page
(http://msdn.microsoft.com/library/e...emSecurityPermi
> ssions.asp?frame=true), and follow the link on that page to the page about
> the FileIOPermission class
(http://msdn.microsoft.com/library/e...emsecuritypermi
> 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.
> "Maximus" <me@.maximus.net> wrote in message
> news:en8zlF09DHA.2324@.tk2msftngp13.phx.gbl...
> > Maximus wrote:
> > > Kevin Spencer wrote:
> > > >> 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.
> > > 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.
Wednesday, March 21, 2012
Permissions Issue
Hello, I am tring to create a .mdb db programatically on my server. It works just fine on my pc but not when I attempt it on my online server. I got a security exception error which stated I needed to chage the applications trust level. So I attempted to change the trust and added this to my config file:
<securityPolicy><trustLevelname="Full"policyFile="internal" />
</securityPolicy ><trustlevel="Full" />
Now i get this configuration error:
Parser Error Message:This configuration section cannot be used at this path. This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.
Source Error:
Line 64: <customErrors mode="Off"/>Line 65:Line 66: <securityPolicy>Line 67: <trustLevel name="Full" policyFile="internal" />Line 68: </securityPolicy >
Any Ideas on how to fix this? Thanks!
Have you tried allowOverride=true?
<location allowOverride="true"><system.web><securityPolicy><trustLevel name="Full" policyFile="internal" /></securityPolicy ></system.web>
Thanks for the reply. I did try this before and I got this runtime error:
Description:An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
But i already have<customErrorsmode="off"/> in my config file. Im not sure what to do.
Hi grogo21,
Based on my understanding, this is because the site administrator of your online server has locked access to this section so you are not able to override the setting. In application hosting scenarios, administrator might want to lock some settings of an ASP.NET application to prevent modification at lower levels. You need to contact your site administrator for help if you don't have such permissions.
Please check this document for more details.
http://msdn2.microsoft.com/en-us/library/ms178693.aspx