473,320 Members | 2,041 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,320 software developers and data experts.

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

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
Nov 19 '05 #1
4 2178
"Feng Chun" <fe******@newsgroup.nospam> wrote in news:ueeGrS5pFHA.3884
@TK2MSFTNGP10.phx.gbl:
how to solve this issue?


Write to a central file sever or file share?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
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?

"Feng Chun" wrote:
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

Nov 19 '05 #3
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 <RE********@rogers.com>
| References: <ue**************@TK2MSFTNGP10.phx.gbl>
| Organization: None of Your Business!!!
| Message-ID: <Xn**************************@127.0.0.1>
| User-Agent: Xnews/??.01.30
| X-Face:
#gFwhH/LPM9"eq<Dzb3~[P'7%dS98vHkcFbX;SjezglosS.OP?:tzhHT7o=G03o0%St#;xT bMCCP
'rF/EnVDK-y*a(Qh3J)+Fn]"/&@D(dOG=ITH!\afBA$O}D";gSvoEpfd
| Reply-To: RE********@rogers.com
| Lines: 11
| X-Complaints-To: ab***@easynews.com
| 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!tornad o.fastwebnet.it!tiscali!ne
wsfeed1.ip.tiscali.net!newshub.sdsu.edu!newsfeed.n ews2me.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
|
| "Feng Chun" <fe******@newsgroup.nospam> wrote in news:ueeGrS5pFHA.3884
| @TK2MSFTNGP10.phx.gbl:
|
| > how to solve this issue?
|
| Write to a central file sever or file share?
|
| --
| Lucas Tam (RE********@rogers.com)
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/
|

Nov 19 '05 #4
You could think about trying to use sticky sessions, its usually a feature
of network load balancing - search google for Single Affinity load
balancing.

You can read a little about it here then ask your network admin to help you
enable it if its what your looking for.

http://www.microsoft.com/technet/pro...ng/nlbfaq.mspx

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Feng Chun" <fe******@newsgroup.nospam> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
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

Nov 19 '05 #5

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

Similar topics

11
by: Sebastian Krause | last post by:
Hello, I tried to read in some large ascii files (200MB-2GB) in Python using scipy.io.read_array, but it did not work as I expected. The whole idea was to find a fast Python routine to read in...
4
by: see_mun_lee | last post by:
I use asp to develop a web page to read an excel file containing Chinese Character then display it in the web page. Unfortunately, I cant display it!!! it will display (?????????). <META...
2
by: Jim Richards | last post by:
I have been told by a local PC club technician that 98SE cannot read NTFS drives in a network. Is this true? TIA, Jim.
7
by: MLH | last post by:
I would like to read a MAC address from at least one NIC in a PC on which I have an Access 97 runtime app installed. What's the least hassel method you know of?
19
by: Holger Hasselbach | last post by:
- The value of the object allocated by the malloc function is used (7.20.3.3). - The value of any bytes in a new object allocated by the realloc function beyond the size of the old object are used...
3
by: gn | last post by:
Due to the production servers being a multiple server farm and not being able to write xml files to them, I am having to change my application to write to HttpContext.Current.Application("var") I...
5
by: Sumana | last post by:
Hi All, We developed our project on VC++.Net console application to create image of disk and to write the image We are having problem with reading and writing the sector beyond 6GB Disk or...
1
by: shank | last post by:
I borrowed the below code from http://www.brainjar.com/asp/dirlist/ and cannot get it to read my folder files. I don't get any errors or any output to screen. I have the below folder permissions...
3
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I have an xsd that I want to save as an XML string to store in a DB I can save as a physical file using xsd.WriteXml(@"C:\Temp\Junk\junk.xml"); But I am unable to save to a string so I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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...

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.