我有一個現有的網站設置和工作(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中按預期檢索數據。
感謝