我在我的 web.config 中收到“指定的错误模块”红色波浪线,用于以下几行:
<add path="*" name="ServiceStack.Factory" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack, Version=3.9.38.0, Culture=neutral, PublicKeyToken=null" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" />
<add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack, Version=3.9.38.0, Culture=neutral, PublicKeyToken=null" verb="*"/>
仅供参考,我确保没有按照类似帖子的建议选择 .NET 框架 3.5 版的客户端配置文件。
当我选择 Resharper 提供的“修复模块资格”时,我的 web.config 中仍然出现错误指示。
我正在关注 ServiceStack 网站中提供的示例应用程序。我安装了 ServiceStack 的最新稳定版本,这是我的 package.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ServiceStack" version="3.9.38" targetFramework="net35" />
<package id="ServiceStack.Common" version="3.9.38" targetFramework="net35" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.39" targetFramework="net35" />
<package id="ServiceStack.Redis" version="3.9.38" targetFramework="net35" />
<package id="ServiceStack.Text" version="3.9.38" targetFramework="net35" />
</packages>
当我运行该应用程序时,我收到了这条友好的消息:
配置错误
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 your configuration file appropriately.
Parser Error Message: Could not load type 'ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory' from assembly 'ServiceStack, Version=3.9.38.0, Culture=neutral, PublicKeyToken=null'.