Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My problem precisely and concisely is that I developed a web part which contains a FileUpload control and the web part in general works correctly except for one issue. Whenever I use the web part then navigate to any other page, and then click BACK or FORWARD I get an error message that says "Webpage has expired". Note that my web.config entry is:

<httpRuntime executionTimeout="43200" maxRequestLength="104856" />  

After searching I found http://stackoverflow.com/questions/1580085/show-webpage-has-expired-on-back-button.

Well, obviously I can’t use GET because I am developing a web part NOT a page. Also, it is not possible to oblige the clients to change their forms from POST to GET just to use my little web part (I think you understand me).

I put a breakpoint inside the web part and tried to reproduce the same error. The results: it doesn’t hit the breakpoint. Also, I checked the EventViewer and no errors there.

Please help me out in this issue, note that my control-scope is only within the web part NOT the full page. Also, I do not want to use any AJAX-controls.

Update:

I was told that the only way to get rid of "Webpage has expired" error is either by:

  1. Using AJAX fileupload control.
  2. Implementing the fileupload (Uploading attachments functionality) within a pop up window.

So what do you think?

Is there any way to fire an event which it re-loads/refresh the web page (Which has my web part) whenever user clicks on BACK or FORWARD ?

share|improve this question
    
Can you please share the code for same. Thanks. –  user4165 Jul 19 '11 at 8:15
add comment

2 Answers

up vote 1 down vote accepted

Have you tried setting "Ping Enabled" to False for the app pool running your sharepoint? This should correct any timeout issues you are having, I have to turn this feature off in order to upload large files in other asp.net applications.

To configure IIS to allow the worker process to continue

Open IIS Administrative Console

  1. In the Connections pane, expand the node if necessary.

  2. Under the node, right-click Application Pools.

  3. In the Application Pools list, right-click the name of the pool your application runs in, and then click Advanced Settings.
  4. In the Advanced Settings dialog box, locate the Process Model section, and perform one of the following actions: * Set Ping Enabled to False. * Set Ping Maximum Response Time to a value that is larger than 90 seconds.

    Setting Ping Enabled to False stops IIS from checking whether the worker process is still running and keeps the worker process alive until you stop your debugged process. Setting Ping Maximum Response Time to a large value allows IIS to continue monitoring the worker process.

  5. Click OK to close the Advanced Settings dialog box.
  6. Close IIS Manager and the Administrative Tools window.
share|improve this answer
add comment

This message is usually caused by the fact that you return to a page that is a postback and is cached.

Have you set output cache on your page?

If so try and disable output cache for that site in Site Actions > Site Settings > Site Administration > Site Output cache.

You can also use Fiddler to look in header for any cache-control headers.

hth Anders Rask

share|improve this answer
    
Hi Anders, Thanks for your input I've tried exactly as what ou've mentioned and I still have the same error. Also, I've added this line of code into Page_load: Response.AppendHeader("Pragma", "no-cache"); And nothing has changed, I'm still getting the same error. Any more suggestion would be greatly appreciated ! –  Alex Jan 25 '10 at 10:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.