473,385 Members | 1,445 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,385 software developers and data experts.

Access denied to path

Hi everyone,

I'm new to asp.net and would really appreciate some help. Not too sure where
this post should be so sorry if it's in the wrong place.

i'm trying to upload files to a server with the following method:
myFile.PostedFile.SaveAs(Server.MapPath("upload") & strFileNameOnly)

I've changed the permissions to allow aspnet to r/w/mod the folder but it
keeps on throwing the message:
Access to path 'D:\...\upload' is denied.

I've looked through some of the other posts with similar problems with no
luck. Tearing my hair out at this stage.

If any more information is need please let me know.

Thanks,
Andrew.
Dec 14 '05 #1
4 4215
Is D:\ a mapped network drive? If so, the access attempt will be made by
domain\machinename$ - NOT the local ASPNET account. Search around for
information about ASP.NET and impersonation across network boundaries.
fanto wrote:
Hi everyone,

I'm new to asp.net and would really appreciate some help. Not too sure where
this post should be so sorry if it's in the wrong place.

i'm trying to upload files to a server with the following method:
myFile.PostedFile.SaveAs(Server.MapPath("upload") & strFileNameOnly)

I've changed the permissions to allow aspnet to r/w/mod the folder but it
keeps on throwing the message:
Access to path 'D:\...\upload' is denied.

I've looked through some of the other posts with similar problems with no
luck. Tearing my hair out at this stage.

If any more information is need please let me know.

Thanks,
Andrew.

Dec 15 '05 #2
cheers for the quick reply,

i'm just running asp.net on my own computer at the moment, so as far as I
know its not a mapped network drive simply a hd on my machine (is this right?
as I said I'm new to this).

i've tried <identity impersonate="false" /> and <identity impersonate="true"
/> in the web.config file, and I don't have any user accounts on the site.

have I missed your point or am I doing something else wrong?

thanks again...

Joshua Flanagan wrote:
Is D:\ a mapped network drive? If so, the access attempt will be made by
domain\machinename$ - NOT the local ASPNET account. Search around for
information about ASP.NET and impersonation across network boundaries.
Hi everyone,

[quoted text clipped - 15 lines]
Thanks,
Andrew.

Dec 15 '05 #3
anyone else have any ideas? where am I going wrong??
fanto wrote:
cheers for the quick reply,

i'm just running asp.net on my own computer at the moment, so as far as I
know its not a mapped network drive simply a hd on my machine (is this right?
as I said I'm new to this).

i've tried <identity impersonate="false" /> and <identity impersonate="true"
/> in the web.config file, and I don't have any user accounts on the site.

have I missed your point or am I doing something else wrong?

thanks again...
Is D:\ a mapped network drive? If so, the access attempt will be made by
domain\machinename$ - NOT the local ASPNET account. Search around for

[quoted text clipped - 5 lines]
Thanks,
Andrew.


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200512/1
Dec 15 '05 #4
Ok, if it is a local HD, its not the problem I mentioned previously.

I think you also need to give ASPNET access to the root of the drive
(not just the subfolder). So trying giving at least Read access to D:\.

This article should tell you all of the rights that ASPNET requires:
http://msdn.microsoft.com/library/de...SecNetHT01.asp

Hope that helps.

Joshua Flanagan
http://flimflan.com/blog
Dec 15 '05 #5

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

Similar topics

1
by: Theerachet Pratoommanee | last post by:
This is error message I've got. Any suggestion would be appreciated. Server Error in '/WebDirectory' Application. ----------------------------------------------------------------------------...
4
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following...
0
by: Goran | last post by:
Hi I have created a very simple ASP.Net application that only consists of a CrystalReports Viewer, that has been connected to a .rpt file. When the page is loaded in the browser, the following...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
1
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
2
by: stephen | last post by:
Hi, I am getting an Error "Access to the path...... is denied" Error. I have an web app and I am creating a log file to write the error info. If I have the absolute path...
1
by: cpajoe2001 | last post by:
I am having an issue and after searching around online for a day and half now and finding others with the same problem but yet no solution to my issue I am looking for help. What i have is ServerA...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: p.thorn.ru | last post by:
Hello, I am running db2 express-c 9.5 under linux (fedora 7), and my error log frequently shows messages like these: 2008-01-08-18.30.01.952964+180 I651334G1048 LEVEL: Error (OS) PID ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.