473,761 Members | 3,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Upload Permissions

I am trying to execute a file upload of a file but I ghet the error shown
below. I do have MyMachine\ASPNE T 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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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 1265
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******** ******@TK2MSFTN GP12.phx.gbl...
I am trying to execute a file upload of a file but I ghet the error shown
below. I do have MyMachine\ASPNE T 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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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**********@h otmail.com> wrote in message
news:uj******** *****@TK2MSFTNG P10.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******** ******@TK2MSFTN GP12.phx.gbl...
I am trying to execute a file upload of a file but I ghet the error shown
below. I do have MyMachine\ASPNE T 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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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="tr ue"/> 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********@gma il.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="tr ue"/> 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********@gma il.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="tr ue"/> 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.Nam e()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsI dentity.GetCurr ent.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******** ******@TK2MSFTN GP12.phx.gbl...
Where in the Web.Config file do you put that?

Wayne

"dimpy" <hi********@gma il.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I am not 100% sure but whenever I have such access problems I insert
the line <identity impersonate="tr ue"/> 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
4016
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 through our firewall. We have another server (Server1) within the SBS domain that is exposed through port 80 of the firewall on which we host some web services and images. What is the best architecture for getting the file from the remotely...
2
6063
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 server. On the line: dirs = Directory.GetDirectories(currentDir) I get "Access to the path "\\les-net\les\Special Projects\ATSPDF" is denied." How do I get the GetDirectories command to user my user ID and password when it tries to hit the...
1
2764
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" as the directory. When I use any other hard coded directory or even Server.MapPath() the upload function fails and returns the error: "Exception has been thrown by the target of an invocation." Once I change the root directory to "c:\Temp",...
9
3836
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 site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
1
2590
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 that we need to provide permissions to upload(like username password) but where we have to provide those details can you please tell me. Microsoft VBScript runtime error '800a0046'
2
2159
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 applet. Shop script works with : <input type="file" name="id"/> but not with applet's: <input type="file" name="SourceFile_1"/> I just cannot figure out how to fix this :(
4
10550
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 function on the site, which uploads files via POST to temp folder and then moves it into a folder on the host using php function move_uploaded_file. Under windows this works fine but on the linux host the uploaded file is created with 600 permissions so...
0
1403
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. Obviously, this doesn't exist in IIS, so as a workaround, I have the .net isapi dll as a wildcard handler for the site, with the rewriting done by .net, which then passes the processng back to the php pages. So far so good. When I attempt to...
1
1895
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 servers and a local server on my development network. The upload module works just fine when I'm uploading to my remote servers. But when I try to upload to my development server, I get a permission error. What I don't understand is who is...
13
2663
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 for the directory have to be 777 for this to work or esle it aborts with a permissions error - obviously a problem. The php script runs as user 'nobody'. Tech support is through email, and level one is not that bright, or at
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8770
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.