将 WCF Web 服务添加到 DotNetNuke 站点..最简单的方法?
我应该使用什么样的项目?我尝试了 WCF 网站,然后将目录复制到我的 DNN 站点中,并尝试转到 .svc 文件,但没有成功。 DNN 6 只能用于 3.5 吗?我应该在 iis 中将其作为集成版和 4.0 运行吗?
如果要针对 4.0 或更高版本的 .NET Framework 进行编译,则提供程序选项中“compilerVersion”属性的值必须为“v4.0”或更高版本。要针对 .NET Framework 3.5 版或更早版本编译此 Web 应用程序,请从 Web.config 文件的元素中删除“targetFramework”属性。
What kind of project should I use ? I tried a WCF web site and then copied the directory into my DNN site and tried to goto the .svc file without success. Is DNN 6 for 3.5 only? Should I be running it as integrate and 4.0 in iis ?
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the element of the Web.config file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DNN 从 DNN 5.4(或附近)开始支持 .NET 4,并支持 IIS 中的集成模式(从早期的 DNN 5.x 开始)。
听起来您可能复制了 DNN web.config,但它不起作用(其中有很多东西需要 DNN 才能正常工作)。或者,也许您将 WCF web.config 复制到 DNN 站点的子目录中?如果是这样,您可能只想将这些 web.config 设置与主配置合并。
我在让 WCF 在 DNN 中工作时遇到的主要问题是确保 WCF 与 IIS 一起安装(以便它正确处理 .svc 扩展名)。
DNN has supported .NET 4 since DNN 5.4 (or thereabouts) and supports integrated mode in IIS (since early DNN 5.x).
It sounds like maybe you copied over the DNN web.config, which isn't going to work (there a lot of stuff in there that DNN needs to work correctly). Or, maybe you copied the WCF web.config into a subdirectory of the DNN site? If so, you probably just want to merge those web.config settings with the main config.
The main issue that I've had with getting WCF to work in DNN is making sure that WCF is installed with IIS (so it correctly handles the .svc extension).