[Mono-aspnet-list] Hosting a WCF service in XSP2
Ferdinand Funke
dr_doom1983 at yahoo.de
Fri Jun 25 08:35:40 EDT 2010
Hi
I am quite new to WCF and am trying to host a very simple WCF service in
xsp2. Actually I created it in Visual Studio 2010 (where everything
works fine) and tried to port it to Linux (as .NET 3.5 project). In the
app.config of my client I changed the port of the server and started the
server then. Well as a matter of fact that does not work. I start xsp2
in the service's directory to make it accessible (and I can access the
service from the browser). But when I start my small Console application
the following exception occurs:
Unhandled Exception: System.NotImplementedException: The requested
feature is not implemented.
at
System.ServiceModel.Configuration.WSHttpBindingElement.OnApplyConfiguration
(System.ServiceModel.Channels.Binding binding) [0x00000] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/WSHttpBindingElement.cs:101
at
System.ServiceModel.Configuration.StandardBindingElement.ApplyConfiguration
(System.ServiceModel.Channels.Binding binding) [0x00030] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardBindingElement.cs:139
at System.ServiceModel.Configuration.ConfigUtil.CreateBinding
(System.String binding, System.String bindingConfiguration) [0x00063] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs:81
at System.ServiceModel.ChannelFactory.ApplyConfiguration
(System.String endpointConfig) [0x000e8] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs:127
at System.ServiceModel.ChannelFactory.InitializeEndpoint
(System.String endpointConfigurationName,
System.ServiceModel.EndpointAddress remoteAddress) [0x00024] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs:274
at
System.ServiceModel.ChannelFactory`1[CreditCardServiceTest.ServiceReference1.ICreditCardValidator]..ctor
(System.String endpointConfigurationName,
System.ServiceModel.EndpointAddress remoteAddress) [0x00017] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs:70
at System.ServiceModel.ClientBase`1[TChannel].Initialize
(System.ServiceModel.InstanceContext instance, System.String
endpointConfigurationName, System.ServiceModel.EndpointAddress
remoteAddress) [0x00000] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:159
at System.ServiceModel.ClientBase`1[TChannel]..ctor
(System.ServiceModel.InstanceContext instance, System.String
endpointConfigurationName) [0x00028] in
/usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:109
at System.ServiceModel.ClientBase`1[TChannel]..ctor
(System.ServiceModel.InstanceContext instance) [0x00000] in <filename
unknown>:0
at System.ServiceModel.ClientBase`1[TChannel]..ctor () [0x00000] in
<filename unknown>:0
at
CreditCardServiceTest.ServiceReference1.CreditCardValidatorClient..ctor
() [0x00000] in <filename unknown>:0
at CreditCardServiceTest.Program.Main (System.String[] args)
[0x00000] in
/home/rupert/Desktop/CreditCardServiceTest/CreditCardServiceTest/Program.cs:12
Perhaps someone of you can help me out. As I think the code is correct
I'll post some of my configurations.
Client's app.config :
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ICreditCardValidator" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8080/CreditCardValidator.svc"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_ICreditCardValidator"
contract="ServiceReference1.ICreditCardValidator"
name="WSHttpBinding_ICreditCardValidator">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
Server Web.Config:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICreditCardValidator"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="CreditCardService.CreditCardValidator"
behaviorConfiguration="bh1">
<endpoint
address="http://localhost:8080/CreditCardValidator.svc"
binding="basicHttpBinding"
contract="CreditCardService.ICreditCardValidator" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="bh1">
<!-- To avoid disclosing metadata information, set the value below to
false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set
the value below to true. Set to false before deployment to avoid
disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
I am quite stuck at this point so I would be glad if someone could help me.
Best regards
Ferdinand
More information about the Mono-aspnet-list
mailing list