473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Problem with SDK v1.1 sample...

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.SoapDocumentMethodA ttribute("http://tempuri.o
rg/Subtract", RequestNamespace:="http://tempuri.org/",
ResponseNamespace:="http://tempuri.org/",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.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.SoapHttpClientProtoc ol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) +1294
System.Web.Services.Protocols.SoapHttpClientProtoc ol.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.OnServe rClick(EventArgs e)
+108

System.Web.UI.HtmlControls.HtmlInputButton.System. Web.UI.IPostBackEventHandl
er.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277

Nov 17 '05 #1
3 2048
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!
************************************************** **************************
****
<.> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
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.SoapDocumentMethodA ttribute("http://tempuri.o rg/Subtract", RequestNamespace:="http://tempuri.org/",
ResponseNamespace:="http://tempuri.org/",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.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.SoapHttpClientProtoc ol.ReadResponse(SoapClient Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) +1294
System.Web.Services.Protocols.SoapHttpClientProtoc ol.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.OnServe rClick(EventArgs e)
+108

System.Web.UI.HtmlControls.HtmlInputButton.System. Web.UI.IPostBackEventHandl er.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277

Nov 17 '05 #2
Care to share that information?
Nov 17 '05 #3
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.
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Sandra | last post by:
I was given this problem for extra credit and I am just stuck ! BTW - I am not asking for source code and I am not asking anyone to do my homework as I do want to learn .. I just need a hint or two...
2
by: franklini | last post by:
hello people i. can anybody help me, i dont know what is wrong with this class. it has something to do with the me trying to override the input output stream. if i dont override it, it works fine....
5
by: towers | last post by:
Hello, I've got a bit of experience in C++, but I'm writing my first app that is dependent on relatively precise math functions. The app requires that I get a time stamp based on s sample...
5
by: Thames | last post by:
For the Configuration Assistant, why gave me such errors when I try to add remote database "sample" on linux (DB2 ESE UDB version 8)using "add database wizard" to my local DB server ...
12
by: Thames | last post by:
I just did some replication operations between remote DB on linux and local DB on windows yesterday It gave me such errors when I perform db connection via command line windows (local DB on...
3
by: ferbar | last post by:
Hi all, I'm working on a program that tests a random number generator -rand()- in this case. Runs and Chi square test have to be applied to see if the numbers generated are random.. anyway, I'm...
4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
22
by: sam_cit | last post by:
Hi Everyone, I have the following structure in my program struct sample { char *string; int string_len; };
12
by: sheldonlg | last post by:
Here is my situation. I am coding in an AJAX framework for an intranet application behind a vpn. Therefore, I can't give you a URL for the actual app. I made a sample app for viewing and am...
4
Claus Mygind
by: Claus Mygind | last post by:
I am trying to create a custom object, with objects that have objects. My problem is with the last object in the chain (sample), rather than create an additional object for a new value it simply...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.