无法读取 ASP 本地主机,以及虚拟目录的问题

发布于 2024-10-05 02:50:18 字数 1267 浏览 0 评论 0原文

当在我的个人计算机上访问 http://localhost/ 时,我看到一个空白屏幕。

我有一个位于 C:/inetpub/wwwroot/ 的网站,但该文件夹的内容未按应有的方式列出。

我尝试直接访问该网站,但出现以下错误: alt text

第 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 中删除该行似乎没有帮助。错误仍然存​​在,甚至声称该行未被删除。我确保保存了我的编辑。

然后我尝试创建一个虚拟目录并转到那里。出现了完全相同的错误。 我添加了具有所需权限的正确用户,但这似乎没有做任何事情。 alt text

所以这里有两个问题:本地主机不会列出文件夹,并且我不断收到此错误。

谁能告诉我我可能做错了什么?

编辑:添加代码

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:
alt text

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.
alt text

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小嗷兮 2024-10-12 02:50:18

关于空白本地主机,

您是否在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文