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

Windows server and cache problems?

Hi all,

I have a (in my opinion) strange problem. I created an application
that are extracting exchange rates from a web page and then inserts
those in a ms sql database.

When I´m running this application on my local machine, everything
works fine. All rates are updated. But when I run it on the server, it
´s always gets the same result. No update at all. It´s like the result
are cached or something.

Does anyone have any idea about this?

Cheers!

/Marre

Sep 11 '07 #1
4 1368
Hello, Supremelink!

Are you sure that content from the web page gets downloaded by your
application?
How do you retrieve web page content? Can you throw in some code?

Are there any proxies between your local computer and web server. Or between
work server and web server.?

--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You wrote on Tue, 11 Sep 2007 03:19:45 -0700:

SHi all,

SI have a (in my opinion) strange problem. I created an application
Sthat are extracting exchange rates from a web page and then inserts
Sthose in a ms sql database.

SWhen I´m running this application on my local machine, everything
Sworks fine. All rates are updated. But when I run it on the server,
Sit ´s always gets the same result. No update at all. It´s like the
Sresult are cached or something.

SDoes anyone have any idea about this?

SCheers!

S/Marre
Sep 11 '07 #2
Hi Vadym,

The strange thing here is that it works on my local computer.

I´m reading the page as a string and then just extracts the rates. Here
´s some code:

HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(currentUrl);

