Allow loading of JSON files in Visual Studio Express 2013 for Web

后端 未结 4 1013
醉酒成梦
醉酒成梦 2020-11-30 22:36

I have the problem, that the IIS from Visual Studio Express 2013 for Web doesn\'t allow the loading of *.json files. When trying to load a *.json file I get a 403 Forbidden

4条回答
  •  無奈伤痛
    2020-11-30 22:59

    We may need to distinguish the Visual Studio development environment (with IIS Express) from local IIS and a remote server (like Azure WebSites). To specifically target IIS Express, for example, we edit %USERPROFILE%\Documents\IISExpress\config\applicationhost.config under system.webServer/staticContent:

    
    

    I need to make this distinction because my local (intranet) IIS already has the JSON mime type defined. So when I deploy to Azure websites I use this transformation in Web.Release.config:

    
        
            
        
    
    

提交回复
热议问题