ASP .NET响应内容被切断 - 怪异的bug

时间:2012-01-04 23:27:55

标签: asp.net iis ssl

我的应用程序出现问题,只有在发布服务器上部署后才会出现问题。我的应用在Webresource.axd上返回错误System.Web.HttpException invalid request 客户端请求的WebResource URL例如:(忽略**和*它们用于分隔部分网址)

  

WebResource.axd的?d = PLZ1f5srE_3_5bqe5SNJORbrjr9bvaTarv3MMKJi1fn ** GsDQLshr2sDQLshrmsDQLshrWsDQLshrGsDQLshq2sDQLshumvDQL72ZKbBQK5zYfpBAK5zZuMAwLEytPECwLbo5IqArrNo5oDAsbKp5sDAsbK66oFArnN28ILArnNj9UCAsfK8 / UJAqTNm4oJAv2jypsOAvCjpoIOAsbK / 6EDArnN254FAsbKh70KAqTNg7wKAqTNw84NAsTKm9ACAsbK8 / UJAtyj + uUHAsfKz + cEArnNg + gEAqTN1 + UEArnNv78KAsfK560FArrNg7wKArnNr5kDAqTNr5kDAsbKo5oDAsfKm9ACAv2jpoIOAsfK6 / cJArnN0 + QEArnN560FArnN08QLAv2jzpgOAsbK5 / YJAqTN28ILAsbKo + AEAqTNk9ICArnN350DAsbKm9ACAsbK44kJAqfNn4sJArnNs4YDArnN76sFArjNl9MCAsbK6 / cJArnN7 / QJAqTN0 / 0JAsbKi7oKAqfNm4oJAv2j + uUHAsfKi7oKArnN44kJArnNu74KAsbKi9QCArnN5 / YJAqTNz + cEArnNm4oJAsbKt4cDAsTK5 / YJArnNh70KArnNp8ELArnNt4cDArnNn9ECAtrKm9ACAsbKj9UCArnNn4sJAsbK7 / QJArnNi9QCArnNy8wNAsTK + 8ANAsbKs4YDAqTNi9QCAsfKk9ICArnNl9MCAvqjpoIOArnNo + AEArnNs7AKArnN0 / 0JAsfKo5oDAsbK / 8ENAsfK08QLAsbKk9ICAsbK0 + QEAr3Nl9MCAsbK3 + MEAsfK + 8ANAsbK + 8ANArnNg7wKAt3Km9ACArnN / 8YCArnN3 + MEArnNq5gDAvujpoIOArnNi7oKAsfK5 / YJArnNk9ICArnN / 8ENAqfNo5oDArnNz + cEArrN560FArnNr7UMAt3K5 / YJAsfK3 + MEAqTN / 6EDArrN / 6EDAtyjkioCp83nrQUCxMqLugoCuc3Dzg0CpM3TxAsCp82DvAoCxsqf0QICvc3nrQUC26PmzggCpM3L5gQCpM2fiwkCp83 / oQMCpM2jmgMCuc23sQoCuc2H1wICxMrr9wkCuc3rowoCuc3r9wkCus2X0wICp82X0wICuc3z9QkCuc2jmgMCuc37lgUCx8qHvQoCp83P5wQCuc3voAoCuc2b0AICxsrTxAsCxMqjmgMCpM2X0wIC3crr9wkCus23sQoCxsrP5wQCxsrnrQUC26P65QcCuc37wA0Cuc3 / oQMCpM37wA0Cp823sQoCuc2XjwMCuc3rqgUCpM3nrQUCuc3X + gkCuc3PzQ0C / aOGig4Cuc2HyQsCxsq7vgoCuc3X5QQC + qPKmw4Cuc2nmwMCuc3L5gQCuc2zsgwCxsq3sQoC / aPmzggCpM23sQoCuc3DxwIC3KPmzggCh + rGqAgChKbr / G4 * keCbLSNH7D5G4o / WMirW0wCCoaA ==

