Problem with SDK v1.1 sample...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having trouble with the VB MathServiceClient sample in the SDK (v1.1).
When I compiled the sample it created the proxy class file
(MathService.wsdl). All other samples work OK, so I don't think it's
permission related.....

Exception Details: System.Net.WebException: The request failed with HTTP
status 401: Unauthorized.

Source Error:

Line 59:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.o
rg/Subtract", RequestNamespace:="http://tempuri.org/",
ResponseNamespace:="http://tempuri.org/",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
_
Line 60: Public Function Subtract(ByVal A As Single, ByVal B As
Single) As Single
Line 61: Dim results() As Object = Me.Invoke("Subtract", New
Object() {A, B})
Line 62: Return CType(results(0),Single)
Line 63: End Function

Source File: <pathToSrc>\MathService.vb Line: 61

Stack Trace:

[WebException: The request failed with HTTP status 401: Unauthorized.]

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) +1294
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +218
MathServiceVB.MathService.Subtract(Single A, Single B) in
<pathToSrc>\MathService.vb:61
_ASP.mathserviceclient_aspx.Submit_Click(Object Sender, EventArgs E) +318
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e)
+108

System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandl
er.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
 
If this is the only WSDL (web services) example you have tried, it probably
is permisssions related. The 1.1 Framework locks many things down, by
default, that 1.0 left open. We found a way to tweak the machine.config file
to allow web services to work. It is a separate tag for GET and POST
implementations.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

****************************************************************************
****
Think Outside the Box!
****************************************************************************
****
 
Thanks anyhow; I figured it out. I had to manually config the Quickstarts
and I neglected to make the sample in question an app in IIS.
 
Back
Top