问题描述
近期在开发一个wcf项目,想在IIS7上部署,想使用netTCP的传输方式,网上找了好多方法,可惜一直失败。下面是web.config文件内容,在两个不同的项目里面有不同的结果,请各位大虾帮忙看看问题所在。PS:IIS7环境,.net3.1ps1,was,net.tcp都已配置好了(假装好了吧。。)<?xmlversion="1.0"?><configuration><system.web><compilationdebug="true"targetFramework="4.0"/></system.web><system.serviceModel><protocolMapping><addscheme="tcp"binding="netTcpBinding"/></protocolMapping><bindings><netTcpBinding><bindingname="netTcpBindConfig"closeTimeout="00:30:00"portSharingEnabled="true"openTimeout="00:30:00"receiveTimeout="00:30:00"sendTimeout="00:30:00"transactionFlow="false"transferMode="Buffered"transactionProtocol="OleTransactions"hostNameComparisonMode="StrongWildcard"listenBacklog="10"><readerQuotasmaxDepth="2147483647"maxStringContentLength="2147483647"maxArrayLength="2147483647"maxBytesPerRead="2147483647"maxNameTableCharCount="2147483647"/><reliableSessionordered="true"inactivityTimeout="00:01:00"enabled="false"/><securitymode="None"><transportclientCredentialType="Windows"protectionLevel="EncryptAndSign"/><messageclientCredentialType="Windows"/></security></binding></netTcpBinding></bindings><services><servicebehaviorConfiguration=""name="WCFService1.Service1"><endpointaddress=""binding="netTcpBinding"bindingConfiguration="netTcpBindConfig"contract="QuotationWcfService.IQuotationService"><identity><dnsvalue="localhost"/></identity></endpoint><endpointaddress="mex"binding="mexTcpBinding"contract="IMetadataExchange"/><host><baseAddresses><addbaseAddress="net.tcp://192.168.10.48:4502/TestService"/></baseAddresses></host></service></services><behaviors><serviceBehaviors><behaviorname=""><serviceMetadatahttpGetEnabled="true"/><serviceDebugincludeExceptionDetailInFaults="true"/><dataContractSerializermaxItemsInObjectGraph="655360"/></behavior></serviceBehaviors></behaviors></system.serviceModel><system.webServer><modulesrunAllManagedModulesForAllRequests="true"/></system.webServer></configuration>