Link to document on LAN from web page - html

I need to link to a file on a Windows file share from a web page.
I have tried using this path:
//B-1152151154/shared/file.txt
...but it says permission denied.
Is it possible to do so, same like accessing a local drive file (C:/shared/file.txt)

Related

Image not showing in browser on local server (Live server extension) but shows when opened from explorer

I am having problem in HTML . My Image is not showing in browser (Firefox) when html file is opened through live server extension (VS code).It throws a Security error that html file can't link to image. I want to use image as background.
My html file is folder in D: drive.
Path = D:/myhtml/index.html
And my image is in F: drive
Path = F:/mountain.png
my img tag is
<img src="f:/mountain.png" alt="mountain"/>
But when I open html file directly from file explorer image shows up.
Please help to solve this problem.
Live server in made to behave like a real web server (one that is online on the web, called via http(s), and does not have access to your local hard drive file system "the Windows way" with F: etc.
Going to F:// is only possible on your own machine and will never work online. Browsers have built in a way for you to browse your local files like that. Web servers don't have this feature.
Use HTML file paths, meant for the web server:
Absolute path: https://example.com/images/mountain.png (path to an online destination which could be another domain than yours)
Relative path: images/mountain.png (relative to where your html file is located on your own web server)
Relative path to a folder outside of where your html is located: ../../etc/images/mountain.png

google drive hosting after browser got 404 error

I have create a new website using bootstrap.
I want to host it in googledrive.
I have upload my project folder in googledrive. then share option change to public. i have copy to the folder id
now browser ip googledrive.com/host/folder_id/index.html
But browser was showing
404 error
The requested URL /host/0B8EDhQEMaanYcnF2T2JEUGRQdWc was not found on this server.
Please some one help me how to host it on googledrive.

IIS not loading css file outside of website folder

I have an ASP 4.0 web site being served by IIS 8 that is in a folder outside of wwwroot. The site will load, but a css file that I am using is not being loaded (getting a 404 error).
Here's the folder path for the site:
C:/Sites/Test/"website I am using"
And the folder path for the css file:
C:/Sites/Test/sharedfiles/css/stylesheet.css
Here's the link I am using to connect to the css file (with spaces to get this to post)
< link href="~/../sharedfiles/css/stylesheet.css" rel="stylesheet" type="text/css" / >
This should load the css file, but it does not. I'd like to figure out how to get this working.
The Sites folder is shared for IIS_IUSRS and IUSR and permissions are passed down to the folders below, including the Test/sharedfiles/css folder.
The web site folder is what's selected by IIS for the website. I have Anonymous Authentication enabled for Application Pool identity and Static File serving is enabled.
I'd appreciate any other ideas on how to figure out the problem!
Make sharedfiles a virtual directory and establish a web site or a web application there and access your resources (css etc.) using a url. So in local host you would have http://localhost/sharedfiles/yourcss.css
Thats the correct way to do it - what you are trying to implement here is your own CDN.

Cannot Access Web Page on Apache 2.2 Server

I've made a simple web page for one of my classes, and uploaded it to an Apache server on campus, from which I'm to view and take a screenshot of.
Before trying to view the page I created a sub-directory on the server to put my HTML file. Once the upload was complete, I changed the permissions on the file to -rwx---r-x and on the sub-directory folder to drwx---r-x.
However, I'm not able to view the page. I keep getting a message saying 403: Forbidden. You do not have sufficient privileges to view this site on this server.
Is there anything else that I need to do to the file and/or folder to be able to view the web page?
Who is the owner and the group of the file?
You probably need to change the file permissions to -rwxr--r-- and directory to drwxr-xr-x

HTML 5 GeoLocation in Google Chrome

I am using HTML 5 Geolocations API's for tracking location however I am getting the following error on the Geolocation icon in Chrome Browser
"This Page has been blocked from tracking your Location"
I went to the Preferences and Setting's Page but did not find any help.
In my case the problem was that I opened the HTML file from the file system (file:///...). Browsers generally try to prevent accessing personal information (which includes location) from local files, so you have to serve the file through a web server (even if it is local).
One simple way to serve a static website located in your filesystem is SimpleHTTPServer if you have Python installed. Just navigate to the folder using the command prompt, and say python -m SimpleHTTPServer, and then you can view the file on localhost:8000.
Even I was facing the same problem. One of the solution is to open to file in another browser, I tried in Firefox and it worked fine. Another solution is to open the file through your WAMP server (Local host).
There is a good article here about Geolocation API. You have to go to chrome://settings/content and there, you can find Location information. You should be able to find the exceptions and manage them there.