I want to call wcf service hosted outside my netwerk. When i call that wcf from my code i got proxy authentication error as i am calling from machine which is covered with firewall.
So how i can provide my firewall proxy id/password programmatically to call the wcf service.
Somehow i have mananged to download proxy classes from that outside server which can call the wcf service but when i call any function i get the same error.
I have tried calling that code but i got error.
Related
We are consuming a WCF service using coldfusion. the wcf service does not expose metadata endpoint instead they share service contracts in dll and svcutil.exe generated proxy class.
Now, how can i consume the wcf service in coldfusion without generating proxy.? i see .net client can access that way by creating channel factory as given in the following url:
http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/accessing-wcf-service-without-creating-proxy/
i researched adobe help page:
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-78b4.html
but there is no clue.
what possibilities i have to consume the service?
I don't understand the question. Let me see if I can figure this out:
No proxy would be involved unless you specify one. The client computer will invoke and consume the web service on the server without anything inbetween. It's a standard HTTP call.
You say you are connecting to svcutil.exe, a c# utility. So you seem to mean you have an additional layer between the two CF applications, correct? So svcutil.exe is acting as the "proxy"?
I have a WCF service with some methods. It uses ASP.NET State Service. Client calling web methods is written in C++ using gSOAP. Everything works like a charm when ASP.NET State Service is running. When I stop this service web methods are invoked correctly, value is returned but client retrieves Internal Server Error (500). Why is this hapenning? Why web methods are invoked correctly?
I need to resolve this, because after receiving error 500 client retries to send data to web service and after that I have multiple rows with the same data in DB.
In my project I have one WCF Service which is hosted in a Windows Service. I hosted the WCF Service in Windows Service over netTCPBinding and Installed Windows Service. To access WCF service in my silverlight project I have added service reference of wcf.
But, when I am calling a method in WCF Service am getting the following error :
Could not connect to
net.tcp://localhost:8732/WCFHost/.
The connection attempt lasted for a time
span of 00:00:03.2951885.
TCP error code 10013: An attempt was made to
access a socket in a way forbidden by
its access permissions..
This could be
due to attempting to access a service
in a cross-domain way while the
service is not configured for
cross-domain access. You may need to
contact the owner of the service to
expose a sockets cross-domain policy
over HTTP and host the service in the
allowed sockets port range 4502-4534.
Please help me out.
For same-machine connections rather make use of Named Pipe bindings.
It might help if you showed us your service and client side endpoint configurations.
EDIT: After reading up a bit on the error you're getting (here among other sites), try changing the port number from 8732 to something between 4502-4534 as the error message suggests.
Keep same protocols at both the server and client end. May be your are calling the service with different protocols. Also check if your are using nettcp, your are having access to the machine where service is hosted.
use basicHttpBinding instead of netTCPBinding
I have done a work which contains two parts
WCF service which is hosted in Windows Service
WCF service project hosted in IIS7
I have done both comfortably,But i got a problem?
I want to call a method from WCF service hosted in WS from the 2nd WCF service hosted in IIS, but i was unable to do that? Can anybody help in this?
You should be able to configure a client endpoint in the service being hosted in IIS to the service being hosted as a Windows service, and make your call through a proxy just as you would normally make a call to a WCF service.
Well, if your service hosted in IIS7 wants to call the other service, it needs to become a client of that other service.
So basically, in Visual Studio or on the command line, you need to create a service reference to your second service, so that you'll get a client-side proxy class, which you can then use to call the second service. Also, you will need to add some configuration settings to your web.config for the service hosted in IIS7 in order for it to be able to call the other service (in a Windows service).
So where exactly are you stuck??
I using two WCF services. WCF service A is hosted in my .NET Winform application and WCF Service B is hosted on a Windows Service.
I am able to instantiate a client for WCF Service B and use the methods - i.e. call the WCF service hosted on Windows service from the .NET Winform app.
I am not able to accomplish the reverse with WCF Service A - i.e. call the WCF Service hosted on the .NET Winform application from the Windows Service. The call to the method times out.
I have used the WCF Test client from the Visual Studio command prompt and it can successfully make calls to WCF Service A.
Is this due to a security issue or something from the Windows Service?
Please advise.
Thanks in advance!
Subbu
I think the only viable approach (without the extreme of having some messaging infrastructure), is to have the service invoke operations back on your client via a WCF callback. A good example of this can be found here:
What steps do I need to take to use WCF Callbacks?
This is good for dealing with events that happen server side and allowing the client to respond to them. If events isn't what you're looking for, then your client could just register with the server (specifying the callback contract), and then the server can invoke your client at will.