Maybe something wrong with my Web.Config file (included below)? For some
reason the ASP.NET runtime isn't providing my Web Service with a
ResponseSoapCon text reference. Why not?
Thanks for your help,
- Joe Geretz -
<?xml version="1.0" encoding="utf-8"?>
<configuratio n>
<configSections >
<section name="microsoft .web.services2"
type="Microsoft .Web.Services2. Configuration.W ebServicesConfi guration,
Microsoft.Web.S ervices2, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= 31bf3856ad364e3 5" />
</configSections>
<system.web>
<webServices>
<soapExtensionT ypes>
<add type="Microsoft .Web.Services2. WebServicesExte nsion,
Microsoft.Web.S ervices2, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= 31bf3856ad364e3 5" priority="1" group="0" />
</soapExtensionTy pes>
</webServices>
</system.web>
<microsoft.web. services2>
<diagnostics>
<detailedErro rs enabled="true" />
</diagnostics>
</microsoft.web.s ervices2>
<compilation defaultLanguage ="c#" debug="true" />
<customErrors mode="RemoteOnl y" />
<authenticati on mode="Windows" />
<identity impersonate="tr ue" userName="" password="" />
<authorizatio n>
<allow users="*" />
</authorization>
<trace enabled="false" requestLimit="1 0" pageOutput="fal se"
traceMode="Sort ByTime" localOnly="true " />
<sessionState mode="InProc" stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se" timeout="20" />
<globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
</configuration>
"Joseph Geretz" <jg*****@nospam .com> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l...
It was a nice thought, but no dice.
Inspiration! A minimum of debugging shows that immediately after
executing
SoapContext respContext = ResponseSoapCon text.Current;
respContext shows up as <undefined value>
I'm testing this function through the default Web Page which is provided
as a test for Web Services. Can DIME be tested via a Browser request? Or
do I actually have to build a software client to test this?
I built a software client to test this. When stepping through this line of
code in the IDE
SoapContext respContext = ResponseSoapCon text.Current;
ResponseSoapCon text.Current evaluates to <undefined value>. Naturally,
this value is passed along to respContext.
Obviously, I'm not going to get very far until I can get ahold of a valid
ResponseSoapCon text. What am I missing?
Thanks for your help!
- Joe Geretz -
"Joseph Geretz" <jg*****@nospam .com> wrote in message
news:eL******** ******@TK2MSFTN GP10.phx.gbl... Here's my first attempt at DIME (code below signature). I'ts basically
straight out of Microsoft's online sample:
For some reason, the statement
respContext.Att achments.Add(di meAttach);
trips the following error:
Object reference not set to an instance of an object.
I've seen some of the solutions to this problem but they don't seem to
apply. I've gone to Project | Right Click | WSE 2.0 | General and
confirmed that both Enable this project for Web Service Enhancements and
Enable Microsoft Web Service Enhancement SOAP Extension are checked.
(Actually, I did not set these explicitly. I simply added a reference to
Microsoft.Web.S ervices2 from C:\Program Files\Microsoft
WSE\v2.0\Micros oft.Web.Service s2.dll. Subsequently when diagnosing this
problem, I came across this dialog and saw that these options were both
enabled.
Inspiration! A minimum of debugging shows that immediately after
executing
SoapContext respContext = ResponseSoapCon text.Current;
respContext shows up as <undefined value>
I'm testing this function through the default Web Page which is provided
as a test for Web Services. Can DIME be tested via a Browser request? Or
do I actually have to build a software client to test this?
Thanks for any help you can provide!
- Joe Geretz -
[WebMethod]
public int DropDIMEOnMe(st ring FileSpec)
{
SoapContext respContext = ResponseSoapCon text.Current;
DimeAttachment dimeAttach = new DimeAttachment( "file/unknown",
TypeFormat.Medi aType, FileSpec);
respContext.Att achments.Add(di meAttach);
return respContext.Att achments.Count;
}