私はここでナッツをしています - 私はこの問題を解決しようとしている私の6日目で、私は心を失っています。WCF内部ネットワークアドレスから動作しますが、外部のときにエラーが返されます
基本的に内部的には、サービスは100%期待どおりに動作します。基本的に、これは私はそれがここhttp://myexternaladdress.com/FileUploadService.svc?disco
があるディスコの問題を持って得たすべてである私は、外部テストライン上のクライアントを「消費」を作成し、私はそれをテストするために行くと、それは
"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (multipart/related; type=\"application/xop+xml\"). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<HTML>
<HEAD>
<link rel=\"alternate\" type=\"text/xml\" href=\"http://myexternaladdress.com/FileUploadService.svc?disco\"/>
<STYLE type=\"text/css\">
#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE>
<TITLE>
FileUploadService Service</TITLE>
</HEAD>
<BODY>
<DIV id=\"co'."}
を返し、私のサービスは
<?xml version="1.0"?>
<configuration>
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
>
<listeners>
<add name="xml"/>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="xml"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="C:\temp\WCFDiagnosticsExample.svclog" />
</sharedListeners>
</system.diagnostics>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="uploadDirectory" value="C:\temp\upload" />
</appSettings>
<system.web>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="3000"
/>
</diagnostics>
<extensions>
<behaviorExtensions>
<add name="applyAddressFilterModeBehavior"
type="Test.Behaviors.ApplyAddressFilterModeBehaviorElement, Test.Behaviors,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
</extensions>
<services>
<service behaviorConfiguration="myBehavior" name="myWCF.FileUploadService">
<endpoint address="" binding="wsHttpBinding" contract="myWCF.IFileUploadService" bindingConfiguration="myBinding"></endpoint>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="myBinding" messageEncoding="Mtom" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None"/>
</binding>
</wsHttpBinding>
<basicHttpBinding>
<binding name="FileUploadServiceBinding" transferMode="Streamed" messageEncoding="Mtom" maxReceivedMessageSize="99108864" maxBufferSize="65536" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00">
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="myBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
<applyAddressFilterModeBehavior/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="204800000"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
</configuration>
をを.config唯一の違いは、私が外部に来るとき、私は、ロード・バランサを介して来て、httpsにリダイレクトして、特定のサーバとポートへのトラフィックを送信し、私の外部アドレスを介してサービスを追加することです。そして私も.Open
私のサービスをうまくできます。メソッドを呼び出すと、私のエラーが発生します。誰かが1024文字だけでなく、私が間違っていることを指摘して、完全なメッセージを取得する方法を教えてもらえますか?
enabledhttpsとhttpsuriを追加しようとしましたが、それでも問題は解決しませんでした。
ありがとうございます!私はこれを解決するのに役立つ多くのポイントを借りています。