TheChaseMan's Frenetic SoapBox

Always looking for better ways to do things...

Another Open Solicitation for Indigo Advice

Regarding my last post, I tried to take the coward's way out by avoiding hosting in a console app and create an indigo service web application project. I even left the code alone, built and ran it with cassini. Then I was able to successfully create a proxy using svcutil.exe against it.
  
C:\Program Files\Microsoft Indigo Preview>svcutil.exe http://localhost/IndigoService2/Service.svc
Microsoft (R) Service Model Metadata Tool
[Microsoft(R) .NET Framework, Version 2.0.50110.20]
Copyright (C) Microsoft Corporation. All rights reserved.

Generating files...
C:\Program Files\Microsoft Indigo Preview\tempuri.org.Bindings.cs

Next, I move the code into IIS and again was able to create a proxy using svcutil.exe, unlike my endeavor with the console host. So I tried writing a client to make a call to the server...

ChannelFactory<IMyServiceChannel> cf = new ChannelFactory<IMyServiceChannel>(new EndpointAddress("http://localhost/MyService/Ep1"), new BasicProfileBinding());

IMyServiceChannel ch1 = cf.CreateChannel();

string result = ch1.MyOperation1("Sean");

ch1.Close();

Console.WriteLine("The MyService service returned '" + result + "'");


The result was: "Unhandled Exception: System.ServiceModel.ProtocolException: HTTP response code:'MethodNotAllowed' is not conformant to the SOAP-over-HTTP request-reply binding . ---> System.Net.WebException: The remote server returned an error: (405) Method Not Allowed."

Again, any thoughts or suggestions are welcome.  :-)


Digg!

posted on Saturday, March 26, 2005 2:18 PM

Feedback

No comments posted yet.