将 ASP 从根目录迁移到子目录

发布于 2024-11-30 10:26:15 字数 388 浏览 1 评论 0原文

我正在将现有 ASP 网站转换为 PHP,同时保留 ASP 网站作为旧版本。由于我不是 ASP 开发人员,我认为将根目录的内容移动到我标记为 v1.0 的自己的目录中很简单,以便可以通过访问 www.mysite 查看 ASP 版本.com/v1.0,而新的PHP版本(v2.0)可以通过www.mysite.com查看,

问题就在这里。这样做会导致标记各种错误(所有错误都与“'/'应用程序中的服务器错误。运行时错误”相关)。我能想到的最好的办法是,需要在 v2.0 目录中调整 web.config 文件。你们中的 ASP 专家能否推荐一个简单的解决方案来实现这一目标?如果可能的话,我希望有一个空的根目录,因为新的 v2.0 版本将包含在所有 PHP 中,并且希望尽可能将 ASP 版本“包含”在 v1.0 目录中。

谢谢!

I'm in the process of converting an existing ASP website into PHP while retaining the ASP website as an older version. Since I'm not an ASP developer, I thought it would be simple as moving the contents of the root directory into its own directory that I've labeled as v1.0 so that the ASP version can be viewed by going to www.mysite.com/v1.0 while the new PHP version (v2.0) can be viewed by going to www.mysite.com

Herein lies the problem. Doing this causes flags all kinds of errors (all related to "Server Error in '/' Application. Runtime errors"). The best I can figure out is that the web.config file needs to be tweaked in the v2.0 directory. Can any of you ASP experts recommend a simple solution to make this happen? I would like to have an empty root directory if possible since the new v2.0 version will be in all PHP and want to "self contain" the ASP version within the v1.0 directory as much as possible.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

赠我空喜 2024-12-07 10:26:15

经过一番争论,终于弄清楚我需要在 IIS 控制面板下将 v1.0 设置为自己的应用程序。完成后,根目录的所有内容都可以移动到 v1.0 子目录并通过 www.mysite.com/v1.0 查看 - 感谢 肖恩!感谢他的帮助!

After a bit of wrangling, finally figured out that I needed to set up v1.0 as its own application under the IIS control panel. Once that was done, then all the contents of the root directory could be moved over to the v1.0 sub-directory and viewed via www.mysite.com/v1.0 -- thanks to Sean! for his help!

画骨成沙 2024-12-07 10:26:15

如果站点使用 SSI,则大多数经典 ASP 页面都使用服务器端包含,例如:

,那么您需要将所有这些更改为

我假设您使用的是 IIS 7 或 IIS 7.5,因为您没有看到实际的错误,所以您需要修改 web.config 文件。

<configuration>
    <system.webServer>
        <asp scriptErrorSentToBrowser="true" />
        <httpErrors errorMode="Detailed">
    </system.webServer>
</configuration>

参考:

http://learn.iis.net/page.aspx/564/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default/

更新
由于现在听起来您正在使用 ASP.NET,因此您需要如下更改 web.config 才能查看完整错误:

<configuration>
    <system.web>
        <customErrors mode="Off" />
    </system.web>
</configuration>

Most Classic ASP pages use Server Side Includes, if the site is using a SSI such as:
<!-- #include virtual = "include-file.inc" -->
, then you will need to change all of these to be
<!-- #include virtual = "v1.0/include-file.inc" -->.

I assume that you are using IIS 7 or IIS 7.5, since you are not seeing the actual error, you will need to modify your web.config file.

<configuration>
    <system.webServer>
        <asp scriptErrorSentToBrowser="true" />
        <httpErrors errorMode="Detailed">
    </system.webServer>
</configuration>

Reference:

http://learn.iis.net/page.aspx/564/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default/

Update
Since it now sounds like you are using ASP.NET, you would need to change your web.config as below to see the full error:

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