Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > File folder access exception

Reply
Thread Tools

File folder access exception

 
 
David C
Guest
Posts: n/a
 
      09-24-2007
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


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      09-24-2007
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)

David C wrote:
> 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
>
>

 
Reply With Quote
 
 
 
 
David C
Guest
Posts: n/a
 
      09-24-2007
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
"bruce barker" <(E-Mail Removed)> wrote in message
news:ukAfKBs$(E-Mail Removed)...
> 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)
>
> David C wrote:
>> 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



 
Reply With Quote
 
Norman Yuan
Guest
Posts: n/a
 
      09-24-2007
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.


"David C" <(E-Mail Removed)> wrote in message
news:eDHMP1r$(E-Mail Removed)...
>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


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
>


 
Reply With Quote
 
David C
Guest
Posts: n/a
 
      09-24-2007
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
"Norman Yuan" <(E-Mail Removed)> wrote in message
news:elKyJEs$(E-Mail Removed)...
> 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.
>
>
> "David C" <(E-Mail Removed)> wrote in message
> news:eDHMP1r$(E-Mail Removed)...
>>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

>
> 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
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse to Folder instead of Folder + File Dan ASP .Net 7 10-28-2010 07:39 AM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Set folder date to date of newest file in the folder? jhigbee@nyx.net Computer Support 4 08-16-2005 08:09 PM
An Automated process of watching a network file folder, reading a file in it and deleting the file using ASP.NET ? Luis Esteban Valencia Muņoz ASP .Net 3 06-04-2005 10:56 AM



Advertisments