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 / September 2007

Tip: Looking for answers? Try searching our database.

File folder access exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 24 Sep 2007 16:08 GMT
I am getting the following error trying to create a folder on the file
system using an intranet internal application.

Exception: System.UnauthorizedAccessException

Message: Access to the path '\\lifedevsql\shared\FileDocs\File093969' is
denied.

When I Googled the exception I found a reference to impersonating a user in
the web.config file.  Is there any other way to allow create/modify/delete
of file folders on a separate domain server?  I have the folders referenced
as a virtual directory on the web site and have read and write permissions
in IIS.  I also have full control permissions for an AD group which will be
using this application?  Thanks.

David
bruce barker - 24 Sep 2007 16:32 GMT
the default aspnet use account is a local account without network
permissions. you can set the identity of the app pool to a domain
account, or set the account in the web.config via impersonation.

-- bruce (sqlwork.com)

> I am getting the following error trying to create a folder on the file
> system using an intranet internal application.
[quoted text clipped - 12 lines]
>
> David
David C - 24 Sep 2007 16:36 GMT
If I use impersonate="true" in the identity section of web.config will that
use the current domain users rights?  If so, that would be exactly what I
need.  What I was concerned with is I did not want to enter a username and
password in the web.config file. Thanks.

David
> the default aspnet use account is a local account without network
> permissions. you can set the identity of the app pool to a domain account,
[quoted text clipped - 18 lines]
>>
>> David
Norman Yuan - 24 Sep 2007 16:38 GMT
You must know which user account is used to run your ASP.ENT application,
which runs on a web server. by default, it is the web server's local ASPNET
or Network Service account, which naturally does not have permission to the
resources on the other computer, and enve have very limited access to the
resources on local computer.

As ASP.NET developer, you need to be very clear what resources your
application needs and configure the running user account accordingly. See
more coment inline. MOst likely, if the ASP.NET app has to access resources
on the other computers, you need to impersonate the ASP.NET app to use a
domain user account.

>I am getting the following error trying to create a folder on the file
>system using an intranet internal application.
[quoted text clipped - 9 lines]
> the folders referenced as a virtual directory on the web site and have
> read and write permissions

Which user account (domain or local) has the read/write permission? The
permission is given to certain user account.

> in IIS.  I also have full control permissions for an AD group which will
> be

You having full permission does not mean so does other user account.

> using this application?  Thanks.

a user using your web application does not necessarily mean the web
application is run under his/her credential. It is depends on how the
ASP.NET application configured.

> David
David C - 24 Sep 2007 17:41 GMT
The "Directory Security" tab on the web site is set to Integrated Windows
Authentication.  My web site is reading that users domain info in the
ASP.NET application and it returns DOMAIN\username when I get the
Page.User.Identity.Name

David
> You must know which user account is used to run your ASP.ENT application,
> which runs on a web server. by default, it is the web server's local
[quoted text clipped - 37 lines]
>
>> David

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.