Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 WCF 服务,我想使用 ASP.NET 访问它。WCF 服务中使用的绑定是basicHttpBinding。我该怎么做?任何示例将不胜感激。
如果我从svcutil.exe创建代理然后在 ASP.NET 页面中使用该类,它会正常工作吗?
您需要在您的 asp.net 网站项目(此处命名为 ServiceReference1)中添加服务引用,然后是您的客户端:
var serviceClient = new ServiceReference1.Service1Client();