Consuming a particular webservice fails - c#

I have an issue consuming the webservice, basically i have the following webservice which i would like to consume in my web application, but everytime i try in my solution to add it i get an error.
Here is the link to service: http://www.webservicex.net/ConvertAcceleration.asmx?WSDL
Here is the website of the service: http://www.webservicex.net/WS/WSDetails.aspx?WSID=39&CATID=13
In my solution I click on "Service References" with the right mouse button and choose for "Add Service Reference" I fill in the link and click on "GO".
But I can't add it it just say "The HTML document does not contain Web service discovery information."
And it is in VS2008 Framework .NET 3.5
So any idea?

As far as I remember in Visual Studio 2008.
You needed to
click Advanced
Add Web Reference...
enter the wsdl
add reference

Related

Adding wsdl web reference in asp .Net Core project

I've got web service http://www.mcommunicator.ru/m2m/m2m_api.asmx?WSDL
And I've got a problem with connecting to it from Visual Studio 2015
in my Web API project
There is no "Add web reference" anymore
I've tried to add is with:
References-> Add connected Service -> WCF Service - Preview
It finds 1 web service by my address, but I get an error when click finish.
I guess it's not a WCF service, that's why I get an error.
But I don't see any other ways to add it. Please, help me.
To add the SOAP service references for clients built on top of WCF for .NET Core 1.0 install the extension Visual studio WCF Connected Service via the “Extensions and Updates” dialog box.
After installed, In Solution Explorer, right-click on the References project item and then click on the Add Connected Service option.
The Add Connected Service dialog box appears and you should have a new option "WCF Service - Preview".

Unable to find ASP.NET Web Service in file

I am trying to develop a web service application. I am following this website to develop the web service, as from the instructions when I open the VS2013 and Select File -> New -> Web Site in Visual Studio, I did not found this Asp.net web service. I got as below image.
Do I have to install any templates?
I have also tried to Installed the web service template by online but when I click on it and searched I got nothing, like my below image.
Can someone help me to do it.
Note: I am connected to Internet.
please follow below steps:
Right Click on Project/Application
Select Add new Item
Select Installed Tab
Select Visual Basic or Visual C#
Find Web Service (ASMX)
It depends what kind of web service you want to create really.
In your example you're using the "New Web Site" dialog.
More modern web services (Web API etc) instead use "New Project" dialog. Open that and choose "ASP.NET Web Application" and you can choose what you want from the subsequent dialog.
See here:
I got it, I have the change the .Net framework from 4.5 to .Net framework 3.5.
Thanks for your time and your help :)

Can't add service reference to client class for WCF project within same solution

I'm working through an example on a website to create and consume a WCF service. I've created the service which is hosted in a windows application.
As per the instructions on the site I've created a ClientApp console app within in the same Visual Studio solution. Now the problem is that I cannot create a service reference to the WCF host project.
If I run the host project the Service is switched on and I can verify this by visiting the url in my browser. However, I cannot add a service reference to my client project while another project is running. The "Add Service Reference" option is greyed out. Presumably this is since they're in the same solution in Visual Studio.
If I try and add the reference when the host project is not running then I can get into the "Add Service Reference" screen but no services can be found (presumably because the WCF service is no longer running
How can I get around this?
The solution explorer is as in the image:
You could also try to start the WCF service in Visual Studio, then select "Detach All" from the Debug menu. This should let the service continue to run in the background, yet open Visual Studio to let you add service references.
In the Add Service Reference dialog, click the Discover button and select Services in Solution:

Can't add service reference to my project

I have a solution which contains :
- a website hosted on my local IIS
- a project that defines a WCF web service
- 2 other projects which are assemblies used by the website
I added a console application to quickly test the webservice but when I right click on the project, context menu doesn't contains the "add service reference" entry (but it's present when I right click on the website).
I had done this in the past without problem, why doesn't it work anymore ?
Edit :
If I create a new console project in an empty solution, I can add a service reference.

Get Webservice WSDL in different project within same solution

I have a Web Service Project and a Web Site Project both within the same solution. I have a simple link on a web page within the Web Site Project that needs to point to a web services WSDL (example: Webservice.asmx?WSDL) within the Web Service Project. Is this possible?
Would I be better off using a hardcopy of the WSDL document and just putting that in my web site project?
I don't believe so. You will need to have the webservice run, in either IIS, or through visual studio.
Why not add a Web reference to the Webservice (Browse for "Web services in this solution") ?
That's what adding the reference does, basically... along with creation of the class mapping. Then you could always update references without having to worry about hard coded wsdl links.

Categories

Resources