I'm trying to retrieve a relative url from a SP.Web I get my sp.web from a SP.list with
SPWeb test = listNL.ParentWeb;
When I try to get the url I got an exception:
test.ServerRelativeUrl' threw an exception of type 'Microsoft.SharePoint.Client.PropertyOrFieldNotInitializedException
Do you know a solution to retrieve the relative url from the list?