The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by siegenth]


I'm attempting to execute the helloget.cs (6.2) example and getting
the following failure:

Unhandled Exception: System.Net.WebException: The underlying
connection was closed: The remote name could not be resolved.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at HelloGet.Main(String[] args)

I created the helloService1.asmx (listing 6.1), I was able to
invoke the service from the browser using
http://localhost/ws/helloservice1.asmx.

Looking at the service description, I'm missing the the Http port
definitions. Here is the servie tag from the service description:

<service name="HelloService1">
<documentation>A greeting Web service</documentation>
<port name="HelloService1Soap" binding="s0:HelloService1Soap">
<soap:address location="http://127.0.0.1/ws/helloservice1.asmx" />
</port>
</service>

I suspect example helloget.cs invokes the service using
'HelloService1HttpGet'.

When I query the service description using wsdldesc.cs
(listing 6.3), it only retrieves one port.

$ wsdldesc
url : http://localhost/ws/helloservice1.asmx?WSDL
service name : HelloService1
Documentation: A greeting Web service
Ports :
HelloService1Soap

Looking at the mapping of .asmx files I see :
C:WINNTMicrosoft.NETFrameworkv1.1.4322aspnet_isapi.dll

In a previous posting (08/19/12) you referenced
C:WINNTMicrosoft.NETFrameworkv1.0.3705aspnet_isapi.dll

Have I made an obvious blunder, missed a flag/switch? Pointers or
insite would be appreciated.

eveling

ps : Thanks for writing the book, great job.
import-bot (20211) [Avatar] Offline
#2
Re: helloget.cs failure, missing ports?
[Originally posted by siegenth]

This may be a version issue.

Pursing the configuration file:
C:WINNTMicrosoft.NETFrameworkv1.1.4322CONFIGmachine.config,
I noticed the following...

:
<webServices>
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<!-- <add name="HttpPost"/> -->
<!-- <add name="HttpGet"/> -->

<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
:
It looks as if the default is now NOT to enable HttpPost and HttpGet. After
removing the comments surronding two adds, all of the examples executed
succesfully.
import-bot (20211) [Avatar] Offline
#3
Re: helloget.cs failure, missing ports?
[Originally posted by fgrimes]

Martin,

>> This may be a version issue.

Yes, it is a .NET V1.1 change. See my post "Re: URLs and helloget" on
8/19/2003.

Regards,
Fergal