Forget it.
"Joseph Geretz" <jgeretz@nospam.com> wrote in message
news:uMuYSAnOHHA.5104@TK2MSFTNGP06.phx.gbl...
>I have a web service page which uses WSE 2.0 SP3 to return a file
>attachment on one of its method calls. All web service methods are
>functioning properly, except for this one method which uses WSE / DIME to
>attach the file to SoapContext.Current. I've traced into the problem
>running the page in the IDE and I'm finding that the problem is that this
>object is null. SoapContext is a valid object, but the Current object is
>null.
>
> My environment:
>
> IIS 5
> .NET Framework 2.0
> WSE 2.0 / SP3
> Visual Studio 2005 (C#)
>
> Here's my WebService class definition:
>
> [WebService(Namespace="
http://srssoft.com/webservices/")]
> [System.Web.Services.WebServiceBindingAttribute(Name = "RepositorySoap",
> Namespace = "
http://srssoft.com/webservices/")]
> public class Repository :
> Microsoft.Web.Services2.WebServicesClientProtocol
> { ...
>
> (I never had the WebServiceBindingAttribute coded until I moved from Fx
> 1.1 to Fx 2.0. The code compiled cleanly without it, but I started
> receiving run-time errors which I managed to squelch by placing this
> attribute onto the class. But maybe this somehow affects whether I get
> SoapContext.Current?)
>
> Also, should the Web Services class be inheriting ffrom
> Microsoft.Web.Services2.WebServicesClientProtocol? That doesn't sound
> right to me, since this is a Server, rather than a Client class, but I
> checked back in Source Safe and this has been the definition since the
> class was originally developed and it was previously working, as far as I
> know.
>
> Here's the Web method call:
>
> [WebMethod]
> public int GetFile(string FileSpec, bool Checkout, string AuthentiKey)
> {...
>
> I'm also finding in the client class which initiates this call, that
> RequestSoapContext.Current is also a null object before initiating a Web
> request to upload a file. Clearly my infrastructure is deficient in some
> way and I'm not able to get access to either the Request or Response
> contexts I need to set up the DIME attachment passing between client and
> server. Any idea what's wrong with my either my environment or my code?
>
> Thanks immensely for any help which you can provide!
>
> - Joe Geretz -
>
>