在给定url时加载default.asp和default.aspx



我们在服务器2003上使用IIS6。我们有几个网站使用经典的ASP。现在我们有一个使用ASP.NET的网站。这个asp.net网站与经典的asp网站位于同一服务器上。

直到最近,我们的用户都有自己的书签(我们有很多用户有书签)作为

http://www.myasp.com/weather和http://www.myasp.com/weather/default.asp将加载。

创建此ASP.NET("http://www.myNet.com/weatherNet")服务器上的网站2003与IIS6,

用户转到(经典asp)http://www.myasp.com/weather他们收到错误消息:

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>

当用户键入或书签"http://www.myasp.com/weather",如何制作经典asp"http://www.myasp.com/weather/default.asp"加载"

还有我该如何制作"http://www.myNet.com/weatherNet"加载(ASP.NET)"http://www.myNet.com/weatherNet/default.aspx"?

我检查了IIS,ASP已被允许,并且允许使用ASP.Net v4.0.30319。

您需要在IIS上为该网站/虚拟目录设置默认的.asp(x)页面。

按照这里的指南

详细信息如下:

设置或更改默认文档

  1. 在IIS管理器中,双击本地计算机,右键单击"网站"文件夹或单个网站文件夹,然后单击属性
  2. 单击"文档"选项卡。

  3. 选中启用默认内容页复选框。

  4. 单击"添加"将新的默认文档添加到列表中。

  5. 单击要从列表中删除的文档,然后单击"删除"。

  6. 单击列表中的某个文档,然后单击"上移"或"下移"以更改向客户端提供默认文档的顺序请求。

  7. 单击"确定"。

因此,添加您默认的.asp(x)页面作为默认文档,您就可以了。

看起来您的"default.aspx"页面比"default.asp"页面更受青睐。在IIS的默认文档选项卡中,删除所有文档名称,只添加"default.asp"。重新启动IIS并尝试。

这些设置也可以在IIS中的文件夹/应用程序级别进行。你只需要对每个文件夹重复这个过程,就可以将"default.asp"或"default.aspx"设置为默认文档。

相关内容

最新更新