An Unexpected Error Has Occurred, or Unknown Error in WSS 3.0


With Project Server 2007 being a WSS 3.0 application you may come across either of these error messages.  The Unexpected error can appear on web part pages, and the Unknown error is more likely on pages without web parts.  The two errors are really telling you the same thing – This page (or web part) needed some data – but the data doesn’t fit what I was expecting.  If you get this then you probably need to raise a support call (see http://support.microsoft.com for options available to you) – or search through the KBs to see if there is a fix for the specific problem you are seeing (depending when you read this there may or may not be fixes up there right now).

But for some potential immediate relief from the problem here are a few tips that may at least get that page displaying again.  The problem could occur on a number of different pages – but just to give some context lets talk about the “My Tasks” page.  This will be displaying the “My Assignments” view by default, but in fact as this web part loads the SQL stored procedure behind the scenes will be bringing in data for any of the views that a specific user has access to from the drop down of views.  So even if “My Assignments” is the default – if you also have a custom view in the list that perhaps includes some custom fields then this data will also have been retrieved (and could be the culprit!).  So identifying the bad data will help us with your support call and also hopefully get that page working again.  Thinking in rows and columns – any customization will be changing the columns – and the rows will depend on things such as date ranges, tasks and assignments.  So things you can try:-

  • If it is a web part page then go to the Web Part Maintenance and either reset the part – or remove it and then add it back again.  This will have the effect of defaulting the web page settings and if the bad data happened to be beyond the “current tasks” range or other filter specific to the part this may get things working.  This isn’t a fix – just avoiding the bad stuff for now.
  • If you have customized then try removing any additional custom fields or other added fields from the view.  Again this isn’t a fix, and certainly the customizations shouldn’t lead to errors – but it may at least allow you to continue working.
  • Try removing some rows that could be causing the problem – so any recent assignments would be targets – or if timesheets are the problem removing some added task lines might help. 

None of these are meant as long term fixes – they are really just avoiding the issue until a fix can be found – which either the support call or KBs will help you achieve.  But hopefully it will give you an understanding of what might have led to the issue – and could get your resources back up and running while together we solve the deeper problem.

Technorati Tags: Project Server 2007


Comments (23)

  1. Brian,

    You also may want to have a look at this. It will mean you can see more debug information and may save  a PSS call.

    http://blog.thekid.me.uk/archive/2007/02/15/a-solution-to-quot-an-unexpected-error-has-occurred-quot-in-wss-v3.aspx

    Regards, Vince

  2. BriSmith says:

    Thanks Vince – very useful!  I’ll try it out on a couple of scenarios where I can make the error appear.  

    Best regards,

    Brian.

  3. Sharat Sanketi says:

    Brian,

    I am using Virtual PC 2004 to connect to a development image with hosts Project Server 2007. I have connected the network adapter from the physical server on which it is hosted with the virtual adapter in the image. Then, I have assigned a unique static IP to the image so that it  I accessible from our network. However, once we did this, the PWA (Project Web Access” has stopped functioning. Whenever we try to open it, it gives the error “An unexpected error has occured”. Even when I open IIS and try to open the site (Project Server site), it tells me that the page is not found.

    What could be the reason and how can I resolve this?

    Sharat

  4. BriSmith says:

    Hi Sharat,

    I can only give you some general thoughts here – then you may need to go to http://support.microsoft.com or the newsgroups.  You don’t say how you are connecting, but I have seen similar issues to this when trying to use IP addresses where DNS is not configured correctly.  WSS knows its own server names and will redirect to the name – even if you initially connect via a direct IP address.  Either configuration of Alternate Access Mappings or a local hosts file will help if this is the cause of your issue.

    Best regards,

    Brian.

  5. Sunanda Yalamanchili says:

    I tried all the above suggestions, but couldnot overcome the error. I am getting this error when I try to open mytasks page. I am the only member facing this problem in the company. All others face this error when they submit task updates using “Submit selected” button.

    Do we need to apply any patch? any clue to solve the problem would be highly appreciated.

    Thanks & Regards,

    Sunanda

  6. Maarten says:

    Brian,

    I am having the unexpected error on the MyTasks page with one particular user (!) in a fully operational system, so I cannot (not being a programmer) fiddle about in a web.config file (which one in particular ?) too much with the risc of screwing things up for the rest of the 350 users. On the other hand I have a complete copy of this system in my virtual. Can you point me to the right web.config file in this case ?

    Thanks in advance !

  7. BriSmith says:

    Glad you are thinking about your users Maarten.  The web.config should be the one for port 80 by default – so would normally be found in c:inetpubwwwrootwssvirtualdirectories80.

    Best regards,

    Brian.

  8. Maarten says:

    Another addition to the discussion is this: I spoke to my colleague and he mentioned that after a resource is assigned to a task in a projectplan and reported hours on the task the projectmanager assigns a second resource to the task. The first assigned resource gets the same error message. Once the second assignment is deleted from the plan the troubled resource gets to see his MyTasks-page again. This is clearly a bug. If ss, do you know this will be solved soon by the project-group ?  

  9. Kermit says:

    The latest hotfix (KB950816) contains a fix (QFE20994)that has eliminated this and other symptoms on the MyTasks page. I have tested for a customer and it works well.

  10. BriSmith says:

    Thanks Kermit – most if not all scenarios giving this error should now be addressed.  You may need to re-publish to completely fix the problem after applying a hotfix.

  11. Syntax says:

    I have a problem with Sharepoint 2007 and Project server 2007, i get an error message when i try to view my tasks. i have about 3500 tasks   assigned to me but cant access the page.

    Please help.

  12. BriSmith says:

    Hi Syntax,

    With 3500 tasks it could be time-out issues, or data issues with one or more tasks.  The full error message may help identify which. We have addressed many of the data issues with hotfixes and the infrastructure update – what release level are you running?

    Brian

  13. Omkar.Damle says:

    Unknown Error in WSS 3.0 When i have restored a WSS 3.0 backup on WSS 3.0 SP1 with new installation.

    This is really a challange for MOSS Administrators.

    I dont know how to get out of it.

    and What will happen when i upgrade WSS 3.0 to MOSS 2007. Dose this site Really Work?

    Help for this issue strongly appriciated.

    Thanks & Regards,

    Omkar.Damle.

  14. BriSmith says:

    Not sure what the error means in your case, but turning custom errors off and showing the stack trace for that web app may give a better error to troubleshoot.

    Best regards,

    Brian

  15. Alexandr says:

    I do have such error type with PS 2007 SP2.

    When some of PS users try to open any timesheet

    http://uasrv21/pwa/Timesheet.aspx?tsUID=9c12218c-3a0a-4a9b-9ee1-9189993271b7&Source=http://uasrv21/pwa/_layouts/pwa/timesheet/mytssummary.aspx

    they get this error. When i enabled callstack the error description is as follows:

    Specified cast is not valid.

    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.InvalidCastException: Specified cast is not valid.

    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:

    [InvalidCastException: Specified cast is not valid.]

      Microsoft.Office.Project.PWA.WebParts.TimesheetPart.LoadTimesheetData(GetTSDataModeEnum LoadingMode, Guid resUID, Guid prdUID, Navigation ps) +12473

      Microsoft.Office.Project.PWA.WebParts.TimesheetPart.OnLoad(EventArgs e) +2145

      System.Web.UI.Control.LoadRecursive() +50

      System.Web.UI.Control.LoadRecursive() +141

      System.Web.UI.Control.LoadRecursive() +141

      System.Web.UI.Control.LoadRecursive() +141

      System.Web.UI.Control.LoadRecursive() +141

      System.Web.UI.Control.LoadRecursive() +141

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

  16. Joseph says:

    I am also getting the same error message as Alexandr.  I am have SP2 and the August CU installed.  After turning custom errors off and showing stack trace, I get the following:

    [InvalidCastException: Specified cast is not valid.]

      Microsoft.Office.Project.PWA.WebParts.TimesheetPart.LoadTimesheetData(GetTSDataModeEnum LoadingMode, Guid resUID, Guid prdUID, Navigation ps) +11592

      Microsoft.Office.Project.PWA.WebParts.TimesheetPart.OnLoad(EventArgs e) +1825

      System.Web.UI.Control.LoadRecursive() +47

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

  17. Joseph says:

    Just in case this may help anyone, I was able to resolve the Specified cast is not valid problem w/ the help of Microsoft.  I had a few assignments that had null values for the assn_start_date and assn_finish_date in the msp_assignments table.  I used this query to find the problem assignments (I added the task date fields just to see if there was a difference between them and the assn_date fields):

    select a.assn_uid, a.proj_uid, a.task_uid, r.res_name, p.proj_name, t.task_name, a.assn_start_date, a.assn_finish_date, t.task_start_date, t.task_finish_date

    from dbo.msp_projects as p inner join dbo.msp_assignments as a

    on p.proj_uid = a.proj_uid inner join dbo.msp_tasks as t

    on a.task_uid = t.task_uid inner join dbo.msp_resources as r

    on r.res_uid = a.res_uid

    where assn_start_date is null

    The project plan showed start/finish dates for the task.  I re-published the plan and the assignments updated w/ the correct dates.  Once those were gone, I was able to open up the problem timesheets.

    Joseph

  18. Adrian says:

    I received this error and it was down to a project being recorded with an invalid calendar UID (I have not bothered investigating why this happened as we are only testing).

    To fix it I simply updated the CAL_UID column in MSP_PROJECTS to the base calendar UID and all is working fine again (select CAL_UID from dbo.MSP_CALENDARS where CAL_IS_BASE_CAL = 1)

  19. Raj says:

    Hi Brian,

       iam also facing some issue with the Unexpected Error.please see the log file and if u can suggest something to Resolve the problem.

    Verbose DatabaseConnectionString acquired.  Server=sqlserverDev1;Database=EPMDB;Trusted_Connection=yes;App=Windows SharePoint Services;Timeout=15

    Thanks in advance

    Raju.

  20. BriSmith says:

    Hi Raju,

    That isn;t really enough to go on.  If you still have this issue I’d suggest opening a support incident and one of my colleagues can assist in troubleshooting.

    Best regards,

    Brian.

  21. Sachin Vashishth says:

    Hi Brian,

    As you said above "if timesheets are the problem removing some added task lines might help. " so how cam I remove added tasks line if I am not able to access my timesheet.

    Thanks

    Sachin Vashishth

  22. BriSmith says:

    Hi Sachin, one way would be to remove you from an assignment.  If My Tasks still displays then you can see which tasks are there – or potentially look at the activity on SQL Server to se what is populating the timesheet (but never remove data directly in the database!).

  23. Sachin Vashishth says:

    Thanks Brian,

    1) By added lines, you mean the tasks which we add additionally in the timesheet using "Add Line" feature.

    2) If I understand you correctly, you want me to unassigned resources from the tasks for that timesheet period and republish the plan again. Then I have to check what are the additional added lines in timesheet. Correct me if I am wrong.

    3) Then I have to remove those lines only, so I think it is possible only using PSI and impersonation or is there any easier way of doing this? kindly provide me your feed back on this.

    Thanks once again.

    Sachin Vashishth