RE: HELP!!! RequestSoapContext.Current always Nothing...
From: Nodrick (Nodrick_at_discussions.microsoft.com)
Date: 01/31/05
- Next message: Sid: "RE: replacing Server Private.pfx with my own generated cert"
- Previous message: William Stacey [MVP]: "Re: Custom UsernameTokenManager"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 13:25:07 -0800
I have fixed this problem.
My ISP has WSE2.0 SP1 installed and I have WSE2.0 SP2 installed on my local
development machine!!
Need to have the exact same versions installed at the client AND the server.
Cheers all
Nodrick
"Nodrick" wrote:
> I have a standard WSE 2.0 file attachment upload/download application on my
> localhost which works perfectly.
>
> However, when I install the application on my Live Webserver and run it, an
> Exception occurs on line 3 "Object reference not set to an instance of an
> object." This is referring to the RequestSoapContext.Current Object.
>
> CODE
> 1 <WebMethod()>Public Sub UploadFile(ByVal filename As String)
> 2 Dim fs As FileStream = File.Create(Server.MapPath("uploads\" &
> filename))
> 3 Dim fileLength As Integer =
> RequestSoapContext.Current.Attachments(0).Stream.Length
> 4 Dim buffer(fileLength) As Byte
>
> 5 RequestSoapContext.Current.Attachments(0).Stream.Read(buffer, 0,
> fileLength)
> 6 fs.Write(buffer, 0, fileLength)
> 7 fs.Close()
> 8 End Sub
>
> As I said, It all works perfectly on the Localhost, so the web.config is ok
> (I have checked this).
>
> I can only assume it is a SOAP security difference between my localhost
> server and the live web server.
>
> Can anyone help as I am going crazy trying to find an answer!!!
>
> Thank You
>
>
- Next message: Sid: "RE: replacing Server Private.pfx with my own generated cert"
- Previous message: William Stacey [MVP]: "Re: Custom UsernameTokenManager"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|