Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: Pages are not served correctly (http return code 304) (http://www.velocityreviews.com/forums/t82646-re-pages-are-not-served-correctly-http-return-code-304-a.html)

Craig Deelsnyder 07-13-2004 10:17 PM

Re: Pages are not served correctly (http return code 304)
 
Avijit wrote:
> 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?

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

=?Utf-8?B?QXZpaml0?= 07-13-2004 11:18 PM

Re: Pages are not served correctly (http return code 304)
 
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


"Craig Deelsnyder" wrote:

> Avijit wrote:
> > 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?
>
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
>


Steven Cheng[MSFT] 07-14-2004 01:58 AM

Re: Pages are not served correctly (http return code 304)
 
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_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


=?Utf-8?B?QXZpaml0?= 07-14-2004 08:04 AM

Re: Pages are not served correctly (http return code 304)
 
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


"Steven Cheng[MSFT]" wrote:

> 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_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
>
>


Steven Cheng[MSFT] 07-15-2004 03:01 AM

Re: Pages are not served correctly (http return code 304)
 
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


Joe Fallon 07-15-2004 03:39 AM

Re: Pages are not served correctly (http return code 304)
 
IE 6 - is probably set like this:
Tools
Internet Options
Settings
Automatically

Change Automatically to Every Visit To Page
--
Joe Fallon



"Avijit" <avijit@nospam.nospam> wrote in message
news:0846D6CD-ADB5-4050-BD53-53C570BB33FD@microsoft.com...
> 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
>
>
> "Craig Deelsnyder" wrote:
>
> > Avijit wrote:
> > > 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?
> >
> > --
> > Craig Deelsnyder
> > Microsoft MVP - ASP/ASP.NET
> >





All times are GMT. The time now is 07:24 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.