【发布时间】:2012-02-07 21:42:12
【问题描述】:
最近,我一直在研究的解决方案遇到了很多麻烦,所以我决定从头开始重做。基本上,它是一个 ASP.NET 应用程序和一个 Web 服务。我把一切都带到了它应该工作的地方。它已部署到 IIS,当我尝试调试时,我得到:“无法在 Web 服务器上开始调试。Web 服务器配置不正确。”
所以我尝试在不调试的情况下运行,我得到了这个错误:
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify yourconfiguration file appropriately.
Parser Error Message: Could not load file or assembly 'BrowserInfoApp'
or one of its dependencies. This assembly is built by a runtime newer
than the currently loaded runtime and cannot be loaded.
Source Error:
Line 57: <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 58: <add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 59: <add assembly="*" />
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config Line: 59
不确定这条线做了什么,我试着把它注释掉。它仍然不允许我在服务器上调试,这是没有再次调试运行的结果:
Parser Error
Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Could not load type 'BrowserInfoApp.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="BrowserInfoApp.Global" Language="C#" %>
Source File: /global.asax Line: 1
这很奇怪,BrowserInfoApp 是完全不相关的。这是我为测试而制作的东西,但我现在使用的解决方案从未引用过它或与之相关。我在一小时前开始使用我现在正在使用的新解决方案,所以它不是一个被遗忘的参考或类似的东西。
我在带有 IIS 5.1 的 Windows XP 上运行一切。
到目前为止,我已经尝试从 IIS 中删除 BrowserInfoApp 虚拟目录。如果需要,我会尝试删除整个应用程序,但我觉得好像没有必要。
我真的不知道该去哪里。如果我可以提供更多信息,请告诉我,我很乐意这样做。
编辑:我尝试删除所有 BrowserInfoApp 并得到同样的错误。
【问题讨论】:
-
当你创建虚拟目录时,你确定你的应用程序在哪个应用程序池下运行。
-
据我所知,IIS 5.1 中不存在应用程序池,但我不太清楚您在问什么。你能详细说明一下吗?
-
有一个程序集的引用,该程序集构建为比您的应用程序使用的框架更晚的框架。对于前。您的应用程序在 .NET1.1 下运行,并且您有一个使用 .NET 2.0 构建的程序集引用。可以从上面的这条消息中得到它“这个程序集是由比当前加载的运行时更新的运行时构建的,并且无法加载。”
-
为什么无缘无故投反对票?
标签: c# asp.net visual-studio web-services iis