首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在给定url时加载default.asp和default.aspx

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

Stack Overflow用户
提问于 2013-06-25 21:14:11
回答 2查看 1K关注 0票数 0

我们在Server2003上使用IIS6。我们有几个使用经典ASP的网站。现在我们有一个使用ASP.NET的网站,这个asp.net网站和经典的asp网站在同一台服务器上。

直到最近,我们的用户都有他们的书签(我们有很多用户都有书签)

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

在利用IIS6在服务器2003上创建该ASP.NET ("http://www.myNet.com/weatherNet")网站之后,

用户转到(典型的asp) http://www.myasp.com/weather,他们得到错误消息:

代码语言:javascript
复制
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被允许。

EN

回答 2

Stack Overflow用户

发布于 2013-06-25 21:29:20

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

遵循guide here

详情如下:

设置或更改默认的document

  1. 在IIS管理器中,双击本地计算机,右键单击网站文件夹或单个网站文件夹,然后单击Properties.
  2. Click documents选项卡。client
  3. 选中Enable default content
  4. 复选框。
  5. 单击Add将新的默认文档添加到列表中。
  6. 单击要从列表中删除的文档,单击从列表中删除文档,然后单击Move Up或Move down以更改向client requests.
  7. Click OK提供默认文档的顺序。

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

票数 0
EN

Stack Overflow用户

发布于 2013-06-27 22:26:41

看起来你的"default.aspx“页面比"default.asp”页面更受欢迎。在IIS的默认文档选项卡中,删除所有文档名称,只添加"default.asp“。重新启动IIS,然后重试。

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17298368

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档