Thanks for your further followup Nathan,
Yes, you're right, I missed the type="file" in your former message. I did
got the "Page Page has Expired ..." error,also some times get "page can not
display ..." message. Based on some further research , this behavior do
caused by the IE browser which block the former history (post version) .
When there're input file field on the page, and we submit a post request,
the IE browser won't allow the previous view display again from cache.
Currently I haven't found any certain configuration in the IE browser, for
an alertnative approach, we may consider use response.redire ct to locate
the user to
the same page as the error occured rather than use the history back
script.
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.)
--------------------
| Thread-Topic: Page has Expired - using html input control (type=file)
| thread-index: AcWoP8Lxhq4lmuk HTK2jsgCG5P6scw ==
| X-WBNR-Posting-Host: 209.17.159.193
| From: =?Utf-8?B?TmF0aGFu?= <na**********@o nline.nospam>
| References: <03************ *************** *******@microso ft.com>
<CO************ **@TK2MSFTNGXA0 1.phx.gbl>
<89************ *************** *******@microso ft.com>
<Us************ **@TK2MSFTNGXA0 1.phx.gbl>
<7E************ *************** *******@microso ft.com>
<TT************ *@TK2MSFTNGXA01 .phx.gbl>
<76************ *************** *******@microso ft.com>
<bN************ **@TK2MSFTNGXA0 1.phx.gbl>
| Subject: RE: Page has Expired - using html input control (type=file)
| Date: Tue, 23 Aug 2005 17:07:05 -0700
| Lines: 312
| Message-ID: <F5************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 8bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGXA03.phx .gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:1198 46
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| In order to get the error you need to use an input tag with type=file.
| Without using that control we don’t have any problem, as soon as we add
that
| control we start getting the Page Expired error. On your sample program
| please change one of the TextBox controls to the following:
|
| <input id="File1" type="file" runat="server">
|
| And try again.
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Nathan,
| >
| > I've attached my test project in this message. You can get it through
OE to
| > download the attached zip file.
| >
| > 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.)
| > --------------------
| > | Thread-Topic: Page has Expired - using html input control (type=file)
| > | thread-index: AcWnNnmpyUVC8RK 8TrGwPGPd2vVDlw ==
| > | X-WBNR-Posting-Host: 209.17.159.193
| > | From: =?Utf-8?B?TmF0aGFu?= <na**********@o nline.nospam>
| > | References: <03************ *************** *******@microso ft.com>
| > <CO************ **@TK2MSFTNGXA0 1.phx.gbl>
| > <89************ *************** *******@microso ft.com>
| > <Us************ **@TK2MSFTNGXA0 1.phx.gbl>
| > <7E************ *************** *******@microso ft.com>
| > <TT************ *@TK2MSFTNGXA01 .phx.gbl>
| > | Subject: RE: Page has Expired - using html input control (type=file)
| > | Date: Mon, 22 Aug 2005 09:28:06 -0700
| > | Lines: 308
| > | Message-ID: <76************ *************** *******@microso ft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 8bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:1195 13
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | Thanks Steven,
| > |
| > | Yes, please attach the simple project and instruction, then we can
test.
| > |
| > | Regards
| > |
| > | "Steven Cheng[MSFT]" wrote:
| > |
| > | > Thanks for the response Nathan,
| > | >
| > | > Yes, I did follow the squence you mentioned and I know that click
| > another
| > | > postback button is the important thing becaue this cause the former
| > record
| > | > in the browser's history contains posted form data. However, as I
| > mentioned
| > | > earilier, by default there should not occur "Page expired ...."
| > message. If
| > | > you think necessary I can attached a simple project which contains
a
| > page
| > | > and the global file which run without the problem on my side so
that
| > you
| > | > can test on your side.
| > | >
| > | > 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.)
| > | >
| > | > --------------------
| > | > | Thread-Topic: Page has Expired - using html input control
(type=file)
| > | > | thread-index: AcWk46GMpp9AjOz cRoC0iZ8I7zV7nQ ==
| > | > | X-WBNR-Posting-Host: 209.17.159.193
| > | > | From: =?Utf-8?B?TmF0aGFu?= <na**********@o nline.nospam>
| > | > | References: <03************ *************** *******@microso ft.com>
| > | > <CO************ **@TK2MSFTNGXA0 1.phx.gbl>
| > | > <89************ *************** *******@microso ft.com>
| > | > <Us************ **@TK2MSFTNGXA0 1.phx.gbl>
| > | > | Subject: RE: Page has Expired - using html input control
(type=file)
| > | > | Date: Fri, 19 Aug 2005 10:30:02 -0700
| > | > | Lines: 228
| > | > | Message-ID: <7E************ *************** *******@microso ft.com>
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 8bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| > | > | Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.p hx.gbl
| > | > microsoft.publi c.dotnet.framew ork.aspnet:1191 60
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > | > |
| > | > | Thanks Steven,
| > | > |
| > | > | We are using the default settings for the page expiration on the
IIS
| > | > (check
| > | > | box cleared). In order to get the error you have to have â
‚¬?
| > > runat=serverà â?set
| > | > | for the input control. You also have to first click on the
Button1 to
| > do
| > | > a
| > | > | postback and then Button2 to throw the exception (the order of
| > clicking
| > | > the
| > | > | buttons is important to create the error).
| > | > |
| > | > | "Steven Cheng[MSFT]" wrote:
| > | > |
| > | > | > Thanks for your response Nathan,
| > | > | >
| > | > | > As for the behavior you mentioned, it is likely due to
browser's
| > | > history
| > | > | > behavior for handling post submit history. When we put input
entry
| > | > fields
| > | > | > on page and hit submit , this request contains forms data ,and
when
| > we
| > | > hit
| > | > | > back button, the browser may prevent the content from
displaying .
| > | > | > However, by default this should not happen since based on my
local
| > | > | > test(through the steps you provided) , I didn't ecounter the
"page
| > | > | > expired..." warning message. I'm thinking whether your
webserver
| > has
| > | > | > configured some certain http header which cause the behavior.
Have
| > you
| > | > | > checked your IIS server to see whether there are any http
headers
| > | > | > configured in the site or virtual dir setting?
| > | > | >
| > | > | > Also, you can test on some other server to see whether you also
get
| > | > this
| > | > | > behavior. To test this, we can simply create a page which has a
| > text
| > | > field
| > | > | > and a submit button. After submit the page through the submit
| > button ,
| > | > hit
| > | > | > the "back" button on browser to see whether you can correctly
get
| > the
| > | > | > previous view of the page.
| > | > | >
| > | > | > 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.)
| > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | Thread-Topic: Page has Expired - using html input control
| > (type=file)
| > | > | > | thread-index: AcWkJWm3DrbB0rf 3RnWcVkmF7Y1jcQ ==
| > | > | > | X-WBNR-Posting-Host: 209.17.159.193
| > | > | > | From: =?Utf-8?B?TmF0aGFu?= <na**********@o nline.nospam>
| > | > | > | References:
<03************ *************** *******@microso ft.com>
| > | > | > <CO************ **@TK2MSFTNGXA0 1.phx.gbl>
| > | > | > | Subject: RE: Page has Expired - using html input control
| > (type=file)
| > | > | > | Date: Thu, 18 Aug 2005 11:48:26 -0700
| > | > | > | Lines: 131
| > | > | > | Message-ID:
<89************ *************** *******@microso ft.com>
| > | > | > | MIME-Version: 1.0
| > | > | > | Content-Type: text/plain;
| > | > | > | charset="Utf-8"
| > | > | > | Content-Transfer-Encoding: 8bit
| > | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | > | Content-Class: urn:content-classes:message
| > | > | > | Importance: normal
| > | > | > | Priority: normal
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| > | > | > | Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| > | > | > | Xref: TK2MSFTNGXA01.p hx.gbl
| > | > | > microsoft.publi c.dotnet.framew ork.aspnet:1189 64
| > | > | > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > | > | > |
| > | > | > | Yes. It used to work fine and I was able to see the page, but
| > once I
| > | > | > added
| > | > | > | the html input tag to my page I start getting the Page has
| > Expired
| > | > | > message.
| > | > | > |
| > | > | > | We donâ⠂¬â „¢t have any
expiration set for the client
| > side pages. I
| > | > tested my
| > | > | > page
| > | > | > | on Netscape 7.2 and it works fine (I donâ⠂
¬Ã¢â€ž ¢t get
| > the Page
| > | > Expired).
| > | > | > |
| > | > | > | Here is a sample setup to recreate this problem:
| > | > | > | 1- Create a web application
| > | > | > | 2- In WebForm1.aspx add three controls
| > | > | > | <asp:Button id="Button1" runat="server"
| > | > | > | Text="Button1"> </asp:Button>
| > | > | > | <INPUT type="file" id="cFile" runat="server">
| > | > | > | <asp:Button id="Button2" runat="server"
| > | > | > | Text="Button2"> </asp:Button>
| > | > | > | 3- Update the Global.asax
| > | > | > | protected void Application_Err or(Object sender,
| > EventArgs e)
| > | > | > | {
| > | > | > | Response.Clear( );
| > | > | > | Exception objErr =
| > | > | > Server.GetLastE rror().GetBaseE xception();
| > | > | > | Session["MyErr"] = objErr.Message. ToString();
| > | > | > | Server.ClearErr or();
| > | > | > | Response.Write( "<SCRIPT
| > | > | > | language='javas cript'>history. go(-1);
| > | > | > |
| > | > | >
| > | >
| >
window.open('ht tp://www.msn.ca','Po pUp','scrollbar s=yes,width=500 ,height=400
| > | > | > ');</SCRIPT>");
| > | > | > | }
| > | > | > | 4- For each one of the Buttons create an onclick event handler
| > | > | > | 5- In the onclick event of Button2 put the following line of
code
| > | > | > | throw new Exception("My exception");
| > | > | > | 6- Run the application
| > | > | > | 7- First click button1 and then click button2, you should see
the
| > | > Page
| > | > | > has
| > | > | > | Expired message
| > | > | > |
| > | > | > | Note: If you remove the INPUT control (or remove the
runat=server
| > | > from
| > | > | > INPUT
| > | > | > | control) the error won't happen.
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | > | "Steven Cheng[MSFT]" wrote:
| > | > | > |
| > | > | > | > Hi Nathan,
| > | > | > | >
| > | > | > | > Welcome to ASPNET newsgroup.
| > | > | > | > From your description, you're redireting the current user
to a
| > | > custom
| > | > | > error
| > | > | > | > page and make the main window display the previous page
when
| > there
| > | > | > occurs
| > | > | > | > unhandled exceptio in the asp.net app. However, you're
always
| > | > gettting
| > | > | > the
| > | > | > | > "page has Expired ..." message,yes?
| > | > | > | >
| > | > | > | > As for the "Page has expired..." message, it is populated
by
| > the
| > | > | > clientside
| > | > | > | > browser when the browser find a certain page record's
| > clientside
| > | > cache
| > | > | > has
| > | > | > | > expired or event haven't been cached at clientside. So
what's
| > the
| > | > page
| > | > | > | > you're gong to navigate back through the history.go(-1); ?
If
| > it's
| > | > the
| > | > | > | > pages in the same web application, then have they been set
some
| > | > | > expiration
| > | > | > | > policy which makes them expired immediately (not cached )
at
| > client
| > | > | > side?
| > | > | > | > Or have you tested visting the application from some other
| > clients
| > | > to
| > | > | > see
| > | > | > | > whether all the clients will have the same behavior so as
to
| > make
| > | > sure
| > | > | > this
| > | > | > | > is not a clientside browsr setting issue.
| > | > | > | >
| > | > | > | > Thanks,
| > | > | > | >
| > | > | > | > Steven Cheng
| > | > | > | > Microsoft Online Support
| > | > | > | >
|