WCF服务的ASP MVC项目(NopCommerce) [英] WCF Services in ASP MVC PRoject (NopCommerce)
问题描述
我想一个WCF服务添加到NopCommerce的管理文件夹。
我也做了同样的事情在网络文件夹,每一件事情进展顺利,但对于管理员文件夹时,我尝试执行
我有这个错误:
I am trying to add a WCF Service to the Admin Folder of NopCommerce . I have done the same thing for the web folder and every thing goes Well, but for Admin folder when I try to execute I have this Error :
这是使用注册为allowDefinition =应用程序级别之外'MachineToApplication'的节是错误的。这个错误可以通过未被配置为在IIS中应用程序的虚拟目录引起的。
在此处的XML文件问题:其中, serviceHostingEnvironment multipleSiteBindingsEnabled =真>
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. In the XML File here is the problem :< serviceHostingEnvironment multipleSiteBindingsEnabled="true">
我尝试了好几种解决方案,但没有任何工程。
在此先感谢
I have tried several solutions but nothing works. Thanks in advance
推荐答案
我只是碰到了这个在我们的MVC项目之一,这是由于具有 MvcBuildViews
物业在项目文件设置为真正
。该属性设置为假
解决了这一问题。
I just ran into this in one of our MVC projects, and it was due to having the MvcBuildViews
property in the project file set to true
. Setting the property to false
fixed the problem.
<MvcBuildViews>false</MvcBuildViews>
编辑:我也注意到其中概述了不需要转向替代这个答案下车查看建筑物。
I also noticed this answer which outlines an alternative that does not require turning off view building.
这篇关于WCF服务的ASP MVC项目(NopCommerce)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!