1
我有一個ASP.Net MVC 4項目。如果我想TinyMCE的使用gzip的我需要使用以下在我的網頁(例如):TinyMCE ashx從IIS7中獲取404錯誤
<script type="text/javascript" src="/Scripts/tiny_mce/tiny_mce_gzip.js"></script>
<script type="text/javascript">
tinyMCE_GZ.init({
plugins: 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
themes: 'simple,advanced',
languages: 'en',
disk_cache: true,
debug: false
});
</script>
我注意到這部作品在使用開發Web服務器測試偉大的,但在展開時IIS7它沒有。進一步的調查顯示就這一請求的404(找不到文件):
/Scripts/tiny_mce/tiny_mce_gzip.ashx?js=true&diskcache=true&core=true&suffix=&themes=simple%2Cadvanced&plugins=style%2Clayer...
的ashx的文件不存在相應的文件夾,但IIS不會成爲它的一些原因。我嘗試添加以下路由處理程序,但沒有什麼不同:
routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
routes.IgnoreRoute("{*allashx}", new { allashx = @".*\.ashx(/.*)?" });