C# ServiceReference未在IIS 7上更新
在服务器上,我的应用程序中有web.config:C# ServiceReference未在IIS 7上更新,c#,wcf,iis,iis-7,C#,Wcf,Iis,Iis 7,在服务器上,我的应用程序中有web.config: <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> </appSettings> <connectionStrings> </connectionStrings> <system.serviceModel> <bindings>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
</appSettings>
<connectionStrings>
</connectionStrings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097152000" maxBufferPoolSize="524288000" maxReceivedMessageSize="2097152000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="524288000"
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="Server.FileServer.Service" behaviorConfiguration="Server.FileServer.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://192.168.1.217/FileServer/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" contract="Server.FileServer.IService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Server.FileServer.Service1Behavior">
<!-- 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>
</system.serviceModel>
<system.web>
<compilation debug="true" />
<httpRuntime maxRequestLength="2097151" executionTimeout="1000" />
<customErrors mode="RemoteOnly" />
</system.web>
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>
但当我通过wcf测试客户端进行检查时,我发现:
xml version=“1.0”encoding=“utf-8”?>
正如您所看到的,绑定的参数是不同的
有什么想法吗 创建服务引用时,绑定参数(如缓冲区大小)不会自动从服务器传播到客户端。您还必须在客户端手动调整下摆
这就是问题所在吗?我不太清楚到底是什么问题。创建服务引用时,绑定参数(如缓冲区大小)不会自动从服务器传播到客户端。您还必须在客户端手动调整下摆
这就是问题所在吗?我有点不清楚到底是什么问题。我认为Thorarin是对的,有些信息无法从服务器传播到客户端。
在这里签出我认为Thorarin是对的,有些信息无法从服务器传播到客户端。
在这里签出问题是我将web.config放在服务器上,但当我运行Wcf测试客户端(vs文件夹中common7中的工具)时,我看到了不同的参数。“我没有给任何客户添加参考资料”。@phenevo:你问题的标题有点误导,但同样的原则仍然适用。服务器使用的绑定参数未向客户端公开,因此客户端不会自动使用相同的参数。我更改了behaviorConfiguration的名称,但仍然看到以前的名称。我知道有点不对劲,因为当我使用winforms应用程序时,当我尝试上载大(>10mb)文件时会出错,但当我发送小文件时,一切都正常(1mb)。问题是我将web.config放在服务器上,但当我运行Wcf测试客户端(vs文件夹中common7中的工具)时,我看到了不同的参数。“我没有给任何客户添加参考资料”。@phenevo:你问题的标题有点误导,但同样的原则仍然适用。服务器使用的绑定参数未向客户端公开,因此客户端不会自动使用相同的参数。我更改了behaviorConfiguration的名称,但仍然看到以前的名称。我知道有些地方不对劲,因为当我使用winforms应用程序时,当我尝试上载大(>10mb)文件时会出错,但当我发送小文件时,一切正常(1mb)。
xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" 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">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://SOMEADRESS.pl/FileServer/Server.FileServer.Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="IService" name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
</configuration>