I am showing a web service on a SharePoint site, for example. http: //server/_vti_bin/subdir/mywebservice.asmx .
In the web service method, it SPContext.Currentappears to be null.
SPContext.Current
(Interestingly, I look at an example in Chapter 5 of Inside Windows SharePoint Services 3.0 , and they use the service SPContext.Currentinside the website!)
Any idea what I am missing? Thanks in advance.
, SPContext.Current = null, - , (.. URL-, ).
"_vti_bin/subdir". subdir WebService, SharePoint ( : - SharePoint)
, , _vti_bin, . URL- SharePoint .
, - ?
What do you call a web service? Is this an ajax call from javascript / jquery? If so, have you added the ScriptService attribute to the webservice class?
[System.Web.Scripts.Services.ScriptService] public class SimpleWebService : System.Web.Services.WebService { ... ... }