I am creating a custom interface against the SharePoint Client Object Model. It's designed to receive random URLs which it will then process and return the results. These URLs could be to any combination of SharePoint types i.e. a URL to a document library, a folder, a site, a document etc.
The ClientContext is supposed to reference the local site of the object requested. Is there a way you can pass these URLs into the ClientContext constructor and it will initialize correctly to the correct site?
The only way I've seen is to initialize the ClientContext to the root site first then use Web.WebUrlFromPageUrlDirect to determine the local site from the full path. This works but if the user does not have access to the root site this will fail.
Dan Hunsinger