Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Error accessing SPContext.Current.Site.ID for specific users

$
0
0

Hi,

I have  a custom menu item in the ECB context menu.
When user selects the custom menu item, we are retrieving the site id using Guid currentSiteId= SPContext.Current.Site.ID
But this results in below error for few users, for other users this is working fine.

System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
 at System.Guid..ctor(String g)

What might be the reasons for this error?

Thanks in advance,
dhijit


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>