如何在IIS 5.1上发布ASP.NET 3.5?

时间:2011-05-20 10:57:36

标签: .net asp.net asp.net-3.5 publishing iis-5

我正在使用visual studio 2008进行锉刀.net 3.5 web开发。我发布了该网站,并在Windows XP内置的IIS 5.1中添加了虚拟目录。

当我运行页面时,会显示以下错误。

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. 

A name was started with an invalid character. Error processing resource 'http://localhost/cdt/Dashboard.aspx'. Line 1, Pos...

<%@ page language="C#" MasterPageFile="~/MasterPage.master" autoeventwireup="true" inherits="_Default, App_Web_zy4yhpyn" ...

我还需要安装其他任何东西吗?

为什么会这样?

解决方案是什么?

更新:选择.net 2.0版本。 (在IIS 5.1中没有诸如3.5之类的选项)(我应该安装更高版本吗?)

再次跑它,现在得到这个错误: Failed to access IIS metabase. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

编辑: 好。我发现了错误。

在http://csharpdotnetfreak.blogspot.com/2009/02/failed-to-access-iis-metabase.html重新安装ASP解决了这个问题

太棒了!

1 个答案:

答案 0 :(得分:1)

由于某种原因,aspx文件未正确呈现。尝试再次使用ASP.NET IIS注册工具(Aspnet_regiis.exe u-uninstall,i-install)注册asp.net。另请检查IIS中的asp.net版本。