asp.net mvc - There is no build provider registered for the extension '.jpg' -


when approached jpg image www.demo.net/images/1.jpgon web site, gave me error:

server error in '/' application. there no build provider registered extension '.jpg'. can register 1 in    <compilation><buildproviders> section in machine.config or web.config. 

it asp.net mvc 4 site. worked in localhost failed on hosted server.

so modified

<compilation debug="true" targetframework="4.5">   <buildproviders>     <remove extension=".jpg"/>     <add extension=".jpg" type="system.web.compilation.webhandlerbuildprovider"/>   </buildproviders> </compilation> 

the image not still shown , error became wild.

server error in '/' application. parser error description: error occurred during parsing of resource required service request.        please review following specific parse error details , modify source file appropriately.  parser error message: page must have <%@ webhandler class="mynamespace.myclass" ... %> directive.  source error:   line 1:  ÿØÿàjfifhhÿá line 2:  exifmm*    †Œ1˜2žÿ‡i²ˆ%vêzêappleiphone 3gs4.3.52012:10:27 14:22:05‚šü‚ˆ"ˆ'p0221 ‘’4’<’’        ’ line 3:  d’l’‘00’’00 0100   ¢ÿÿ¤è¤¤¤   source file: /images/1.jpg    line: 1  version information: microsoft .net framework version:4.0.30319; asp.net version:4.0.30319.18045  

there's wrong handler mappings in iis. it's trying run jpg if aspx page, has no build provider file type of jpg. that's fine. shouldn't because jpgs aren't supposed built. adding build provider served freak hell out of compiler. iis should treat jpg is, static file, , serve up. need determine why isn't doing that.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -