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);
}
}