我有一个现有的网站设置和工作(kentico 10),我想使用虚拟目录将Web API添加到它。将Web API添加到带有虚拟目录的现有应用程序
我设置了web api项目,它在我将IIS映射为正常站点时起作用。但是,当我将该文件夹映射为虚拟目录并将其转换为我的kentico网站时,出现错误。我不明白的是为什么我收到来自kentico web配置发起,而不是新的Web API的web.config /服务错误:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Web' does not exist in the namespace 'CMS.Base' (are you missing an assembly reference?)
Source Error:
Line 47: <namespaces>
Line 48: <add namespace="CMS.Helpers" />
Line 49: <add namespace="CMS.Base.Web.UI" />
Line 50: </namespaces>
Line 51: </pages>
我也尝试添加这些DLL到Web API项目的bin其中停止了这个错误,但我无法从web-api项目中的kentico中按预期检索数据。
感谢