私のページは ASP.Net で書かれており、私たちのサイトは IIS 7.5 を実行しています。
私たちの Web サイトのページに投稿されている外部ソースから Xml ドキュメントを受信しようとしています。Content-Type "application/x-www-form-urlencoded" を使用して、Web ページからテスト ドキュメントを送信および受信できます。送信者のドキュメントは Content-Type "text/xml" です。web.config を変更してさまざまなことを試してみましたが、それでも送信者からの「空白」のドキュメントが返されます。これを引き起こす原因となる、まだ不足している設定はありますか?
私のweb.config設定は次のとおりです。
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<sessionState mode="Off" cookieless="true" />
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" />
<webServices>
<protocols>
<add name="HttpGet" />
<add name="HttpPost" />
</protocols>
</webServices>
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="P3P" value="policyref='https://oursite/w3c/p3p.xml',CP='NON DSP COR CUR OUR IND PUR ONL PHY'" />
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="POST,GET" />
<add name="Access-Control-Allow-Headers" value="content-type:text/xml;charset=utf-8"/>
</customHeaders>
</httpProtocol>
<staticContent>
<mimeMap fileExtension=".aspx" mimeType="text/xml" />
<mimeMap fileExtension=".aspx" mimeType="application/x-www-form-urlencoded"/>
</staticContent>
<httpErrors errorMode="Detailed" />
<httpCompression>
<staticTypes>
<add mimeType="text/xml" enabled="true"/>
</staticTypes>
<dynamicTypes>
<add mimeType="text/xml" enabled="true"/>
</dynamicTypes>
</httpCompression>
<security>
<requestFiltering>
<fileExtensions allowUnlisted="true" />
</requestFiltering>
</security>
</system.webServer>