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

Security-exception when performing File.Move()

Hi!

I'm in the process of writing a ASP.NET-application in VB.NET where a
(at this stage) not logged in user is supposed to be able to move a file
from one location to another on the servers harddrive, File.Move().

I've read through loads of guides and they all say "Add
write-permissions to your ASPNET-account".
Well, I've done this - and way more. I've even tried to add the
ASPNET-account to the Administrators-group, but still no success.
All I get is:
System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\filePermissionTest\test_ikon2. gif" is denied.

By now I'm beginning to wonder what it is that I'm missing. I've
restarted the W3SVC-service to see if there were any cached settings
left, but obviously not.

I've also checked the "Write"-checkbox in the dialog for the application
under the IIS-console, but nothing there either. =(

Does anyone have any idea what so ever what setting it is that I've missed?

TIA!
Fredrik Arenhag
Nov 18 '05 #1
3 2072

"Fredrik Arenhag" <fr*************@reallife.se> wrote in message
news:#$**************@tk2msftngp13.phx.gbl...
Hi!

I'm in the process of writing a ASP.NET-application in VB.NET where a
(at this stage) not logged in user is supposed to be able to move a file
from one location to another on the servers harddrive, File.Move().

I've read through loads of guides and they all say "Add
write-permissions to your ASPNET-account".
Well, I've done this - and way more. I've even tried to add the
ASPNET-account to the Administrators-group, but still no success.
All I get is:
System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\filePermissionTest\test_ikon2. gif" is denied.

By now I'm beginning to wonder what it is that I'm missing. I've
restarted the W3SVC-service to see if there were any cached settings
left, but obviously not.

I've also checked the "Write"-checkbox in the dialog for the application
under the IIS-console, but nothing there either. =(

Does anyone have any idea what so ever what setting it is that I've missed?
TIA!
Fredrik Arenhag


You might check the permissions that is actually being used, it might point
to something.

http://hintsandtips.com/hat.aspx?P=S...C=31&F=100&T=5
--
Rocky Moore
www.HintsAndTips.com
Nov 18 '05 #2
One possibility: A file is locked while an application has it opened. Did
your app create or open the file and not close it at some point? Is it
possible that some other application is using it?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Fredrik Arenhag" <fr*************@reallife.se> wrote in message
news:#$**************@tk2msftngp13.phx.gbl...
Hi!

I'm in the process of writing a ASP.NET-application in VB.NET where a
(at this stage) not logged in user is supposed to be able to move a file
from one location to another on the servers harddrive, File.Move().

I've read through loads of guides and they all say "Add
write-permissions to your ASPNET-account".
Well, I've done this - and way more. I've even tried to add the
ASPNET-account to the Administrators-group, but still no success.
All I get is:
System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\filePermissionTest\test_ikon2. gif" is denied.

By now I'm beginning to wonder what it is that I'm missing. I've
restarted the W3SVC-service to see if there were any cached settings
left, but obviously not.

I've also checked the "Write"-checkbox in the dialog for the application
under the IIS-console, but nothing there either. =(

Does anyone have any idea what so ever what setting it is that I've missed?
TIA!
Fredrik Arenhag

Nov 18 '05 #3
Thank you very much for your tip, it has brought me one step closer to
my target!

On my WinXP machine it told me that it was the ASPNET-account which was
being used and through that I could resolve the problem.

However, when doing this on my Win2k3-server it tells me that it's the
"NT AUTHORITY\NETWORK SERVICE" that's being used. Adding rights for this
account as I did for the ASPNET-account on my own machine didn't help.
So I guess I'm stuck again =(

Any more tips up your sleeve? =)

/
Fredrik Arenhag
Rocky Moore wrote:
"Fredrik Arenhag" <fr*************@reallife.se> wrote in message
news:#$**************@tk2msftngp13.phx.gbl...
Hi!

I'm in the process of writing a ASP.NET-application in VB.NET where a
(at this stage) not logged in user is supposed to be able to move a file
from one location to another on the servers harddrive, File.Move().

I've read through loads of guides and they all say "Add
write-permissions to your ASPNET-account".
Well, I've done this - and way more. I've even tried to add the
ASPNET-account to the Administrators-group, but still no success.
All I get is:
System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\filePermissionTest\test_ikon 2.gif" is denied.

By now I'm beginning to wonder what it is that I'm missing. I've
restarted the W3SVC-service to see if there were any cached settings
left, but obviously not.

I've also checked the "Write"-checkbox in the dialog for the application
under the IIS-console, but nothing there either. =(

Does anyone have any idea what so ever what setting it is that I've


missed?
TIA!
Fredrik Arenhag

You might check the permissions that is actually being used, it might point
to something.

http://hintsandtips.com/hat.aspx?P=S...C=31&F=100&T=5
--
Rocky Moore
www.HintsAndTips.com

Nov 18 '05 #4

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

Similar topics

28
by: grahamd | last post by:
Who are the appropriate people to report security problems to in respect of a module included with the Python distribution? I don't feel it appropriate to be reporting it on general mailing lists.
1
by: Mike | last post by:
Hi all, I'm trying to decide between two books for Oracle Financials security - there seem to be two obvious possibilities. The books are "Oracle E-Business Suite Financials Administrations" by...
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
6
by: google | last post by:
I have a few general questions. I am working on a new database to be used within my company. I would like to give a couple of people, particularly HR, the ability to add and delete Access users,...
1
by: Shimon Sim | last post by:
How to specify security access for assembly running in ASP.NET? FxCop requests it always and I always ignore it. I am thinking that this is good thing to know how to do. I usually need the...
2
by: Nick | last post by:
Is there a way to do declarative security on abstract classes? I am working on a data access layer and would like to place all permission requirements on the base class so all inherited classes...
15
by: himilecyclist | last post by:
My State government organization has written a PHP/MySQL application which has been in production for about 6 months and has been highly successful. We are now embarking on a similar database...
18
by: Earl Anderson | last post by:
First, I feel somewhat embarrassed and apologetic that this post is lengthy, but in an effort to furnish sufficient information (as opposed to too little information) to you, I wanted to supply all...
0
by: mr man | last post by:
I try to play runescape and this came up......this comes up with all java java.security.PrivilegedActionException: java.io.FileNotFoundException: C:\Documents and Settings\HP_Owner\Application...
7
by: thebarefootnation | last post by:
Hi, I have created an access db that I would like to secure. The database will exist on a shared drive and be used at a number of different locations hence the reason to secure the database. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: 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.