I have an HTML document with a hyperlink to a Visio version of the HTML.
I have been able to successfully access the Visio version, however, now when I click on the hyperlink to access the Visio I am getting an error:
Windows can't find 'file:///C:/DDL_14.1.1/DDL/HTML/filename.vsd"
Where are these 3 forward slashes prior to the file address coming from? The address link saved in the hyperlink address does not have the 3 forward slashes.
Possible cause: Your web server may not be running. The prefix "file:///" means your browser is trying to access a local file or is assuming so. Have IIS running, and put the file in the folder equivalent of wwwroot or in a virtual directory. Look at the original address of the hyperlink and see whether it points to another web server on the network or on the internet. After you place the file in the wwwroot, in IIS itself you could say 'Browse' and the IIS will serve it with an address that looks like 'localhost' or a local network ip address and port.
Related
I'm an high school student and I'm working on something for fun. I've linked a local file stored on my computer to my webpage. What can I do to make it possible for other devices to access the local html file? (meme1.html)
<div id="button">
<a href="C:\Users\Desktop\MEME GENERATOR\meme1.html">
<img src="https://openclipart.org/image/2400px/svg_to_png/140365/1306313012.png" alt="Click here!" height="20%" width="20%"></a>
</div>
<div id="wrapper">
<h1><span class="tight-2">Happy Birthday!</h1>
<h2>Go ahead, press the button to generate memes!<span class="tm">™</span>.</h2>
</div>
Basically, when you host the site online you have to change the linked file path to the one of the server instead of your local machine.
Edit: If youre using plain HTML my answer stands, if you use a backend platform like Django, Flask or dotNet Core then the urls are dynamicly stated in your webapp.
By default, the local file is only available to the system it resides on. For instance this link you've created:
<a href="C:\Users\Desktop\MEME GENERATOR\meme1.html">
is telling the browser to look in the C: drive of the machine it's currently installed on. Every other system in your network (and the world, for that matter) will likely not be to pull that file because MEME GENERATOR isn't a folder on their system, so they will see a 404 (file not found) error.
That said, you can load links within your network by using network addresses. This will be the machine's network IP address, typically starting with 192.168.
That said, in order to load the file, the machine that it is running on will need to have a port open for the client machine's browser to connect to. This is typically port 80, unless SSL is in use, in which case it's typically port 8080, for HTTP traffic.
In doing so, the computer that is serving up the files becomes, logically, a 'server'. And this is the core of the client (user) to server relationship that the whole of the internet and networking is built upon.
Since you're on Windows, you can use something like XAMPP or WAMP to run a server locally that will have Apache installed, which can serve files through these ports. You're going to need to read up on these technologies a lot to get a file going, and be forewarned that this will open your system to hacking and the like.
EDIT: rereading your question, you are maybe trying to get this file to load on your website? If this is the case, then you need to upload the file to your website, and then it will have a folder structure similar to a local Windows file. [YOUR.DOMAIN.COM]/[whatever folder you create on your server in the public directory]/meme1.html
Do you mean? That you want other people to access your website?
Few ways to do that.
One thing you could do is to send the whole directory to the individual to who you want to send the webpage to.
Or the other way is what you can do is host the webpage on a hosting website. There are a lot of hosting websites that would host your websites for free.
That way anyone with a given URL can access the website.
I added new site in IIS
When I'm trying open site in browser it is showing DNS error
trying to resolve it since 5 days but I'm unable to solve this issue. please help
I'm using windows 10 OS
It's because the host name is not recognized by the DNS server that your browser is querying looking for the IP address. You can get around this by editing your hosts file at c:\windows\system32\drivers\etc\hosts (there is no file extension on this file). Here's a link explaining how to edit this file: http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
Once you get into your hosts file, add an entry for your local website like so:
127.0.0.1 admin.vdeliver-local
Save the file, then clear your browser's cache and then you should be able to visit the site.
Say I have this HTML page , I want when some one on my local network type my(ip) or my computer Name in a browser to view that HTML page
You just have to edit the httpd configuration file and ensure that the default port is set to 80, as by default it should use that anyhow, 8080 is the alternate one.
If you use a local network then the rest of the users in it should be able to reach the website on http://your-computer-name, otherwise if for any other reasons that's not configured then they'll have to use the IP address.
They can also edit their local hosts file (in Windows for eg.) and have something like:
your.IP any-name
any-name being either your computer name or website name, as it will be a direct maping
My question is I know that a server application can access the data stored at server but cannot access teh data stored at client machine as this is a security issue and Browsers not allow this. But in case of localHost (when my local pc is acting as a server) I should be able to access the files from my PC(the local PC on which the application is running). But that is not happening.
Why i m not able to access a simple image file form my local C:\ drive by localhost. The URL i used was file:///c:/image.png but if i store this image any where under home directory of tomcat i m able to access it. WHY ??
I m using it as <'img src="file:///c:/image.png>
Thanks for any considerations..
The problem is with this part:
The URL i used was file:///c:/image.png but if i store this image any
where under home directory of tomcat i m able to access it.
If you want to access the file through Tomcat after placing it in Tomcat's document-root, then the URL to use (assuming you haven't changed the default port setting) is:
http://localhost:8080/image.png
Content hosted by the web-server needs to be accessed through the web-server. A file:// URL bypasses any sort of server, and basically directs the browser to look directly in the local filesystem. So it should also work if you were to do:
file:///C:/path/to/tomcat/home/image.png
But in that case you are not going through Tomcat. You're just pointing the browser at the tomcat folder in your local filesystem.
Edit: I don't think many browsers will not allow file:// urls in tags in hosted documents. Doing so could cause the appearance of a security hole, as if you could guess the name of an image file on someone's local filesystem you could then post a webpage that made it appear as if your server had somehow grabbed their personal image file.
I have a web page that is hosted in our local network. On my page I have a link to a document. The document is linked to a network share. If the user opens the file, edits it and then goes to save the file it overwrites what is on the share. When opening the file I want the user to download the file, so when they come to save it they do not have the option to save it back. How could I go about doing this?
Server side I have access to asp.
You need to create a link which when clicked, streams the contents of the file to the browser, rather than having a link to the files actual location. If you do this the user will be prompted to save the file somewhere locally.
I am not at my PC currently so cannot get you an example piece of code, but you need to send the response with the content type set appropriately. Look in to mime types for a pointer in the right direction.
The term "download" is misunderstood here. When we open windows explorer and copy a file from a network share to our local machine don't think it terms of "downloading" it, we are just copying it. To "download" usually refers to access some resource outside of our local network and pulling that resource into that network.
Hence to achieve your aim you need to convince the client that is not accessing a file that is a local network resource. You can do this by adding a Virtual Folder to the IIS site that points the appropriate folder in the network share. Change the URL to use a "http:" protocal pointing at the virtual folder in your site.
Now the users will get the file from your website rather than accessing it as a normal file on the network.
You can stream the file through a webpage to download the file instead of opening a network share.
See this for an example:
http://support.microsoft.com/kb/276488
You can also share a directory through your web server by enabling directory browsing.
IIS 6: http://blog.crowe.co.nz/archive/2006/03/18/603.aspx
IIS 7: http://technet.microsoft.com/en-us/library/cc731109(WS.10).aspx