locked
"An unhandled exception occurred during the execution of the current web request"

    Question

  • Hi All,

    I wonder if someone could help, we use sharepoint 2007 to deploy to our web fornt end - When i make a change to the deployment server we get the following error once we click publish

    Can anyone help Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)]
    
     Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder) +0
    
     Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder) +126
    
     Microsoft.SharePoint.SPWeb.GetMetadataForUrl(String relUrl, Int32 mondoProcHint, Guid& listId, Int32& itemId, Int32& typeOfObject, Object& fileOrFolder) +90
    
     Microsoft.SharePoint.SPWeb.GetList(String strUrl) +172
    
     Microsoft.SharePoint.Publishing.Internal.Store.GetListByUrl(SPWeb web, String listUrlName) +110
    
     Microsoft.SharePoint.Publishing.PublishingPage.UpdateNotificationList() +569
    
     Microsoft.SharePoint.Publishing.PublishingPage.HandleScheduling() +37
    
     Microsoft.SharePoint.Publishing.ScheduledItem.Schedule(Boolean setModerationStatus, Boolean allowApprove, String approvalComment, Boolean& autoApproved) +649
    
     Microsoft.SharePoint.Publishing.ScheduledItem.Schedule(String approvalComment) +58
    
     Microsoft.SharePoint.Publishing.ScheduledItem.Schedule() +47
    
     Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.ApproveAction.ExecuteRaisedPostBackEvent(ConsoleAction thisAction) +1078
    
     Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.OneClickPublishAction.RaisePostBackEvent(String eventArgument) +78
    
     System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    
     System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
    
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
    
    

    Server Error in '/' Application.

    The system cannot find the file specified. (Exception from HRESULT: 0x80070002)


    • Edited by Mike Walsh FIN Tuesday, May 03, 2011 2:18 PM A Title of "Sharepoint Error" isn't helpful. At the very least quote part of the error message
    • Moved by Mike Walsh FIN Tuesday, May 03, 2011 2:19 PM admin q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Tuesday, May 03, 2011 1:21 PM

Answers

  • Hi this is now sorted,

    It was a case of turning on cutom errors:

    http://stevepietrek.com/2007/07/28/turn-off-sharepoint-custom-error-messages/

    Once this feature had been turned on it appeared that there was still some random characters in the web.config - mainly "?"

    A quick search in the web.config for ? displayed these, also each error displayed by Sharepoint pointed out the last ones

    After cleaning these up we were then able to access the site correctly - we then found that the following feature was dectivated that was preventing us from oublishing changes aswell as adding links

    Office SharePoint Server Publishing Infrastructure

    Provides centralized libraries, content types, master pages and page layouts and enables page scheduling and other publishing functionality for a site collection.

    This was enabled by doing the following:  Site Actions > Site Settings > Modify All Site Content > Site Collection Features (Site Collection Administration)

     

    After this the everything now appears to be OK

     

    Friday, May 06, 2011 10:42 AM

All replies

  • Hello,

    What change did you make to the deployment server? Details about the scenario and SharePoint log are helpful for troubleshooting.


    Thanks & Regards.

    Wednesday, May 04, 2011 4:58 AM
  • Hi Lily,

    Thanks for your quick reply

    A little bit more information as requested,

     

    Last week the server was producting an error,i turned on the customerrors features and appeared that the web.config had become corupt - We restored a previous web.config file and the site appeared to be working.

    Now the above issue has become apparent - I have compared the corupt config files and both appear to have the same lines in accept on the corupt one has some characters replaced with "?"

    Also if we turn custom errors off we get the following error: File not found

    I have had a look at the Sharepoint logs but have been unable to locate anything that points at the issue

     

    Thanks

    Tim

     

     

     

    • Marked as answer by TLAFFAN Friday, May 06, 2011 10:42 AM
    • Unmarked as answer by Mike Walsh FIN Friday, May 06, 2011 12:06 PM
    Wednesday, May 04, 2011 11:15 AM
  • Hi this is now sorted,

    It was a case of turning on cutom errors:

    http://stevepietrek.com/2007/07/28/turn-off-sharepoint-custom-error-messages/

    Once this feature had been turned on it appeared that there was still some random characters in the web.config - mainly "?"

    A quick search in the web.config for ? displayed these, also each error displayed by Sharepoint pointed out the last ones

    After cleaning these up we were then able to access the site correctly - we then found that the following feature was dectivated that was preventing us from oublishing changes aswell as adding links

    Office SharePoint Server Publishing Infrastructure

    Provides centralized libraries, content types, master pages and page layouts and enables page scheduling and other publishing functionality for a site collection.

    This was enabled by doing the following:  Site Actions > Site Settings > Modify All Site Content > Site Collection Features (Site Collection Administration)

     

    After this the everything now appears to be OK

     

    Friday, May 06, 2011 10:42 AM