On IIS newly published website, web site can open, but the style with JS resource file is not loaded (resource file and webpage is the same domain name, for example: webpage www.xxx.com/index.aspx, picture www.xxx.com/pic.png).
Then open the resource file separately (for example, the link to open the picture) is, error:
This issue should be a setup issue for the Web. config configuration file.
In the
"*"Path="*.gif"Type="System.Web.DefaultHttpHandler"/> <add verb="*"Path="*.jpg"Type="System.Web.DefaultHttpHandler"/> <add verb="*"Path="*.png"Type="System.Web.DefaultHttpHandler"/> <add verb="*"Path="*.ico"Type="System.Web.DefaultHttpHandler"/> <add verb="*"Path="*.css"Type="System.Web.DefaultHttpHandler"/> <add verb="*"Path="*.js"Type="System.Web.DefaultHttpHandler"/> The corresponding type value should be changed to "System.Web.StaticFileHandler" value, as follows:
"*"Path="*.gif"Type="System.Web.StaticFileHandler"/> <add verb="*"Path="*.jpg"Type="System.Web.StaticFileHandler"/> <add verb="*"Path="*.png"Type="System.Web.StaticFileHandler"/> <add verb="*"Path="*.ico"Type="System.Web.StaticFileHandler"/> <add verb="*"Path="*.css"Type="System.Web.StaticFileHandler"/> <add verb="*"Path="*.js"Type="System.Web.StaticFileHandler"/> The path to accessing the resource file at this time should be OK.
Newly published Web sites on IIS, styles and JS resource files cannot be loaded (resource files and Web pages under the same domain name)