Not refreshing

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

I have something that seems to be related to just IE
In firefox this works fine...and this worked fine in IE ( localmode )...but
now that it has been pushed to a hosting site it does not.

I have an aspx form with a gridview control.
You hit a button, a record gets added to a database, a session variable
holds your OrderID number...
response.redirects you to a different page...
that page does some checking...and in 9 times out of 10 it
response.redirects you back to the original page.
( this happens because i was trying to fix caching and it didnt... ) ...but

What happens, on return the gridview does not refresh due to the OrderID.
Its like IE is holding a cache of the old page.

sadly, Firefox works with an asp.net page 10x better.
in ie, no gridview shows as it looks like nothing was added to the cart - no
matter how many times i click the refresh button.

Does anyone know what I could be looking at to get IE not to cache like
this?

Thanks,
Miro
 
I have something that seems to be related to just IE
In firefox this works fine...and this worked fine in IE ( localmode )...but
now that it has been pushed to a hosting site it does not.

I have an aspx form with a gridview control.
You hit a button, a record gets added to a database, a session variable
holds your OrderID number...
response.redirects you to a different page...
that page does some checking...and in 9 times out of 10 it
response.redirects you back to the original page.
( this happens because i was trying to fix caching and it didnt... ) ...but

What happens, on return the gridview does not refresh due to the OrderID.
Its like IE is holding a cache of the old page.

While it's not very clear, try to redirect with some unique id in the
url. For example,

Response.Redirect("page.aspx?" + random.Next());
 
I don't think this is working,

if i manually go to the page and in the url type this:
Products.aspx?397


then i close down IE, and reopen IE
and type in
Products.aspx?123

My sessionID from the last IE is still there.
could that have something do with this fix i applied ?
http://community.discountasp.net/showthread.php?t=2719&highlight=Validation+viewstate+MAC+failed

or are these 2 indipendant things?

Still learning the web.config - thanks for your patients.
Thanks,

Miro

I have something that seems to be related to just IE
In firefox this works fine...and this worked fine in IE (
localmode )...but
now that it has been pushed to a hosting site it does not.

I have an aspx form with a gridview control.
You hit a button, a record gets added to a database, a session variable
holds your OrderID number...
response.redirects you to a different page...
that page does some checking...and in 9 times out of 10 it
response.redirects you back to the original page.
( this happens because i was trying to fix caching and it didnt... )
...but

What happens, on return the gridview does not refresh due to the OrderID.
Its like IE is holding a cache of the old page.

While it's not very clear, try to redirect with some unique id in the
url. For example,

Response.Redirect("page.aspx?" + random.Next());
 
In reply to my last question...

Re-Reading the viewstate fix, i can now see how it goes into multiple pages.

I will properly test out your answer and see if it works - thank you.

-New message will follow with "it worked" or it "didnt".

I will also be trying to see if this does the trick and add this to each
aspx source
<%@ OutputCache Duration="1" VaryByParam="none"%>


Thank you for your help.

Miro


I have something that seems to be related to just IE
In firefox this works fine...and this worked fine in IE (
localmode )...but
now that it has been pushed to a hosting site it does not.

I have an aspx form with a gridview control.
You hit a button, a record gets added to a database, a session variable
holds your OrderID number...
response.redirects you to a different page...
that page does some checking...and in 9 times out of 10 it
response.redirects you back to the original page.
( this happens because i was trying to fix caching and it didnt... )
...but

What happens, on return the gridview does not refresh due to the OrderID.
Its like IE is holding a cache of the old page.

While it's not very clear, try to redirect with some unique id in the
url. For example,

Response.Redirect("page.aspx?" + random.Next());
 
Miro said:
I have something that seems to be related to just IE
In firefox this works fine...and this worked fine in IE ( localmode
)...but now that it has been pushed to a hosting site it does not.

I have an aspx form with a gridview control.
You hit a button, a record gets added to a database, a session variable
holds your OrderID number...
response.redirects you to a different page...
that page does some checking...and in 9 times out of 10 it
response.redirects you back to the original page.
( this happens because i was trying to fix caching and it didnt... ) ...but

What happens, on return the gridview does not refresh due to the
OrderID. Its like IE is holding a cache of the old page.

sadly, Firefox works with an asp.net page 10x better.
in ie, no gridview shows as it looks like nothing was added to the cart
- no matter how many times i click the refresh button.

