简体   繁体   English

SvcUtil.exe为服务合同实现类创建自己的类名-WCF

[英]SvcUtil.exe creating its own class name for service contract implementation class - WCF

I've written a WCF service and hosted in IIS 6.0. 我已经编写了WCF服务并托管在IIS 6.0中。 When i try to create the proxy using the following command 当我尝试使用以下命令创建代理时

svcutil.exe /language:cs /out:MyProxy.cs /config:app.config /a http://serviceurl

it is creating its own class name in MyProxy.cs. 它在MyProxy.cs中创建自己的类名。 Why is that? 这是为什么?

I was trying to step in to the service for debugging and i was not able to get the breakpoint hit during debugging. 我试图进入该服务进行调试,但在调试期间无法获得断点。 Could this be because i renamed the class name which is created by the Proxy? 可能是因为我重命名了由代理创建的类名吗?

In the service, the class name that implements the service contract is something like MyService . 在服务中,实现服务协定的类名类似于MyService But in the proxy file i'm getting as MyClient . 但是在代理文件中,我的身份为MyClient

Why is that? 这是为什么?

Thank you 谢谢

NLV NLV

The MyClient class generated by svcutil and implementing the service contract should be used to invoke the service. svcutil生成并实现服务协定的MyClient类应用于调用服务。 It's just a client proxy. 它只是一个客户端代理。 If you want to debug the service you should run the service in Debug mode and place a breakpoint there. 如果要调试服务,则应在“调试”模式下运行该服务 ,然后在该处放置一个断点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM