473,385 Members | 1,707 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.

ASP.NET 2.0 Write File (IIS 6.0/Windows 2003)

Hello,
I wanted to write to a folder from my ASP.NET web app, but i get

Access to the path 'C:\Inetpub\wwwroot\Test\Logs\test.log' is denied. at
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode,

here is what i did

i created a Virtual Directory Test
under it there is a folder Logs
i set the propery from IIS of the logs folder to 'write'

i changed the security permission of the folder from windows explorer(right
click|properties)
and added the user IUSR_<MachineNameand ASPNET user.. i gave both users
FULL ACCESS, yet i am still not able to write to that folder.

am I missing something?

any help is greatly appreciated

Jun 27 '08 #1
1 1263
ok, i got it.. i had add to the user IIS_WPG..

"Henok Girma" <re***@here.only.comwrote in message
news:2A**********************************@microsof t.com...
Hello,
I wanted to write to a folder from my ASP.NET web app, but i get

Access to the path 'C:\Inetpub\wwwroot\Test\Logs\test.log' is denied. at
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode,

here is what i did

i created a Virtual Directory Test
under it there is a folder Logs
i set the propery from IIS of the logs folder to 'write'

i changed the security permission of the folder from windows
explorer(right click|properties)
and added the user IUSR_<MachineNameand ASPNET user.. i gave both users
FULL ACCESS, yet i am still not able to write to that folder.

am I missing something?

any help is greatly appreciated
Jun 27 '08 #2

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

Similar topics

1
by: Jesper | last post by:
Im running Windows Server 2003 trying to get my ASP.NET applications to access the file system. My Web application needs to have write access to some folders in the virtual directory from which...
1
by: yilin | last post by:
I use windows 2003 and .net 2003 to write a ASP .NET web application. the function is user can upload files to the server and the sever will save the files in the virtual directory(for example,...
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 ...
4
by: klynn | last post by:
Hi: I'm having problems reading a Microsoft Access file from my ASP.Net app on a Windows Server 2003 machine. The error message: The Microsoft database engine cannot open the file, <my_file>. It...
46
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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...

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.