0

我正在研究應用程序,我們可以在其中承載Crystal報告並從應用程序運行它們。我遇到的問題是,當我試圖運行任何報告顯示空白屏幕。但它的Crystal Reports UI.Print出口等。但不破壞出像這樣enter image description here加載資源失敗:服務器響應狀態爲406(不可接受)==> promptengine-compressed.js

無法加載資源此錯誤的報告:服務器406(不接受) aspnet_client/system_web的狀態迴應/ 4_0_30319/crystalreportviewers13/promptengine-compressed.js

但是,當我在控制檯上的錯誤點擊它,如果我打開報告後,在新標籤頁中打開打開URL再次是work.but客戶端將不會那樣做的,所以我想要解決這個問題。

在整個應用程序

,有兩個地方,我們正在使用這個promptengine-compressed.js

一個crv.js

bobj.crv.config = { 
     isDebug : false, 
     scriptUri: null, // The uri for the viewer script dir (that holds crv.js) 
     skin: "skin_standard", 
     needFallback: true, 
     lang: "en", 
     useCompressedScripts: true, 
     useAsync : true, 
     indicatorOnly: false, 
     resources : { 
      'HTMLPromptingSDK': { isLoaded: false, path: '../Scripts/promptengine-compressed.js' }, 
      'ParameterControllerAndDeps' : {isLoaded: false, path: '../../parameterUIController-compressed.js'} 
     }, 
     logging: { enabled: false, id: 0} 
    }; 

其他我們正在佈局頁面

<script src="@Url.Content("../Scripts/promptengine-compressed.js")" type="text/javascript"></script> 
引用

回答

0

我已經解決了這個問題:

瀏覽器是期待MIM E type爲'crystalreportviewers/promptengine-compressed.js'文件爲 'application/x-javascript,text/javascript'。

但在IIS中,在默認網站/應用程序(應用程序)級別,.js文件的MIME類型爲application/javascript。 一旦我做出改變,我就能看到報告。

謝謝!

https://www.experts-exchange.com/questions/28682818/406-Client-browser-IE10-does-not-accept-the-MIME-type-of-the-requested-page.html

https://www.experts-exchange.com/questions/24977691/MIME-Type-for-Crystal-Reports-IIS-7.html

相關問題