在IIS上托管基本HTML站点 [英] Hosting basic html site on iis

查看:93
本文介绍了在IIS上托管基本HTML站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本的网站(只是html,js和css文件),我想将其托管在本地计算机上的IIS上以进行测试.当我直接将其作为文件在计算机上运行时,该站点运行良好.我在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.

然后说该源文件是一个web.config.我知道ASP.NET网站使用的是web.config,但我什至没有,而我只想使用html,css和javascript运行一个基本网站.

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.

推荐答案

您可能会将其放入用户配置文件中,即c:\ users \ skitterm \,这将不允许运行IIS的进程读取该文件夹.最好使用c:\​​ inetpub中的IIS内置目录结构并为您的站点添加文件夹.

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.

这篇关于在IIS上托管基本HTML站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