从具有MVC架构的Web应用程序调用WCF服务 [英] Call wcf service from web application with MVC architecture

查看:106
本文介绍了从具有MVC架构的Web应用程序调用WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过cmd通过svcutil.exe创建服务引用.我将生成的两个文件都包含在project.and应用程序中给异常::

在ServiceModel客户端配置部分中找不到引用合同"IService1"的默认终结点元素.这可能是因为没有为您的应用程序找到配置文件,或者是在client元素中找不到与该协定匹配的终结点元素.

但我包括生成的配置文件..

请帮助

在此先感谢

i create service ref via svcutil.exe through cmd. i include genrated both file in project.and application give exception::

Could not find default endpoint element that references contract ''IService1'' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

but i include generated config file..

please help

thanks in advance

推荐答案

我建​​议您阅读以下系列文章,并逐步进行操作.

1. 一般概念
2. 构建存储库
3. 构建服务
4. 使用服务


HTH
I have suggested you to read the following series of articles and go step by step.

1. General Concepts
2. Building A Repository
3. Building The Service
4. Using The Service


HTH


这篇关于从具有MVC架构的Web应用程序调用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