Re: WSE/DIME - ResponseSoapContext.Current = <undefined value>
- From: "Joseph Geretz" <jgeretz@xxxxxxxxxx>
- Date: Tue, 6 Sep 2005 12:17:41 -0400
Hi Manfred,
I have done this. I've written a small Winforms driver which drives the Web
Service request as follows:
In Form Load, the Web Service client proxy is created:
private void frmFetchFile_Load(object sender, System.EventArgs e)
{
m_Repository = new SRSFreedom.Repository();
}
Subsequently, I attempt to retrieve the attachment:
Attachments = m_Repository.DropDIMEOnMe(txtFileSpec.Text);
This has not changed anything. I continue to get the exact same problem.
ResponseSoapContext.Current = <undefined value>.
Doesn't anyone have a solution to this? I've already uninstalled and
reinstalled my Frameworks, Service Packs, WSE 2.0.
Thanks!
- Joe Geretz -
"Manfred Gloiber" <no@xxxxxxxxx> wrote in message
news:Oj4Zoc%23rFHA.2596@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Joseph,
>
> the ResponseSopaContext.Current will only be initialized if you access it
> through another winapp/webapp because only then a proxy for accessing the
> web service will be created.
>
> So simply add a test project to your solution and start the web service
> *and* the test project (or select multiple project to start if you hit run
> in the *solution* properties).
>
> You can fully debug two (or more) running process at the same time within
> the VS.NET IDE.
>
> HTH!
>
>
> --
> Manfred
>
> "Joseph Geretz" <jgeretz@xxxxxxxxxx> wrote in message
> news:%23AeGAz2rFHA.528@xxxxxxxxxxxxxxxxxxxxxxx
>> Why isn't the ASP.NET runtime providing a valid reference to the
>> ResponseSoapContext object to my WebService? I'm trying to use WSE and
>> DIME to send attachments via Web Service. I created a brand new
>> WebService project and added in the reference to WSE. I didn't modify the
>> Web.Config file myself, but when I looked I was pleasantly surprised to
>> see that all entries were added automatically for me (see Web.config file
>> below).
>>
>> Here is the Web Service method which I've defined:
>>
>> [WebMethod]
>> public int DropDIMEOnMe(string FileSpec)
>> {
>> SoapContext respContext = ResponseSoapContext.Current;
>> DimeAttachment dimeAttach = new DimeAttachment("file/unknown",
>> TypeFormat.MediaType, FileSpec);
>> respContext.Attachments.Add(dimeAttach);
>> return respContext.Attachments.Count;
>> }
>>
>> The statement
>>
>> respContext.Attachments.Add(dimeAttach);
>>
>> trips the following error:
>>
>> Object reference not set to an instance of an object.
>>
>> The crux of the problem is that ResponseSoapContext.Current = <undefined
>> value> when I attempt to access it. Why am I unable to get access to the
>> ResponseSoapContext object?
>>
>> Thanks for any assistance which you can provide!
>>
>> - Joe Geretz -
>>
>> Here's my Web.Config file:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <configuration>
>> <configSections>
>> <section name="microsoft.web.services2"
>> type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration,
>> Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
>> PublicKeyToken=31bf3856ad364e35" />
>> </configSections>
>> <system.web>
>> <compilation defaultLanguage="c#" debug="true" />
>> <customErrors mode="RemoteOnly" />
>> <authentication mode="Windows" />
>> <authorization>
>> <allow users="*" />
>> </authorization>
>> <trace enabled="false" requestLimit="10" pageOutput="false"
>> traceMode="SortByTime" localOnly="true" />
>> <sessionState mode="InProc"
>> stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
>> source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"
>> />
>> <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
>> <webServices>
>> <soapExtensionTypes>
>> <add type="Microsoft.Web.Services2.WebServicesExtension,
>> Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
>> PublicKeyToken=31bf3856ad364e35" priority="1" group="0" />
>> </soapExtensionTypes>
>> </webServices>
>> </system.web>
>> <microsoft.web.services2>
>> <diagnostics />
>> </microsoft.web.services2>
>> </configuration>
>>
>>
>>
>
>
.
- References:
- WSE/DIME - ResponseSoapContext.Current = <undefined value>
- From: Joseph Geretz
- Re: WSE/DIME - ResponseSoapContext.Current = <undefined value>
- From: Manfred Gloiber
- WSE/DIME - ResponseSoapContext.Current = <undefined value>
- Prev by Date: Re: 401 Access Denied while accessing WSE 3.0 WebService
- Next by Date: How to configure client to make DIME request?
- Previous by thread: Re: WSE/DIME - ResponseSoapContext.Current = <undefined value>
- Next by thread: Re: WSE/DIME - ResponseSoapContext.Current = <undefined value>
- Index(es):
Relevant Pages
|