所以有两件事立刻打击了我:

  1. 装配时间戳的最后缺失& t =
  2. “/”和“+”通常在加密网址中找不到
  3. 我在我这边运行应用程序当然一切正常对我来说......但我在源文件中注意到我在客户端错误中看到的部分内容可以在我的html中找到:

    <script src="/WebResource.axd?d=**PLZ1f5srE_3_5bqe5SNJORbrjr9bvaTarv3MMKJi1fn**NUlSwWXFIxNUWR37nSX-uEeFiuIaj75QpNoWiMNuwvLvtF14FC7RJnWXlWsiRGRTxygC60zWpEKm8nsH2W5C_3w9fBgmsUvMtxxfwjQB23ipcHaCWFd_wvS5QWc5bgmPzUpNNF-gwwdthk8-NKZOJKbUxQg2&amp;amp;t=634601510084481499" type="text/javascript"></script> 
    
    <!-- SOME MORE CODE -->
    
    <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEW5wECuIuguQEC3LnYqw4C+MDh9AEClczxhwICjKHu/A4CovL+qwgC5oaBuAgCip7jrAkC2O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ujpoIOArnNi7oKAsfK5/YJArnNk9ICArnN/8ENAqfNo5oDArnNz+cEArrN560FArnNr7UMAt3K5/YJAsfK3+MEAqTN/6EDArrN/6EDAtyjkioCp83nrQUCxMqLugoCuc3Dzg0CpM3TxAsCp82DvAoCxsqf0QICvc3nrQUC26PmzggCpM3L5gQCpM2fiwkCp83/oQMCpM2jmgMCuc23sQoCuc2H1wICxMrr9wkCuc3rowoCuc3r9wkCus2X0wICp82X0wICuc3z9QkCuc2jmgMCuc37lgUCx8qHvQoCp83P5wQCuc3voAoCuc2b0AICxsrTxAsCxMqjmgMCpM2X0wIC3crr9wkCus23sQoCxsrP5wQCxsrnrQUC26P65QcCuc37wA0Cuc3/oQMCpM37wA0Cp823sQoCuc2XjwMCuc3rqgUCpM3nrQUCuc3X+gkCuc3PzQ0C/aOGig4Cuc2HyQsCxsq7vgoCuc3X5QQC+qPKmw4Cuc2nmwMCuc3L5gQCuc2zsgwCxsq3sQoC/aPmzggCpM23sQoCuc3DxwIC3KPmzggCh+rGqAgChKbr/g4ClPD6xgsCr/L07wkC7tqwgwUCtL2fYQLw0+rVBQKSg7DZBwL3teCNBAL3tZyNBAL3tYiNBALHpriBCAKahuPBAV+BOBC5oXM0AZHQT+bmVMUgNw6K" />
    

    请注意“错误网址”的第一部分:

      

    PLZ1f5srE_3_5bqe5SNJORbrjr9bvaTarv3MMKJi1fn

    可以在我的HTML的脚本标记中找到 和坏网址的第二部分:

      

    GsDQLshr2sDQLshrmsDQLshrWsDQLshrGsDQLshq2sDQLshumvDQL72ZKbBQK5zYfpBAK5zZuMAwLEytPECwLbo5IqArrNo5oDAsbKp5sDAsbK66oFArnN28ILArnNj9UCAsfK8 / UJAqTNm4oJAv2jypsOAvCjpoIOAsbK / 6EDArnN254FAsbKh70KAqTNg7wKAqTNw84NAsTKm9ACAsbK8 / UJAtyj + uUHAsfKz + cEArnNg + gEAqTN1 + UEArnNv78KAsfK560FArrNg7wKArnNr5kDAqTNr5kDAsbKo5oDAsfKm9ACAv2jpoIOAsfK6 / cJArnN0 + QEArnN560FArnN08QLAv2jzpgOAsbK5 / YJAqTN28ILAsbKo + AEAqTNk9ICArnN350DAsbKm9ACAsbK44kJAqfNn4sJArnNs4YDArnN76sFArjNl9MCAsbK6 / cJArnN7 / QJAqTN0 / 0JAsbKi7oKAqfNm4oJAv2j + uUHAsfKi7oKArnN44kJArnNu74KAsbKi9QCArnN5 / YJAqTNz + cEArnNm4oJAsbKt4cDAsTK5 / YJArnNh70KArnNp8ELArnNt4cDArnNn9ECAtrKm9ACAsbKj9UCArnNn4sJAsbK7 / QJArnNi9QCArnNy8wNAsTK + 8ANAsbKs4YDAqTNi9QCAsfKk9ICArnNl9MCAvqjpoIOArnNo + AEArnNs7AKArnN0 / 0JAsfKo5oDAsbK / 8ENAsfK08QLAsbKk9ICAsbK0 + QEAr3Nl9MCAsbK3 + MEAsfK + 8ANAsbK + 8ANArnNg7wKAt3Km9ACArnN / 8YCArnN3 + MEArnNq5gDAvujpoIOArnNi7oKAsfK5 / YJArnNk9ICArnN / 8ENAqfNo5oDArnNz + cEArrN560FArnNr7UMAt3K5 / YJAsfK3 + MEAqTN / 6EDArrN / 6EDAtyjkioCp83nrQUCxMqLugoCuc3Dzg0CpM3TxAsCp82DvAoCxsqf0QICvc3nrQUC26P mzggCpM3L5gQCpM2fiwkCp83 / oQMCpM2jmgMCuc23sQoCuc2H1wICxMrr9wkCuc3rowoCuc3r9wkCus2X0wICp82X0wICuc3z9QkCuc2jmgMCuc37lgUCx8qHvQoCp83P5wQCuc3voAoCuc2b0AICxsrTxAsCxMqjmgMCpM2X0wIC3crr9wkCus23sQoCxsrP5wQCxsrnrQUC26P65QcCuc37wA0Cuc3 / oQMCpM37wA0Cp823sQoCuc2XjwMCuc3rqgUCpM3nrQUCuc3X + gkCuc3PzQ0C / aOGig4Cuc2HyQsCxsq7vgoCuc3X5QQC + qPKmw4Cuc2nmwMCuc3L5gQCuc2zsgwCxsq3sQoC / aPmzggCpM23sQoCuc3DxwIC3KPmzggCh + rGqAgChKbr / G4

    可以在我的html的输入标签中找到。

    所以无论如何我猜客户端会收到已损坏/被切断的html代码我不知道或与其他请求混淆。也可能是生产在iis 6上,而开发是在iis 7上。生产服务器也在使用SSL,所以不确定这是否会干扰。可能是我的代码中的Server.Transfer吗?

    任何人都可以帮我吗?

    非常感谢!

2 个答案:

答案 0 :(得分:1)

这是IE8 Lookaheahd Downloader。该错误对用户是透明的,因此我们只是忽略错误。

ASP.NET Causing Corrupted HTML with WebResource.axd and ScriptResource.axd

Bugs in IE8's Lookahead Downloader

感谢您的帮助。

答案 1 :(得分:1)

Internet Explorer有一个2083-character limit on URLs

__EVENTVALIDATION验证参数长度为1877个字符。添加到网址的其余部分(问题不清楚,但可能与src元素的script中的内容类似),您已超出该限制。

您可能会发现必须为此类请求使用HTTP POST(由于长度)。

什么可以解释开发者之间的区别。和生产服务器是你的开发人员可能有一个较短的基本URL。机器(例如localhost会比www.example.com短),因为你只是在实际限制范围内,它可能仍然适用于你的开发。服务器