abhi619
on Sep 01, 2017 01:32 AM
2795 Views
Problem:
I have a website which I am trying to host locally on Window 10 where CSS and JS not working and it is throwing 500: internal server error to load css and js files.
I have tried it on another server with different IIS version and it is working fine without any issue. but not working for IIS 10.
Solution I tried:
>> I have already tried setting Static Content in IIS config
>> I have tried permission set on files.
but nothing is working.
Please help
Download FREE API for Word, Excel and PDF in ASP.Net:
Download
Andrea
on Sep 01, 2017 01:32 AM
1
Thanks for your reply Andrea,
I am getting following message
HTTP Error 500.19 - Internal Server Error
The requested page can not be accessed because the related configuration data for the page is invalid.
Detailed error information:
Module : Custom Error Module
Message : Send Response
Handler : StaticFile
error code : 0x800700b7
Configuration : You can not duplicate mimeMap collection item with unique key attribute 'fileExtension' set to '.ogg'
configuration : \\? \ web.config
Requested URL : http://SiteURL/Styles/Site2.css
Physical path : C: \ \ Styles \ Site2.css
login Method : Anonymous
Logged in user : Anonymous
Configuration Source:
6: <staticContent>
7: <mimeMap fileExtension = ".ogg" mimeType = "audio / ogg" />
8: </ staticContent>
More information:
This error occurs when you are reading the configuration file for the web server or web application. The event log may contain more information about the cause of the error.
AnandM
on Sep 01, 2017 01:41 AM
3
Hi abhi619,
Add below code in your web.config file
<system.webServer>
<staticContent>
<remove fileExtension=".ogg" />
<mimeMap fileExtension = ".ogg" mimeType = "audio / ogg" />
</staticContent>
</system.webServer>