When I access my aspx page in chrome or safari it shows this error in console
Not allowed to load local resource: file:///D:/CSS/Style.css
Everything works fine in IE and FF.
I use an external CSS which is linked in aspx page via
<link rel="stylesheet" media="all" href="file:///D:/CSS/Style.css" type="text/css" />
I have tried all the combination of "/" & "\" slashes..
Whether I am giving file path in wrong manner or its any security exception in these browsers(I am logged in as administrator)... What am I doing wrong?
Accessing Chrome Whenever you want to open Chrome, just double-click the icon. You can also access it from the Start menu or pin it to the taskbar. If you are using a Mac, you can open Chrome from Launchpad. You can also drag Chrome to the Dock for fast access.
Google Chrome browser is an open source program for accessing the World Wide Web and running Web-based applications. The Google Chrome Web browser is based on the open source Chromium project.
Make sure you have the latest version of Chrome. Learn how to update Chrome. If you're using a work or school computer, your administrator might not let you install items from the Chrome Web Store. For more help, contact your administrator.
Chromium is an open-source and free web browser that is managed by the Chromium Project. In comparison, Google Chrome is a proprietary browser developed and managed by Google. Unlike Chromium, Google Chrome offers built-in support for media codecs like MP3, H. 264, and AAC, as well as Adobe Flash.
You wont be able to access a local resource from your aspx page (web server). Have you tried a relative path from your aspx page to your css file like so...
<link rel="stylesheet" media="all" href="/CSS/Style.css" type="text/css" />
The above assumes that you have a folder called CSS
in the root of your website like this:
http://www.website.com/CSS/Style.css
It is today possible to configure Safari to access local files.
- By default Safari doesn't allow access to local files.
- To enable this option: First you need to enable the develop menu.
- Click on the Develop menu Select Disable Local File Restrictions.
Source: http://ccm.net/faq/36342-safari-how-to-enable-local-file-access
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With