473,395 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Upload Permissions

I am trying to execute a file upload of a file but I ghet the error shown
below. I do have MyMachine\ASPNET permission set but I am using IIS6 and
the error information indicates that the base process identity is "Network
Service" in that case but I cannot find any such identity? How can I grand
the necessary access?

Wayne

================================================== ==========
Exception Details: System.UnauthorizedAccessException: Access to the path
"C:\Banner.NET\images\banners\xtb_banner.swf" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.
Nov 19 '05 #1
6 1248
Hello,

Which Operating system u r using?
Also u will get the Network Services in it... try to search out using
advanced option.
--
Niraj Ranka
The will to be successfull is waste, unless u have the will to prepare!!!

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uL**************@TK2MSFTNGP12.phx.gbl...
I am trying to execute a file upload of a file but I ghet the error shown
below. I do have MyMachine\ASPNET permission set but I am using IIS6 and
the error information indicates that the base process identity is "Network
Service" in that case but I cannot find any such identity? How can I grand
the necessary access?

Wayne

================================================== ==========
Exception Details: System.UnauthorizedAccessException: Access to the path
"C:\Banner.NET\images\banners\xtb_banner.swf" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5
or Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.

Nov 19 '05 #2
I am running on WinXP Pro

Wayne

"Niraj Ranka" <ni**********@hotmail.com> wrote in message
news:uj*************@TK2MSFTNGP10.phx.gbl...
Hello,

Which Operating system u r using?
Also u will get the Network Services in it... try to search out using
advanced option.
--
Niraj Ranka
The will to be successfull is waste, unless u have the will to prepare!!!

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uL**************@TK2MSFTNGP12.phx.gbl...
I am trying to execute a file upload of a file but I ghet the error shown
below. I do have MyMachine\ASPNET permission set but I am using IIS6 and
the error information indicates that the base process identity is "Network
Service" in that case but I cannot find any such identity? How can I grand
the necessary access?

Wayne

================================================== ==========
Exception Details: System.UnauthorizedAccessException: Access to the path
"C:\Banner.NET\images\banners\xtb_banner.swf" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5
or Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in
Explorer, choose "Properties" and select the Security tab. Click "Add" to
add the appropriate user or group. Highlight the ASP.NET account, and
check the boxes for the desired access.


Nov 19 '05 #3
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="true"/> in my project's web.config
file. Try doing that and see if it works.

Regards,
Dimpy

Nov 19 '05 #4
Interesting - I'll give it a try

Wayne

"dimpy" <hi********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="true"/> in my project's web.config
file. Try doing that and see if it works.

Regards,
Dimpy

Nov 19 '05 #5
Where in the Web.Config file do you put that?

Wayne

"dimpy" <hi********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="true"/> in my project's web.config
file. Try doing that and see if it works.

Regards,
Dimpy

Nov 19 '05 #6
Anywhere inside the <system.web> section.

A warning : while that might certainly solve your problem,
it may bring on other, less obvious, problems, too, like
an account which you don't know having access permissions
to a lot of directories.

What you really should do is detect the account ASP.NET is running as,
and give *that* account the necessary permissions, instead of impersonating
an account which might be a security risk.

Save the following as identity.aspx and run it.

identity.aspx
-------------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
------------------

When you run that file, it will return the current ASP.NET identity,
i.e., the account ASP.NET is running as.

Give *that* account the permissions you need,
instead of blindly impersonating an unknown account.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:eX**************@TK2MSFTNGP12.phx.gbl...
Where in the Web.Config file do you put that?

Wayne

"dimpy" <hi********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="true"/> in my project's web.config
file. Try doing that and see if it works.

Regards,
Dimpy


Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pat Carden | last post by:
Hi, We need to allow webusers to upload a file on our website (on Server3, all servers run Server 2003, remotely hosted) and eventually save it on our SBS Server (Server2) which is not exposed...
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
1
by: BW | last post by:
I am creating an upload/download function for an extranet site. Files will be uploaded to directory based upon the users login and associated project. The function works as long as I use "c:\Temp"...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
1
by: G | last post by:
Hello Friends How are you? I came with a problem near you. I want to upload a image to my ftp, iam getting this below error. i have a code which is working in my local system, i have an idea...
2
by: Event Horizon | last post by:
Hi, I'm trying to add an simple upload applet to shopping cart script. My new applet form sends all needed post fields ( quantity, product, etc... ) but the "file" post field is hardcoded in...
4
by: Tony B | last post by:
I've moved an existing site (which I didn't write) from a apache/php/mysql host under windows to a linux apache/php/mysql host. I've sorted out most problems except one. There is an upload...
0
by: Tim Payne | last post by:
I have an odd permissions issue with uploading files to a windows 2003 server. I have a reasonably unusual setup. We have a php website, running through IIS that was written to use mod_rewrite....
1
by: lPrentice | last post by:
Hello, After all this time, Linux file permissions still confuse me at times. I have a Python web-based application with an file (images) upload module. The application is running on two remote...
13
by: eclipsme | last post by:
I thought I had this licked, but apparently not. I have a file upload script that attempts to upload a file to a directory in the public_html directory - www.domain.com/upload The permissions...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.