Represents the context of an HTTP request in Microsoft SharePoint Foundation.

learn more… | top users | synonyms

24
votes
1answer
15k views

Using SPContext.Current or using static URL

There are multiple ways to work in the SP object model. The starting point for instantiating objects looks different when you look at different developers. Many times I see people doing this: SPList ...
3
votes
1answer
2k views

Is SPContext.Current Supposed to Be null in Custom WCF Service?

Here is the scenario: Custom WCF Service deployed in SharePoint 2010 Site is using Claims Based authentication (FBA, NTLM) .svc is deployed to ISAPI in the hive Service is configured using custom ...
1
vote
3answers
2k views

sharepoint 2010 context menu event handler

i want to hide sharepoint 2010 list/library context menu based on users. i am using below javascript $(document).ready(function(){ $('.ms-MenuUIPopupBody').live('blur', function() { ...
5
votes
4answers
7k views

Get current web url in a SPRibbon Custom Action Command

I've a SPRibbon custom action with the purpose of open an custom app page in a modal dialog, but I'm getting troubles for getting the current web URL, as well, set a reference for a .js with the right ...
1
vote
1answer
2k views

Accessing a list from app web on host site generates access denied

I am trying to get title of a list which is located on Host Site from an SharePoint hosted app by using csom (javascript). I have added permission on Manifest file and chose the list but still getting ...
0
votes
1answer
483 views

Adding ASP.NET Web Application to SharePoint Virtual Directory (for SPContext)

I'm inheriting an ASP.NET application that is hosted within the IIS SharePoint web site. From IIS, right click the Web Site, and click 'Add Application' is the method used here. In our dev server, ...
0
votes
3answers
651 views

SPContext returns wrong user account [closed]

I'm creating a web part on a non local server and I need to get the current user logged in to SharePoint. I'm using the following code to get the username. string currentUser = ...