문제

I'm using some custom opentype fonts in my Orchard CMS project. So I've added custom static content extensions for otf types:

 <staticContent>
    <mimeMap fileExtension=".otf" mimeType="font/opentype" />
  </staticContent>

And everything was ok, until I've tried to deploy everything on hosting. I've tried two different hosting smarterasp.com and parking.ru. Both website were returning an internal error. After some experiments I've found that problem appeared when hosting's server has it's own app.config which already had some MIME type bindings, and they were inherited by my web app. So I had manually remove everything I've added to web.config file. Should this Mime types be declared on global app.config on my developer machine? Why web app's local web.config was in conflict state with remote server's one? What is best practice for avoiding such errors?

도움이 되었습니까?

해결책

You can just remove the offending global app.config mime-type in your web.config like so:

 <remove fileExtension=".otf" />
 <mimeMap fileExtension=".otf" mimeType="font/opentype" />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top