Sharepoint 2010 cannot connect to WCF web service. TCP error 10061 - web-services

C# and Visual Studio 2013, SharePoint 2010.
My Sharepoint site needs to consume an external WCF web service exposed by another company.
I have written a WinForms test harness, and it works fine, so there are no firewall issues, and the endpoint is correct.
Now I have moved the code into a DLL assembly and called it from a SharePoint 2010 web part.
The method call to the WCF service errors with TCP 10061, "target machine actively refused the connection".
The SharePoint project and the DLL both have Service References (same as the Winforms harness). I have copied the ServiceModel section from the Winforms app.config to the SharePoint web.config.
I can create the Service Client object, but when I call a method on it, I get the 10061 error. Winforms app still works fine. Any ideas?

Related

Generate Java classes for web service

I am attempting to write a web client to access a web service; I out of every tool I have tried (CXF, JAX-WS, JAXB, Axis) only Visual Studio 2012 and soapUI are able to access the web service. For the Java generated classes the API is incorrect, there is no way to pass in the Authentication object. soupUI can call the web services and a CSharp program works fine. But my boss expects Java.
Anybody know what library soupUI is using, is it something I haven't tried or is it proprietary? Or anyone know how to hit this web service with Java and have it work?

WCF Web Service client unit test failed in Visual Studio 2012 when hosting on local IIS

So I tried to start writing Windows 8 Modern Style application in visual Studio 2012 using Test Driven approach. I basically treat my Win8 WinRT as a client for tons of WCF Web service hosting on IIS. So as for now, all of my unit tests are WCF Web service call.
All unit tests pass if the WCF web services are hosted in IIS on ANOTHER MACHINE. However, all of them failed if I host the same set of web services on local IIS. I already checked the manifest and made sure that the following items are checked:
[x] Enterprise Authentication
[x] Internet (Client
[x] Internet (Client and Server)
[x] Private Networks (Client and Server)
BTW:
I wrote those tests in MSTest because it has native support to async and await, which is necessary for testing async web service call.
I went ahead and start working on a simple Windows 8 Modern Style app and make Web Service (hosting in local IIS) call in the app, and I got NO ERROR.
So I am very puzzled. Does it have something to do with the Visual Studio 2012 Test Engine? Is there something I can do to fix the problem. I really want to continue doing the app in Test Driven style but I can't find another way to test my async unit tests.
Any suggestion?

Create a web service that is hosted on IIS 6.0 and Asp.net 2.0

I need to create a web service that will be hosted by a website running IIS 6.0 and Asp.net 2.0. I have never created a web service before now. I have Visual Studio 2008.
What options do I have for creating the service.
Can I create the service using WCF and still have it hosted on Asp.net 2.0?
Do I have to specify any specific properties when I build it so that the service will run on 2.0?
Or must I use ASMX to build the web service?
I have tried building a service in VS2008 both as ASMX and WCF but I am unable to Add Web Reference to either type of service from VS2008 when I am testing how to consume it. I'm certain my lack of experience with Web Services is a big factor, but the more I read, the more uncertain I am of what technology I can use to create this IIS 6.0, Asp.net 2.0 hosted service.
WCF was introduced in .NET 3.5, so you need to use the legacy ASMX technology. Create an ASMX service, and use "Add Web Reference" to consume it. The first time you try that, you'll need to use "Add Service Reference", and then to click the "Advanced" button and then the "Add Web Reference" button. After that, "Add Web Reference" will be available as a command.

Host a SOAP web service on a server

I have a SOAP web service code (.asmx) created using VS.NET 2008 which I plan to host on a web server. I am unaware and completely new to the term 'hosting' . My question is whether there are any free and limited period web hosting services that offer me to host a .asmx web service having Microsoft SQL Server 2008 as backend. If yes, what should the approach be from my side ? Should I the upload the .asmx code or the entire VS.NET project ? I am working on localhost at present.
Thanks
This describes how to deploy ASMX web services:
http://msdn.microsoft.com/en-us/library/6x71sze4(v=VS.90).aspx
You'll need to find a web host that supports IIS and ASP.NET. I'm not aware of any free hosts that support server side scripts and SQL databases. One of the cheapest options that I've used in the past is GoDaddy, which should satisfy all your needs.
You can test locally if you install IIS 7, available through the web platform installer:
http://www.microsoft.com/web/downloads/platform.aspx

How can I add a web reference without the web service URL?

Basically, I have a regenerated wrapper code for a web service that I need to use; when I run this, it works perfectly and receives the data from web service.
How can I add an already regenerated code from a .wsdl file to another Visual Studio solution as a web service?
First of all, you should be doing all new web service development (both client and server) using WCF. You should use "Add Service Reference" instead of "Add Web Reference".
In either case, simply give the file system path to the .WSDL file.