string proxyUrl=ConfigurationManager.AppSettings["ProxyServer"];
if (null == proxyUrl || proxyUrl.Length == 0)
{
log.Info("WebRates::readContent() Not using proxy server");
}
else
{
log.Info(String.Format("WebRates::readContent() Using proxy
server: {0}", proxyUrl));
WebProxy proxy = new WebProxy(proxyUrl, true);
request.Proxy=proxy;
}

response = request.GetResponse();
stream = response.GetResponseStream();
reader = new StreamReader(stream);

content = reader.ReadToEnd();

log.Info(String.Format("WebRates::readContent() Content read
successfully, number of characters read: {0}", content.Length));
return true;

I´m extracting exchange rates from content.

I think it might be a proxy server between. Does that have any impact
on this?

Thanks for youre answer!

Regards
Martin

On Sep 11, 12:57 pm, "Vadym Stetsiak" <vadm...@gmail.comwrote:
Hello,Supremelink!

Are you sure that content from the web page gets downloaded by your
application?
How do you retrieve web page content? Can you throw in some code?

Are there any proxies between your local computer and web server. Or between
work server and web server.?

--
With best regards, Vadym Stetsiak.
Blog:http://vadmyst.blogspot.com

You wrote on Tue, 11 Sep 2007 03:19:45 -0700:

SHi all,

SI have a (in my opinion) strange problem. I created an application
Sthat are extracting exchange rates from a web page and then inserts
Sthose in a ms sql database.

SWhen I´m running this application on my local machine, everything
Sworks fine. All rates are updated. But when I run it on the server,
Sit ´s always gets the same result. No update at all. It´s like the
Sresult are cached or something.

SDoes anyone have any idea about this?

SCheers!

S/Marre

On Sep 11, 12:57 pm, "Vadym Stetsiak" <vadm...@gmail.comwrote:
Hello,Supremelink!

Are you sure that content from the web page gets downloaded by your
application?
How do you retrieve web page content? Can you throw in some code?

Are there any proxies between your local computer and web server. Or between
work server and web server.?

--
With best regards, Vadym Stetsiak.
Blog:http://vadmyst.blogspot.com

You wrote on Tue, 11 Sep 2007 03:19:45 -0700:

SHi all,

SI have a (in my opinion) strange problem. I created an application
Sthat are extracting exchange rates from a web page and then inserts
Sthose in a ms sql database.

SWhen I´m running this application on my local machine, everything
Sworks fine. All rates are updated. But when I run it on the server,
Sit ´s always gets the same result. No update at all. It´s like the
Sresult are cached or something.

SDoes anyone have any idea about this?

SCheers!

S/Marre

Oct 1 '07 #3
Hello, Supremelink!

Yes, proxies can impact data received by you.
You can try to specify additional header , Pragma: no-cache, where "pragma"
is header name and "no-cache" is header value.
--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You wrote on Mon, 01 Oct 2007 01:34:46 -0700:

SHi Vadym,

SThe strange thing here is that it works on my local computer.

SI´m reading the page as a string and then just extracts the rates.
SHere ´s some code:

SHttpWebRequest request =
S(HttpWebRequest)WebRequest.Create(currentUrl);

Sstring proxyUrl=ConfigurationManager.AppSettings["ProxyServer"];
Sif (null == proxyUrl || proxyUrl.Length == 0)
S{
Slog.Info("WebRates::readContent() Not using proxy server");
S}
Selse
S{
Slog.Info(String.Format("WebRates::readContent() Using proxy
Sserver: {0}", proxyUrl));
SWebProxy proxy = new WebProxy(proxyUrl, true);
Srequest.Proxy=proxy;
S}

Sresponse = request.GetResponse();
Sstream = response.GetResponseStream();
Sreader = new StreamReader(stream);

Scontent = reader.ReadToEnd();

Slog.Info(String.Format("WebRates::readContent() Content read
Ssuccessfully, number of characters read: {0}", content.Length));
Sreturn true;

SI´m extracting exchange rates from content.

SI think it might be a proxy server between. Does that have any impact
Son this?

SThanks for youre answer!

SRegards
SMartin

SOn Sep 11, 12:57 pm, "Vadym Stetsiak" <vadm...@gmail.comwrote:
>Hello,Supremelink!
>Are you sure that content from the web page gets downloaded by your
application?
How do you retrieve web page content? Can you throw in some code?
>Are there any proxies between your local computer and web server. Or
between work server and web server.?
>--
With best regards, Vadym Stetsiak.
Blog:http://vadmyst.blogspot.com
>You wrote on Tue, 11 Sep 2007 03:19:45 -0700:
S>>Hi all,

S>>I have a (in my opinion) strange problem. I created an application
S>>that are extracting exchange rates from a web page and then inserts
S>>those in a ms sql database.

S>>When I´m running this application on my local machine, everything
S>>works fine. All rates are updated. But when I run it on the server,
S>>it ´s always gets the same result. No update at all. It´s like the
S>>result are cached or something.

S>>Does anyone have any idea about this?

S>>Cheers!

S>>/Marre
SOn Sep 11, 12:57 pm, "Vadym Stetsiak" <vadm...@gmail.comwrote:
>Hello,Supremelink!
>Are you sure that content from the web page gets downloaded by your
application?
How do you retrieve web page content? Can you throw in some code?
>Are there any proxies between your local computer and web server. Or
between work server and web server.?
>--
With best regards, Vadym Stetsiak.
Blog:http://vadmyst.blogspot.com
>You wrote on Tue, 11 Sep 2007 03:19:45 -0700:
S>>Hi all,

S>>I have a (in my opinion) strange problem. I created an application
S>>that are extracting exchange rates from a web page and then inserts
S>>those in a ms sql database.

S>>When I´m running this application on my local machine, everything
S>>works fine. All rates are updated. But when I run it on the server,
S>>it ´s always gets the same result. No update at all. It´s like the
S>>result are cached or something.

S>>Does anyone have any idea about this?

S>>Cheers!

S>>/Marre

Oct 1 '07 #4
Hi Vadym

Thanks a lot! I will try this and leave you a message regarding the
progress.

Cheers!
/Martin

On Oct 1, 3:30 pm, "Vadym Stetsiak" <vadm...@gmail.comwrote:
Hello, Supremelink!

Yes, proxies can impact data received by you.
You can try to specify additional header , Pragma: no-cache, where "pragma"
is header name and "no-cache" is header value.
--
With best regards, Vadym Stetsiak.
Blog:http://vadmyst.blogspot.com
Oct 3 '07 #5

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
13
by: long5120 | last post by:
I am trying to use webpage with javascript to check if a web server is responding. I was thinking of using 2 frames. Frame1 will have the site, and the Frame2 will be a status bar (not really...
8
by: Phoenix | last post by:
Here's a challenge that is killing me: I've got 2 web servers and a SQL Server and about 5,000 'users' who stay connected to the site all day. I have a page that is supposed to be 'real-time',...
1
by: Doug Lim | last post by:
I have an ASP.NET application that I've developed using Visual Studio ..NET 2003 and I'm making use of Crystal Reports for .NET that's included to return reports back to the visitor's web browser...
17
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the...
1
by: Zubair.NET! | last post by:
In our web application we are calling different XML Webservices and make approximately 25 calls every 10 minutes. We use a separate thread to call a the webservice (Crawler) and populate our cache...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
5
by: Joseph Geretz | last post by:
Of course, I can store a C# class instance to the Server Cache (this.Context.Cache). I've tried it. My question is, will this destroy the scalability of my application? My background is VB6....
4
by: DudDav | last post by:
Hi All, I have been trying to configured WebDAV on our current IIS server as an alternative to FTP and have had some mixed success but I've hit a brick wall with one problem. The server...
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:
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.