.NET Framework Bookmark and Share   
 index > .NET StockTrader Sample Application > failed to activate order processor service endpoint via wsHttpBinding
 

failed to activate order processor service endpoint via wsHttpBinding

Hi,

we want to add message security to the order processor service via a wshttpbinding and client certificate credentials.

Following the instruction in configuration.pdf exactly, we imported the certficate and update the order processor virtual host service behavior successfully, but failed to activate the service endpoint. We got the error message in configuration console like bellow:
------------------
Exception Restarting Host: Order Processor Service Host
Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http,net.tcp].
at System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHostBase.AddServiceEndpoint(String implementedContract, Binding binding, Uri address, Uri listenUri)
at System.ServiceModel.ServiceHostBase.AddServiceEndpoint(String implementedContract, Binding binding, String address, Uri listenUri)
at System.ServiceModel.ServiceHostBase.AddServiceEndpoint(String implementedContract, Binding binding, String address)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at ConfigService.ServiceConfigurationUtility.ConfigUtility.reflectInvokeMethod(Object objectInstance, String methodName, Object[] parameters) in C:\stockrtm\Configuration\ConfigurationUtility\Utility.cs:line 577
at ConfigService.ServiceConfigurationHelper.ServiceConfigHelper.applyIdentityAndBehaviors(HostedServices serviceItem, ContractDescription contract, Binding binding, String eapAddress, Object serviceHost, Object settingsInstance) in C:\stockrtm\Configuration\ServiceConfiguration\ServiceConfigHelper_MasterHosts.cs:line 2542
at ConfigService.ServiceConfigurationHelper.ServiceConfigHelper.applyServiceAddress(HostedServices serviceItem, Binding& binding, Dictionary`2& bindingDictionary, Object serviceHost, Object settingsInstance) in C:\stockrtm\Configuration\ServiceConfiguration\ServiceConfigHelper_MasterHosts.cs:line 2205
at ConfigService.ServiceConfigurationHelper.SelfDescribingServiceHostPrimaryBase.SelfDescribingServiceHostPrimaryBaseInit(Object settingsInstance, Int32 serviceHostID) in C:\stockrtm\Configuration\ServiceConfiguration\PrimarySelfDescribingServiceHosts.cs:line 155
at ConfigService.ServiceConfigurationHelper.ServiceConfigHelper.MasterServiceSelfHost.StartThreadProc(Object stateInfo) in C:\stockrtm\Configuration\ServiceConfiguration\ServiceConfigHelper_MasterHosts.cs:line 1083
-------------
Seems failed. But it appeared the success message on the 'manage hosted service' page and the value of that 'Active' column became 'True' on the 'Hosted Services' page.

However, in the SOA Status Map, the icon in front of the Endpoint 'Order Processor Async-Http w/Manage Security' was RED, not GREEN, which meant the endpoint was still not activated.

Does anyone have some advice? It's appreciated.

BTW: we want to use Java to consume the order process service via the standard http protocol, that's why we configure the order processor service in the above way. Does anyone know how to do that?



Jin MIng, ThoughtWorks
  • Edited byJin Ming Friday, May 15, 2009 9:47 AM
  • Edited byJin Ming Friday, May 15, 2009 9:58 AM
  •  
Jin Ming
Two things strike me:

1) Delete the basicHttpBinding endpoint you still have defined using ConfigWeb--it looks like it is still trying to add a basicHttpBinding endpoint. There should be no basicHttpBinding once you add the wsHttpBinding endpoint with message security.
2) I believe it is complaining about no https (note, not http) scheme being registered becuase if you attempt to add message security to a basicHttpBinding, WCF forces you to use a secure channel (https) for security reasons, and will not start if you are not using https; however, if you use wsHttpBinding, it is able to use the certs to encrypt the payload. Again, want to be using wsHttpBinding on the endpoint, and delete any basicHttpBinding endpoints.
3)So, Make sure you are truly marking this as wsHttpBinding in ConfigWeb (or better, wsHttp2007Binding--implements final std spec for ws-security)--check ConfigWeb and alsocheck your config file to find the binding configuration you are selecting in configweb is truly a wsHttpBinding or wsHttp2007Binding...

-Greg


Greg Leake, Microsoft
Gregory Leake
Two things strike me:

1) Delete the basicHttpBinding endpoint you still have defined using ConfigWeb--it looks like it is still trying to add a basicHttpBinding endpoint. There should be no basicHttpBinding once you add the wsHttpBinding endpoint with message security.
2) I believe it is complaining about no https (note, not http) scheme being registered becuase if you attempt to add message security to a basicHttpBinding, WCF forces you to use a secure channel (https) for security reasons, and will not start if you are not using https; however, if you use wsHttpBinding, it is able to use the certs to encrypt the payload. Again, want to be using wsHttpBinding on the endpoint, and delete any basicHttpBinding endpoints.
3)So, Make sure you are truly marking this as wsHttpBinding in ConfigWeb (or better, wsHttp2007Binding--implements final std spec for ws-security)--check ConfigWeb and alsocheck your config file to find the binding configuration you are selecting in configweb is truly a wsHttpBinding or wsHttp2007Binding...

-Greg


Greg Leake, Microsoft
Hi, Greg, thanks for you reply

can we get the order processor service via standard http protocol, not via net.tcp protocol? it means we want to get the wsdl file with the url 'http://localhost:8000/Orders?wsdl'

is it possible?


Jin MIng, ThoughtWorks
Jin Ming

You can use google to search for other answers

Custom Search

More Threads

• Config Services and ESB
• installation erroring out
• How to Make sub report using C#.NET
• ConfigWeb help
• Performance Test with Capacity Tool, load balancing issues
• Does anyone have this working on a website somewhere?
• Default Button
• SOA Status Map
• Config Services / Domain Accounts
• Claims-based security and configuration service