List Info

Thread: SystemUnAuthorizedException: Access is denied.




SystemUnAuthorizedException: Access is denied.
user name
2006-06-07 16:10:51
Anoop:
The ASP.NET worker process runs under a certain security
context depending
on a number of configuration parameters. By default, it uses
the local
ASPNET account on the web server for Win 2K and IIS 5 or the
local IIS_WPG
group for Win 2003 and IIS 6. By default, the privileges
given to this
user/group is very restricted and thus is probably the
source of your
permissions issue. You should explicitly grant Read to the
appropriate
account or group on the folder on the server where you're
uploading the file
to avoid the UnauthorizedException.

Impersonation behaves differently because it actually runs
the ASP.NET
requests under the account context of the currently
logged-in interactive
user. Of course, you must have Anonymous auth turned off and
Integrated auth
turned on in IIS (on the website, application or virtual
directory) for this
to work but it means the resource you're accessing (in this
case, the Excel
file) is coming in under the logged-in user's security
context and not the
ASPNET account or IIS_WPG group.

If you configure the ACL correctly on your Excel upload
folder then you
should be able to turn impersonation off on your web
application. At least
that's what I've seen in my experience.

Good luck!

Jason

----- Original Message ----- 
From: "anoop" <anoop.jaiswalmind-infotech.com>
To: <aspnet-adminaspadvice.com>
Sent: Wednesday, June 07, 2006 8:58 AM
Subject: [aspnet-admin] SystemUnAuthorizedException: Access
is denied.


> Hi All,
>
> I am new to web development and I am devloping a web
page using vs net
2003
>
> I had written a method and call it on my page through
java script.
>
> In the method I am creating new excel object to read
the uploaded excel
file
> on the server, but it throws an error of
SystemUnAuthorizedException:
Access
> is denied.
>
> The folder has all possible users and full access to
those users.
>
> but when I add <identity impersonation=true> in
my web.config file it
works
> fine on my system and return value also,
> but with this setting when I run the page from another
user machine the
> value return by the script is null.
>
> Is there any setting on server to read the uploaded
file on the server
> folder?
>
> Thanks in advance for suggestions.
>
>
>
> Thanks & Regards
>
> Anoop Jaiswal
> Soft. Engg.
> MothersonSumi INotech & Design Ltd.
> (A SEI CMM Level5 Company)
> B-7,Sector-7
> Noida,U.P.-201301
> Tel. No: +91-120-4365570
>
>
>
>
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com
>



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )