How can we consume WCF service in .Net 2.0 Winform. Please note that we don't have IIS on the client. an example or a sample would be great.
It all depends on how your WCF endpoints are configured.
If you're using SOAP based WCF Services over HTTP, you should be able to simply add a Service Reference from your .NET 2.0 WinForms application and be on your way (which is what I would suggest doing).
If that's not the case, you'll have to provide a little more detail about what you're trying to do with your WCF Services.
You can host your WCF service in a Windows Service as per this article. In that case, it will listen on the HTTP protocol on any port you configure.
Related
I have an old ASP.NET app connecting to a .NET Remoting service. I'd replaced the .NET Remoting service to a WCF service. I have the original WSDL and I've generated a WCF service by the help of svcutil. I don't know whether the client will able to connect and call the WCF service without changing its code.
Is it possible to solve this problem, please?
A service can be both a remoting service and a WCF service at the same time.
Just configure it with RemotingServices as usual for remoting.
Then decorate with OperationContract / ServiceContract and construct with ServiceHost and you can create clients for both techniques, just that remoting is TCP only.
WCF and Remoting are different paradigms. So if you changed your Remoting server to .NET WCF service, you will have to change the client code to use the wsdl generated client
look at https://learn.microsoft.com/en-us/dotnet/framework/wcf/migrating-from-net-remoting-to-wcf#Client_Comp. it should not be difficult
I want to host my WCF web service in the public domain (on internet) so that any client application (java, .net etc.) can consume it.
The WSDL will give details of the service (what it offers etc.). But,
How to inform the binding details to the clients?
I want to know how do we inform binding details to the outside world when you are on internet and you do not know who the client will be. WSDL gives the details of the service; similarly what mechanism is there to inform the binding that's required to communicate with the service.
Do I need to stick to some specific bindings when I want to publish my web service over internet where anybody can consume it?
svcutil or Visual Studio (using svcutil in background) will understand binding specification provided by metadata exchange binding (look here)
it wouldn't. If You want Your web service to by used by technologies other than .NET You shouldn't use .NET specific implementations.
basicHttpBinding works with soap 1.1. wsHttpBinding with soap 1.2 and WS-*. You shouldn't use other bindings if you want your web service to be interoperable.
I'm new in WCF service and I need to consume the WCF service from my client for my current .net 2.0 windows app. I successfully added the WCF service as web reference in my .net 2.0 application but when using the web method of the service it took long time to execute the method and in the end my application is not responding. Base on the request in fiddler, the request has been timed out. My client provides me a user name and password but I don't know where to use it. Base on the wcf web service wsdl of my client, it uses WSHttpBinding.
I also created a sample .net 4.0 windows application and added the service as reference but still cannot use the web method. I check also the request in fiddler and gives me a response error "The request for security token could not be satisfied because authentication failed.".
Please help. I need to consume the WCF service using my existing .net 2.0 application.
Thank you very much in advance!
If you want to consume your WCF service from .NET 2.0 via adding web reference you must use BasicHttpBinding - that is only backward compatible build-in binding (except custom defined binding) with ASMX based client.
Your exception in case of .NET 4.0 test complains about security token - WsHttpBinding uses Windows security by default. It is hard to diagnose the problem further because you didn't provide enough information.
We are in the process of creating a new WCF web service (WCF service that has an basicHttpBinding Endpoint) to carry out some of our business logic.
The web application connects not problem at all, however our legacy Compact framework application doesn't seem to see the service at all.
Are we on to a loser here and should we just revert to ASMX web service (the Compact framework cannot be upgraded) or is there a way around this?
Yes you can but you need to treat it as a soap service not a WCF service with all the .net 3.5 goodness. Start up your web service and create web service reference in your .net 2.0 CF and use the auto generated code.
I'm starting in the WCF world and would like to ask your opinion on something.
I need to implement a service exposing one method that receives a couple of parameters. I want the parameters, submitted from a form in the client to the service, to be sent encrypted in the SOAP message.
The service needs to be accessed from .NET 3.5 clients and also 1.1. It is not possible to install the WCF service via a windows service, it needs to be deployed as a IIS app.
My questions:
- How can the WCF service assure encryption of the input parameters? A certificate in the client or are there any alternatives?
- Is there any problem consuming the WCF service via 1.1 apps, or even other non .NET clients?
- Do you think this scenario is implementable with WCF?
Thank you in advance
There is no way for a .NET 1.1 application to call a WCF service unless that service is exposed through basicHttpBinding. That binding only permits the use of SSL for encryption.
SSL on the web service host.
.NET 1.1 doesn't support automatic encryption, or WS-Security. You can encrypt/decrypt the parameters manually, though.