Read/Write to a physical file in a web farm?

F

Feng Chun

Hi,
need help for this.
In asp.net, when I do a load balancing on my website, which means there are
2 or more servers behind, one of my webpage needs to read/write a temp file
in the server. But the client's first request may go to the first server,
but the second request goes to the second server, so there is a chance that
the request could not find the correct file to read/write.

how to solve this issue?

Thanks a lot.

Best Regards,
fengchun
 
G

Guest

You can take the example of Brinkster web hosting. All files are located in a
centralized location.

You may of course, need to have the FilePaths etc in the Web.config or the
related configuration files.

Did this attend to your query?
 
S

Steven Cheng[MSFT]

Hi Feng,

Since File system it self is not server transparent so directly read/write
file in asp.net web application will cause problems in loading balance
enviornment. Generally, we would suggest avoid such temp file processing.
If it is really necessary to do so, I think you can consider Lucas's
suggestion on make temp dir in a shared public place. Also, you can make
check when accessing the temp file, if not exist recreate it again.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: Read/Write to a physical file in a web farm?
| From: Lucas Tam <[email protected]>
| References: <[email protected]>
| Organization: None of Your Business!!!
| Message-ID: <[email protected]>
| User-Agent: Xnews/??.01.30
| X-Face:
#gFwhH/LPM9"eq<Dzb3~[P'7%dS98vHkcFbX;SjezglosS.OP?:tzhHT7o=G03o0%St#;xTbMCCP
'rF/EnVDK-y*a(Qh3J)+Fn]"/&@D(dOG=ITH!\afBA$O}D";gSvoEpfd
| Reply-To: (e-mail address removed)
| Lines: 11
| X-Complaints-To: (e-mail address removed)
| X-Complaints-Info: Please be sure to forward a copy of ALL headers
otherwise we will be unable to process your complaint properly.
| Date: Tue, 23 Aug 2005 04:30:55 GMT
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!ne
wsfeed1.ip.tiscali.net!newshub.sdsu.edu!newsfeed.news2me.com!newsfeed2.easyn
ews.com!easynews.com!easynews!easynews-local!fe04.news.easynews.com.POSTED!n
ot-for-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:119620
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| @TK2MSFTNGP10.phx.gbl:
|
| > how to solve this issue?
|
| Write to a central file sever or file share?
|
| --
| Lucas Tam ([email protected])
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top