Does anyone know what I could be looking at to get IE not to cache like
this?

Thanks,
Miro

IE doesn't normally cache if you press the refresh button - it should
always get a new copy of the page from scratch. If it's displaying the
same thing, then perhaps your code is wrong and you should debug the
page (using the VS.NET debugger) to see what's actually going on and why
it's showing you the wrong data. Or maybe you're using a proxy server
of some kind on your network? Are you absolutely sure that it's a
caching issue? Also, when you're restarting IE, you need to close ALL
IE windows - not just the one you're using, then ensure it's actually
gone in task manager. If any IE processes remain, then you're not
actually starting a new session but simply returning to your old one.

Nick
 
I dont think its a caching issue anymore.
Somehow IE is losing a session variable.

I have narrowed it down to IE - but not all IE's

I created a website for a friend... www.peekpea.com
Its almost completed with just a couple bugs to fix...
pushed it to my hosting site for testing at www.discountasp.net
if you go to the site ( www.peekpea.com )
I create a session variable instantly the second you hit the site.
( it use to just check when you try to add an item but i have been pulling
my hair trying to track down exactly what is happening. )
Click on Products,
(let the page fully load - i have not fixed a bug yet if it doesnt fully
load and you start to click)
Then click 'order', and let that load, and then click 'add to cart'.

What happens now is that in my asp.net code i check the session variable...
if its nothing, I add a record to the db, retrieve the ID of that record and
store it in the session variable.

I move between aspx, pages... on refresh of the page, there should be now a
"cart displaying" with your item you have added.

This works in FF and Chrome.
But if you do this in some IE's...nothing.
( not all the time though...seems to be random between friends computers ).
Sometimes mine works sometimes it doesnt...same with theirs
On page load of the products screen, if I put a textbox on the bottom and
say
textbox1.text = session("OrderID") then it is empty.

I am stumped as to why IE is losing the session variable and FF and Chrome
are not.

I am still very new to asp.net so I am not exactly sure what to check.

Miro
 
I have done some more testing and it is the session variable being lost.

When you first enter the site I now have a label in the very bottom middle
to display the session("OrderID")

then when its IE and goes to product... that number changes
in FF and Chrome it does not

in IE when you add to cart- the number changes again

It only changes cause on page load of the program ...i say if
session("OrderID") is blank / empty / nothing then go get one.

Any ideas anyone?

Miro
 
I have found the problem.

Here is what it was - incase anyone else runs into it.
I have been working on this for a couple days and would like to pass on my
findings.

The .com in question is registered at www.411hosting.ca When a 'mask' is
enabled around the website...for domain forwarding...
They put some markup around it. (see below)

I have setup the same example with www.companyorange.ca that points to
http://www.companyorange.com/_Live/TestSession

if you are interested in testing yourself.
I will leave it up for the weekend. + this website will be changing with me
trying to come up with a solution as it has peeked my curiousity.

Make sure between tests, you close ALL internet browsers before you go from
the .ca to the actual whole link.
This only happens on some IE browsers.

This website displays the sessionID in a label above the button. So it
should start off as NOTHING in both test cases.
Click a button, the current date time gets shoved into a session("Variable")
and sent to page 2.
Page 2 reads the session variable and displays it in a label.

Click the button - it sends it back.


--------------------markup start
<html>
<head>
<title>www.your411HostingDomain.ca</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="robots" content="index, follow">
<meta name="generator" content="411.ca Forwarding Service"> </head>
<frameset framespacing="0" border="0" rows="100%,*" cols="100%"
frameborder="no">
<frame name="domains411a" noresize scrolling="auto"
src="http://www.yourForwardedToDomain.ca/_Path/Folder">
<frame name="domains411" scrolling="no" noresize>
<noframes>
<h1><a href=" http://www.yourForwardedToDomain.ca/_Path/Folder
">www.your411HostingDomain.ca</a></h1>
Please <a href=" http://www.yourForwardedToDomain.ca/_Path/Folder ">click
here</a> to view the non-framed version.
</noframes>
</frameset>
</html>
--------------------markup end
Because they are using the frameset, somehow the session variable gets lost
between frames

I do not yet have a solution/workaround for this issue - as i might not
really need one as she will be hosting the page on her own somewhere.

Miro
 
Back
Top