webservice oneway and new SPSite(myUrl)
问题 I have a problem with a oneway web method that open a moss site (probably because in a oneway webmethod the context is null) Is possible to rewrite this code to remove the null reference exception? (without the oneway attribute i don't have the exception) [SoapDocumentMethod(OneWay = true)] [WebMethod(Description = "TestOneWay")] public voidTestOneWay(string webUrl) { using (SPSite site = new SPSite(webUrl)) { .... } } the exception is: [2304] Error:Object reference not set to an instance of