Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Environment.SpecialFolder.ApplicationData problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Stoop - 07 Mar 2008 13:16 GMT
Hi,

In my ASP.NET application I want to rerieve the APPDATA folder of the logged
in user. The Web Application is using C# .NET 1.1  and has
Impersonation=True

I use this code:

"string
appdata=Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString()";

If my Web application is launched as an Administrator then variable gets
set, but if the user who launches it is not a Domain Administrator the
variable is blank and I get an Exception.

Is this expected behviour?
Can I expect this to work with .NET 2.0 ??

thanks,
Kevin Spencer - 07 Mar 2008 14:29 GMT
The logged-in user must have FileIOPermissionAccess.PathDiscovery permission
to execute this method.

Signature

HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

> Hi,
>
[quoted text clipped - 15 lines]
>
> thanks,
Brian Stoop - 07 Mar 2008 14:55 GMT
Thanks Kevin.

When you say "must have this permission". Is this somthing set
environmentally, or is it just enabled it in code for any user?

Brian

> The logged-in user must have FileIOPermissionAccess.PathDiscovery
> permission to execute this method.
[quoted text clipped - 18 lines]
>>
>> thanks,
Kevin Spencer - 10 Mar 2008 12:57 GMT
It is a System or Active Directory permission that must be granted to the
user account.

Signature

HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

> Thanks Kevin.
>
[quoted text clipped - 25 lines]
>>>
>>> thanks,
Brian Stoop - 07 Mar 2008 22:16 GMT
I've made a general post, thanks for you help, B

> The logged-in user must have FileIOPermissionAccess.PathDiscovery
> permission to execute this method.
[quoted text clipped - 18 lines]
>>
>> thanks,

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.