5

While debugging, the site looks fine, it's just web that doesn't load okay. Can't figure out why. Throws generic exception when attempting to access a property: HRESULT: 0x80131904

Any thoughts?

Here is a snippet of code:

using (SPSite site = new SPSite("http://blah.blahblah.com/sites/site/en"))
{
    try
    {
        using (SPWeb web = site.OpenWeb())
        {
            SPList list = web.Lists.TryGetList("Events"); 
            if (list != null)
            {
                // do stuff with the list
            }
        }
    }
    catch (Exception ex)
    {
        System.Web.HttpContext.Current.Response.Write("Error getting list: " + ex.Message);
    }
}
0

2 Answers 2

2

I believe I figured out my own question. The web app that this block of code was being called from was different from the other web app it was trying to open. So i made them both run on the same app pool and it worked fine. Hope this helps someone in the future.

0
1

this is also generated by an invalid filter value. I got this when i was trying to setup a value for my filtered view and i was using "closed" as the value for my workflow status filter option where it should have been an integer value of something like "27". Crazy stupid method they used but here's the post where i resolved my issue:

http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/f5de7947-f49b-420a-b8d8-d44ad6b7769f

See this post on how to find the custom integer value for your custom workflow status value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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