Re: Pages are not served correctly (http return code 304)

C

Craig Deelsnyder

Avijit said:
Hi:

I have written a small ASP.NET app to display various graphs and data using C# codebehind classes etc. and works for the most part fine on a local machine (i.e., browser on the same XP Pro box where IIS is running).

The problem is I am getting response code 304 randomly for some of the pages (one of them just displays a few images) and when I access this application from another computer most of the page requests are getting 304 and as a result it's not working properly.

Here is part of the server log:

--------------------------------
20:45:55 127.0.0.1 GET /about.aspx 200
20:45:55 127.0.0.1 GET /doc-styles.css 200
20:45:55 127.0.0.1 GET /images/banner_image_omni3.jpg 304 <===========
20:45:55 127.0.0.1 GET /images/watermark.png 304 <===========
20:45:55 127.0.0.1 GET /images/top-menu-bg.png 200
--------------------------------

I am not sure what's wrong.

Here is the configuration for my system:

1. OS Win XP Pro SP 1
2. IIS 5.1
3. ASP.NET 1.1.4322.573

doesn't 304 mean 'not modified'? i think that's valid, as the browser
asks with an 'if-modified-since', but the server says no need to resend,
it's still 'current content'....sounds more like a browser problem,
asking for that check, but not utilizing it correctly...have you tried
other browsers?
 
G

Guest

I have tried IE 6.0, Opera 7.5 and Firefox 0.9.2.
Should I be setting something in the response header (saying that content expired?)

Thanks,

Avijit
 
S

Steven Cheng[MSFT]

Hi Avijit,

As for the 304 code, its the normal response from the webserver when the
client browser request some certain static resources such as images. The
client browser will send with a date of the client cache and the webserver
return the status code indicate whether the requested resouce has been
modified or not. 304 means hasn't been modified:
#http status code
http://msdn.microsoft.com/library/en-us/winhttp/http/http_status_codes.asp?f
rame=true

And I think you can first try clearing the client browser's cache files and
retest again to see whether this can solve the problem.
In addition, as for the set the content expired in WebServer, you can set
it in IIS managed console, in the
"HTTP Headers" panel of the Manage Console, then check the
"Enable Content Expiration" option,
after that, you'll see three option below it, choose
"Expire Immediately" will make the response expire at once without client
caching.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
G

Guest

I ran into a different problem and hoping that you will be able to send me some info. While trying to use your suggestion, I also installed an automatic update that fixes an IIS bug (KB811114).

After this installation, I cannot open my project using visual studio - the "Connecting to the web server" dialog remains open forever. I am also unable to see the web pages .. browser (IE 6.0 ) hangs forever and the web log shows the following error:

----------------------
07:56:29 127.0.0.1 GET /MyApp/get_aspx_ver.aspx 404
07:56:29 10.5.1.78 OPTIONS / 200
07:56:29 10.5.1.78 PROPFIND /WWWROOT$ 404
07:57:17 127.0.0.1 GET /WebApplication1/WebForm1.aspx 500

----------------------

Please note that I was also unable to create a new Web app using visual studio.

How do I fix it?

Thanks,

Avijit
 
S

Steven Cheng[MSFT]

Hi Avijit,

Thanks for your followup. From the further information you provided, the
problem seems become more complex and seems that there're something wrong
with the ASP.NET service on that machine. I think we could start from the
following steps first:

1. Since the log indicate that you can't visit the asp.net web pages, then
what about view static Html pages in a virtual folder? If work then try
view a asp page to see it works.

2. If The #1 work, then try make a very simple aspx page(no code behind
needed)
and put into a certain virutal folder and see whether it can work. If this
not work, I'm afraid the asp.net installed on the machine may be corrupted.

Also, you can have the IIS restart first before performing the above tests.
And if you have any other findings, please also feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
J

Joe Fallon

IE 6 - is probably set like this:
Tools
Internet Options
Settings
Automatically

Change Automatically to Every Visit To Page
--
Joe Fallon



Avijit said:
I have tried IE 6.0, Opera 7.5 and Firefox 0.9.2.
Should I be setting something in the response header (saying that content expired?)

Thanks,

Avijit
using C# codebehind classes etc. and works for the most part fine on a local
machine (i.e., browser on the same XP Pro box where IIS is running).pages (one of them just displays a few images) and when I access this
application from another computer most of the page requests are getting 304
and as a result it's not working properly.
 

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
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top