open a network file from an intranet web application - html

I am currently building an intranet applicaiton using asp.net mvc and I am wondering if there is a way to link to a file or folder available on the network.
I tried simply
open folder
But obviously that won't work as it just gives the output: file:///G:/folder/ which doesn't actually open to anywhere. I understand that this is for security and that is fine, i am jsut wondering if there are any workaround or anything in an intranet setup? Would impersonation of any type possibly work? Any other ideas?

You could open that file from the server, and serve it to the client. Your web server will act as a proxy. If the files are accessible to the server, and there are no special permissions for the users, or if you can encode those permissions in roles or business rules, then it's quite easy.

Related

Local images in HTML

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.

Beginner: How do I upload an HTML only site to the web host?

I'm trying to make a simple four page website, all HTML with some CSS and images. This is my first site. After I'm done building the HTML documents, what do I need to upload them and get the site running?
In order to put up a website, you need a web hosting provider. So the first thing you need is a hosting provider. Make sure that your provider offers FTP access to your website. You will need to contact your hosting provider (http://webdesign.about.com/od/webhosting/f/blfaqwebhosting.htm) if you aren't sure.
Once you have a hosting provider, in order to connect by FTP you need some specific information:
your username
password
the host name or URL where you should upload files
your URL or web address (especially if it's different from the host name
You can get this information from your hosting provider if you aren't sure what it is.
Make sure your computer is connected to the internet and that your WiFi is working.
Open an FTP client. As I mentioned above, most computers come with a built-in FTP client, but these tend to be fairly hard to use. It's better to use a visual style editor so you can drag and drop your files from your hard drive to your hosting provider.
Best FTP Clients for Windows
Best FTP Clients for Macintosh
Following the instructions for your client, put in your host name or the URL where you should upload your files.
If you try to connect to your hosting provider, you should be prompted for a username and password. Enter them in.
Switch to the correct directory on your hosting provider.
Select the file or files you want to load onto your website, and drag them to the hosting provider pane in your FTP client.
Visit the website to verify that your files uploaded correctly.
Tips:
Don't forget to transfer images and other multimedia files that are associated with your website, and put them in the correct directories.
It can often be easiest to just select the entire folder and upload all the files and directories at once. Especially if you have fewer than 100 files.
What You Need
FTP client
check this out http://webdesign.about.com/cs/beginninghtml/ht/htupload.htm i hope this could help you

Hosting basic html site on iis

I have a basic web site (just html, js and css files) that I want to host on IIS on my local machine for testing purposes. The site runs fine when I run it directly as a file on my computer. I added a website on IIS, using the directory these files are located in, but when I try to launch it, I get an error page that says:
An error occurred loading a configuration file: Failed to start monitoring changes to '[my site path]' because access is denied.
It then says that the source file is a web.config. I know that ASP.NET sites use a web.config, but I don't even have one, and I just want to run a basic site using html, css, and javascript.
Any ideas on what the fix might be? I made sure I have an application pool for the site.
You likely put it into your user profile -- ie c:\users\skitterm\ -- which won't let the process running IIS read the folder. You are better off using IIS' built in directory structure in c:\inetpub and adding a folder for your site.
As you can tell this is a server misconfiguration. It would help to know the version of your IIS.
You can follow the steps on Microsoft's official knowledgebase to resolve the issue:
http://support.microsoft.com/kb/316721
http://support.microsoft.com/kb/317955 (for IIS v6.0, try Method 3)
I worked in IIS about a year ago and such errors are caused by misconfigured Security settings in IIS.
Sounds like you need to set up the proper access rights for the folder to the account specified by the application pool identity.
First make sure that your folder is not anywhere under your \users\, \program files\, or any other place that already has restricted access. Put it under a folder on the root (\inetpub is a good place).
Then, add the appropriate permissions (usually read only) for the folder to allow the user account specified by the app pool identity to access it. If the app pool identity is set to ApplicationPoolIdentity, adding the IIS_IUSRS local group should do it. Otherwise, use the account that is specified.
This should fix the problem.

Uploading MVC Website and MySQL to Webhost

I created a website using Code Ignitor and MySQL and want to upload everything to 000webhost.com
How do I:
upload my models, views and controllers to the public_html folder of 000webhost?
get my MySQL database up and running on 000webhost?
Thanks in advance
I am presuming that your control panel is cPanel. If thats the case then upload all your files in the web root of the server. Create a database, and change that details in database.php inside config folder. thats it, your site will be up and running.
Your .htaccess (at least mod_rewrite for codeigniter) will not work if you use the free 000webhost service (at least the last time i wanted it, the support told me that they doesn't support it... that was thy time i signed up for their free service for private test of scripts i wrote). Another thing is that for the free hosting they use their own control panel (not cPanel), cPanel is for the paid accounts.
Anyway they both offer ftp accounts, mysql databases and of course web ftp (online file manager). All you need is a ftp client (such as FileZilla or even Windows Explorer itself).

How to launch my web page in a web hosting domain?

Am very to new to web development.
I have the web pages; web pages are developed in html, CSS Style sheet.
For Example
I have the ftp domain or crystal.com for hosting my web page
For hosting my web pages, I have to create setup file for hosting my web page or simply post my html files.
Can any one tell the procedure, what are the things I have to do for the web hosting?
Note: I am not asking about Web hosting domain. Already I have the domain, but how to post my html files in that domain.
Need Help?
Ftp is the best way to publish your files. Use something like filezilla and read the help docs. You will upload the files to a folder (usually something like public_html) and then the files correspond to your domain. Example:
you upload a file:
/public_html/blog/index.htm
then go to your site:
http://www.yourdomain.com/blog/index.htm
Here is a good tutorial on FTP. It's pretty easy once you get the hang of it.
You need to set up your domain provider's DNS server to point to the server where your files are located. For example, I have my domain (brasee.com) through GoDaddy.com, and I host my site locally. So I go to the GoDaddy website and update their DNS server to forward brasee.com requests to my server's IP address.