I have the following code in my application. It is throwing FileNotFound exception at web.GetList("Lists/TestList") line. This list exists and I am able to get the list from web.Lists.TryGetList("TestList"). But I am getting exception when I am trying to get the list from the relative URL. Can anyone please help me?
string siteUrl = "<siteURL>";
using (SPSite site = new SPSite(siteUrl))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.GetList("/Lists/TestList");
}
}Ven