Web Part with its FileUpload control causing "Webpage has expired" Error !

  • Web Part with its FileUpload control causing "Webpage has expired" Error ! Alex

    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 https://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.


    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 ?

  • 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

development file-upload
Related questions and answers
  • : No go. You cant use the SPLimitedWebPartManager class, and the SPWebPartManager class works only within the context of the page where its instantiated. So bascially, you cant do this in code. XML Module: I think this is the most likely path forward, however it seems to always want to provision a file to the site. For example, if I want to add a web part to the home page (default.aspx), then there doesn't seem to be a way to just get a reference to the page, it always wants to overwrite it with a new file. But I dont want to do that, I just want to add a Web Part to the existing page. See my

  • is causing this behavior? I can change the code to avoid it if I can figure out why it is happening. Is there any way through the SharePoint UI or APIs to "release" the document so that the original.... Note that this is just opening the Excel file without checking it out. Problem: Once in a while, and for no reason I can figure out, a user will click the button and the spreadsheet will be returned to them by SharePoint as read-only (so they will get the above error message). However, often they are demonstrably the only user to have accessed the document - in fact, sometimes this will happen

  • I'm trying to add a custom web part (that is one I have written myself) using the new Javascipt OM available with SharePoint 2010. My solution is also running within the Sandbox. I have it working correctly for the Content Editor Web Part (based on sample code), however when I replace the Content Editor Web Part definition with one for my own web part I get the following error... getting a "Cannot Import Web Part" error. I think this is heading in the right direction, not sure if I have an issue in my .webpart file.

  • This is an old issue I thought this was a bug in an specific environment after reading a couple of blogs it has made me think again... The issue is that SharePoint site collections and sites... in the index under the contentclass:STS_Site and the sites (SPWeb's) are contentclass:STS_Web. The following people seem to have come across this issue and assumed it was just a limitation. I think...... Yet another person is also reporting this error in the MSDN forums and the moderator comfirmed the behavior/issue. UPDATE 17/06/10: I am close to getting a definitive yes from MS support

  • ) at ConsoleApplication1.Program.Main(String[] args) The exact same error comes back on some of the other web methods (getlistitems, getlist, getlistcollection) Other web metods do work fine (GetSiteUrl, GetSiteAndWeb) The error happens when running as a farm administrator. The same error happens running on a local development machine, which makes me think it has nothing to do with user permissions. Has anyone seen this error before, or managed to solve it? Edit: The error goes away when only Windows Authentication is configured. Is there a way to fully enable the old web services

  • any development experience in Sharepoint I can't really say which ones are going to be imperative for my application. I would like to do it on Foundation, because I can re-sell the app without... applications inside Sharepoint), but I wouldn't want to do it that way even though it would be much easier for me to develop such applications, because I'm primarily hardcore Asp.net MVC developer..., Secure Store Service etc? Should I provide a service layer API? I've read I could also provide my own WCF/Web service that would be my entry point to my business layer processes. Much can be done

  • because these pages are just so tiny. I get the impression that is has something to do with the way IE6 handles Windows Authentication in combination with the proxy used in the client's company network...This is a very strange issue I am having. My client is experiencing poor performance (20 sec per page load or so) when accessing their SharePoint 2007 site that is hosted somewhere externally... doesn't seem to make any difference The client has another SharePoint system (based on SP2003 and requiring Windows Auth) which is hosted internally (so not going through the proxy), which is performing

  • ;WebPartZone> and putting my webpart in there Adding .webpart-code directly into <AllUsersWebPart> where I define the page layout, in elements.xml Put the web part on the page layouts... part will only be deployed first time, so when creating a new page with the page layout, the web part will not be included. We do not know how to do this, since page layout is set after creating the page. We do have hooks for setting default page layout based on where in the structure the page is created, here we can append the web part as well, but then the web part will only be added if you create

  • sites/sub-site and permission level. My question is: Is this possible? Another question: Is there any method how to get this information without installing anything on server side of SharePoint farm? I have list of sites and sub-sites with URL's. More details: Let me describe one solution I have now. I’ve found tool Data Juggler (http://www.djuggler.com/) which can automate repetitive web tasks. This means that I’ve prepared list of all sites/sub-sites in my scope. As a source I use spreadsheet with all details about sites/sub-sites input.xlsx this is only one part of process maintained

Data information