无法读取 ASP 本地主机,以及虚拟目录的问题
当在我的个人计算机上访问 http://localhost/ 时,我看到一个空白屏幕。
我有一个位于 C:/inetpub/wwwroot/
的网站,但该文件夹的内容未按应有的方式列出。
我尝试直接访问该网站,但出现以下错误:
第 16 行是错误
15: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
16: <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
17: <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
从 Web.config 中删除该行似乎没有帮助。错误仍然存在,甚至声称该行未被删除。我确保保存了我的编辑。
然后我尝试创建一个虚拟目录并转到那里。出现了完全相同的错误。 我添加了具有所需权限的正确用户,但这似乎没有做任何事情。
所以这里有两个问题:本地主机不会列出文件夹,并且我不断收到此错误。
谁能告诉我我可能做错了什么?
编辑:添加代码
When going to http://localhost/ on my personal machine, I get a blank screen.
I have a site at C:/inetpub/wwwroot/
but the contents of that folder aren't listed like they should be.
I tried going directly for the site, and I got this error:
Line 16 is the error
15: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
16: <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
17: <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
Removing the line from the Web.config doesn't seem to help. The error persists and even claims the line wasn't removed. I made sure I saved my edit.
I then tried making a Virtual Directory and going there. The exact same error showed up.
I added the proper user with the needed rights, but that didn't seem to do anything.
So there are 2 problems here: Localhost won't list folders and this error I keep getting.
Can anyone tell me what I might be doing wrong?
EDIT: code added
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于空白本地主机,
您是否在 wwwroot 文件夹中放置了默认页面?
关于第16行错误,
网站名称中是否有空格?
你能发送整个 web.config 吗
regarding the blank localhost
did you put a default page in the wwwroot folder ?
regarding the line 16 error
is there a space in the website name?
can you send the whole web.config