I'm getting the maxStringCount is exceeded error, and have read a ton on fixing the issue (that is, if you're using http bindings).
Problem for me, I'm using netTcpBinding. So I have no idea what to put in bindingConfiguration.. Here's my app.config:
<services>
<service behaviorConfiguration="ExStreamWCF.Service1Behavior"
name="ExStreamWCF.Service1">
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
contract="ExStreamWCF.IService1">
<identity>
<dns value="Devexstream-2.anchorgeneral.local" />
<!--<dns value="vmwin2k3sta-tn2" />-->
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://Devexstream-2:8080/Service" />
<!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />-->
</baseAddresses>
</host>
</service>
Any ideas?
Thanks,
Jason
Do you mean maxStringContentLength? If so, you set that in the same section of the config file you do for other bindings - in the ReaderQuotas section of the Binding section. I.e.:
<Bindings>
<netTcpBinding>
<binding name=".....>
<readerQuotas maxStringContentLength="8192" .... />
</binding>
</netTcpBinding>
</Bindings>
If you mean something else, can you provide some more details?
Related
When I open the properties page of my Xaf Mobile Solution I can see that the project url is
http://localhost:2065/
I want to use SSL in my development environment.
What do I need to do?
There are 2 kinds of project properties.
Those accessed by right clicking the project and those accessed by pressing F4
Highlight the Mobile Project and Press F4
Then you can see the SSL Enabled property with the URL
Copy the URL and paste it into the Project Url on the web tab of the properties
Then you may be up to the next issue
The resource cannot be found
Copying from Dev Express Help
Next step will be to replace MainDemo with my solution name
<bindings>
<webHttpBinding>
<binding name="msgSize" maxReceivedMessageSize="2147483647">
</binding>
<binding name="msgSizeSSL" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="MainDemo.Mobile.DataService">
<endpoint address="" behaviorConfiguration="" binding="webHttpBinding" bindingConfiguration="msgSize" contract="System.Data.Services.IRequestHandler"/>
<endpoint address="" behaviorConfiguration="" binding="webHttpBinding" bindingConfiguration="msgSizeSSL" contract="System.Data.Services.IRequestHandler"/>
</service>
<service name="MainDemo.Mobile.MetadataService">
<endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="msgSize" contract="DevExpress.ExpressApp.Mobile.Services.IMobileMetadataService"/>
<endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="msgSizeSSL" contract="DevExpress.ExpressApp.Mobile.Services.IMobileMetadataService"/>
</service>
<service name="MainDemo.Mobile.DownloadReportService">
<endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="msgSize" contract="DevExpress.ExpressApp.ReportsV2.Mobile.IXafDownloadReportService" />
<endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="msgSizeSSL" contract="DevExpress.ExpressApp.ReportsV2.Mobile.IXafDownloadReportService" />
</service>
</services>
Nn generall I have serving hosting on tcp and I can't parse my wsdl with SoapUI, while it works with wcfTestClient.
SoapUI gives me error:
Missing importer for...
Missing portType for binding..
Unfortunally I need to add headers which I heard is immposible for wcfTestClient.
And my service configuration
<service name=".." behaviorConfiguration="...">
<endpoint binding="netTcpBinding" bindingNamespace="http://.." bindingConfiguration="SecureNetTcpBinding" contract="..." address="" />
<endpoint address="mex" bindingNamespace="http://.." binding="netTcpBinding" bindingConfiguration="SecureNetTcpBindingMex" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:50002...svc" />
</baseAddresses>
</host>
</service>
<binding name="SecureNetTcpBindingMex" maxConnections="400" listenBacklog="400">
<security mode="None">
</security>
</binding>
Is it possible to parse wcf net.tcp with SoapUI ? If not what options do I have ?
Just add the following endpoint:
<endpoint address="soap" binding="basicHttpBinding" contract="...">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
Then consume into SoapUI from http://localhost:50002...svc/soap
I have a service which is hosted in Azure environment. i am consuming that service using a console application. While doing so, i get exception:
"The requested service,
'http://xxxx-d.yyyy.be/Services/zzzzInService.svc' could not be
activated. See the server's diagnostic trace logs for more
information."
Can anyone help me to find what i am missing ?
The service is defined like this -
<service name="xxxx.AppServer.Host.Services.yyyyy.zzzzPlugInService"
behaviorConfiguration="MetadataBehavior" xdt:Locator="XPath(//service[#name='xxxx.AppServer.Host.Services.yyyy.zzzzPlugInService'])" xdt:Transform="Replace">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpsBinding" contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
When i Use the link http://xxxx-d.yyyy.be/Services/zzzzInService.svc in browser i get these messsage -
The binding at system.serviceModel/bindings/basicHttpBinding does not
have a configured binding named 'basicHttpBinding'. This is an invalid
value for bindingConfiguration.
source :
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="xxxx.Shared.IntegrationServices.zzzzz.IzzzzPlugInService">
The error says that you don't have a binding configuration for "basicHttpBinding" named "basicHttpBinding". Since you didn't post your complete config, and the error message says that, I'll assume that this is the case.
The config below (under <system.serviceModel>) has two binding definitions under <basicHttpBinding>, one for each binding configuration you have in your endpoint declarations. You should have something similar in your config as well.
<services>
<service name="xxxx.AppServer.Host.Services.yyyyy.zzzzPlugInService"
behaviorConfiguration="MetadataBehavior"
xdt:Locator="XPath(//service[#name='xxxx.AppServer.Host.Services.yyyy.zzzzPlugInService'])"
xdt:Transform="Replace">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="basicHttpBinding"
contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="basicHttpsBinding"
contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" />
<binding name="basicHttpsBinding">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
One of the other reasons can be if you have a duplicate or overload methods in your svc.cs file
When i try communicating with my WCF service i get the following error:
The maximum nametable character count quota (16384) has been exceeded
while reading XML data. The nametable is a data structure used to
store strings encountered during XML processing - long XML documents
with non-repeating element names, attribute names and attribute values
may trigger this quota. This quota may be increased by changing the
MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object
used when creating the XML reader. Line 4, position 283.
I tried increasing my maxNameTableCharCount by adding readerQuotas as suggested here but i still get the same error.
...
<bindings>
<basicHttpBinding>
<binding name="oseo_basicHTTP_binding">
<readerQuotas maxDepth ="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="oseo">
<host>
<baseAddresses>
<add baseAddress="http://localhost:56565/" />
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="oseo_basicHTTP_binding" contract="Ioseo" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
...
EDIT #1:
Some background info:
This web.config is on the service side. I'm using SoapUI as the client and not a .NET client.
Make sure that you have the fully-qualified name of the service class in the name attribute of the <service> element. Your contract class is on the DataContract namespace (DataContract.Ioseo). If the service class is also in the same namespace, this is what you need to have:
<services>
<service name="DataContract.OSEOService">
<host>
<baseAddresses>
<add baseAddress="http://localhost:51515/" />
</baseAddresses>
</host>
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="oseo_basicHTTP_binding"
contract="DataContract.Ioseo" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
I have two Services called TemplateService, TemplateReportService (both defined in one WCF Service Library) to be exposed to the client application.
And, I am trying to host these services under Windows Service.
Can anyone please guide me if App.config in Windows Service will be same as the one in WCF Library?
Here is my app.config in WCF Library:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
name="ReportingComponentLibrary.TemplateService">
<endpoint address="" binding="wsHttpBinding" contract="ReportingComponentLibrary.ITemplateService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" ></endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/ReportingComponentLibrary/TemplateService/" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
name="ReportingComponentLibrary.TemplateReportService">
<endpoint address="" binding="wsHttpBinding" contract="ReportingComponentLibrary.ITemplateReportService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/ReportingComponentLibrary/TemplateReportService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ReportingComponentLibrary.TemplateServiceBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
So, the App.config in my Windows Service(Where I am hosting above two services)
will be same as above or there are only some particular sections that I need to move.
Please guide.
Thank you!
First, remove the as we talked about in your other question. Second libraries don't have their own .config files and there is no (built in) way to import certain configuration sections in .NET. So you must consolidate the configuration settings for each library into the single app.config of the Windows service.