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

IIS Worker Process and File Access

Hi all,
If this isn't the write forum for this question, I appologize, but
it's kind of a mix of ASP.NET and IIS. Anyway, my question is this.
If an ASP.NET site is writing to a file, does the file get written as
soon as the request is processed or once the IIS Worker Process queues
it up? For example:

Users 1, 2, and 3 all hit the page that called the file write at the
same time. Am I left to deal with a file access violation because
users 2 and 3 can't access the file while user 1 is writing to it, or
will all requests get written without incident because the worker
process has to write them all in sequence?

This is more of a precautionary question than a problem I'm having.
Of course, regardless of what's "supposed" to happen I'm still going
to handle any exceptions that arrise, but I figured I should find out
what the ruling is as well.

Thanks,
Matt

Sep 4 '07 #1
2 2009
You should code your page so users write unique file names.

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/
======================================
"Matt MacDonald" <ma******@gmail.comwrote in message news:11*********************@r29g2000hsg.googlegro ups.com...
Hi all,
If this isn't the write forum for this question, I appologize, but
it's kind of a mix of ASP.NET and IIS. Anyway, my question is this.
If an ASP.NET site is writing to a file, does the file get written as
soon as the request is processed or once the IIS Worker Process queues
it up? For example:

Users 1, 2, and 3 all hit the page that called the file write at the
same time. Am I left to deal with a file access violation because
users 2 and 3 can't access the file while user 1 is writing to it, or
will all requests get written without incident because the worker
process has to write them all in sequence?

This is more of a precautionary question than a problem I'm having.
Of course, regardless of what's "supposed" to happen I'm still going
to handle any exceptions that arrise, but I figured I should find out
what the ruling is as well.

Thanks,
Matt

Sep 4 '07 #2
I am not sure what is the question.
That is how file system designed. It's not really supporting simultaneous
access.
Use MS SQL (or any other database) for that. Or come up with single
threaded "Writer" that will queue up requests to write to file (not really a
good solution).

George.
"Matt MacDonald" <ma******@gmail.comwrote in message
news:11*********************@r29g2000hsg.googlegro ups.com...
Hi all,
If this isn't the write forum for this question, I appologize, but
it's kind of a mix of ASP.NET and IIS. Anyway, my question is this.
If an ASP.NET site is writing to a file, does the file get written as
soon as the request is processed or once the IIS Worker Process queues
it up? For example:

Users 1, 2, and 3 all hit the page that called the file write at the
same time. Am I left to deal with a file access violation because
users 2 and 3 can't access the file while user 1 is writing to it, or
will all requests get written without incident because the worker
process has to write them all in sequence?

This is more of a precautionary question than a problem I'm having.
Of course, regardless of what's "supposed" to happen I'm still going
to handle any exceptions that arrise, but I figured I should find out
what the ruling is as well.

Thanks,
Matt

Sep 4 '07 #3

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

Similar topics

9
by: Matt Calhoon | last post by:
Hi there, I have specified a aspnet user account to run all .net sites. This account needs access to start a .BAT File (in my global.asax on session start the app needs to execute this bat...
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...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
11
by: Richard Myers | last post by:
Hello Im sure many of you have seen this error message before: For us its the third time this year. This error occurs seemingly at random. I have no idea what causes it too happen. None....
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
1
by: Diffident | last post by:
Hello All, I have been caching an object in a web app and I am running the web app on my localhost i.e., local machine which has its own IIS web server. Now my question is if I access web...
4
by: Brian Gideon | last post by:
I'm having a problem with the amount of time it takes to initialize an application pool on IIS 6.0. Upon the first request to an ASP.NET page the worker process (w3wp.exe) starts up. The problem...
1
by: nicerun | last post by:
I'm using the Application_Start event at Global.asax.cs to invoke thread that do some job. I know that Application_Start event occurs when the very first request to Web Application received. -...
1
by: wojski696969 | last post by:
Hi.. i've got the serious problem.. In my ASP.NET 2.0 application I'm using COM dll file referenced by interop dll. I'm using few properties from in one of the objects made from this library...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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...

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.