I published a simple Hello World web service in an ASP.Net web service project.I closed this project and opened another console based project to consume this web service. The problem is I cannot discover this web service to add reference.When I paste the url, I get the following error
There was an error downloading 'http://localhost:65436/Service1.asmx/_vti_bin/ListData.svc/$metadata'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:65436
I am using Visual Studio Ultimate 2013, I don't have IIS server installed.
UPDATE- : I created a new Console based project in the existing solution and it works fine.But the problem is how do I run this console project,when I click the debug button, it deploys it on browser.I simply printed the string output returned by web method,I need to see this output on console.
I closed this project and opened another console based project to consume this web service. The problem is I cannot discover this web service to add reference.
Because the web service is not running. Web service references can only be generated when the metadata is available.
You can either:
Run two instances of Visual Studio, one for the web service and one for the client
Put a service and client project in one solution.
Also, you shouldn't use ASMX for new development. Take a look at WCF and WebAPI.
Sometimes it happens to me too. I press F5 to start debugging the web service, immediately stop debugging, and then try to update the web reference again. Usually it helps.
you can deploy the web service on IIS then consume it in console application.
Related
I have 2 solutions both running in VS2013 on Windows 10.
One solution is the client which calls the asmx service located on the same host.
Another solutions is the service it self which I launch in debug mode with debug configured in the web.config.
When I want to step into the call I get the message
Unable to automatically step into the server. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the server
I run the web service on "Local IIS" in debug mode. In the client I tried attaching the process where the web service is running but also no success.
I added the users "IUSR" and "IIS_IUSRS" to the folders of the web service with full permissions.
Any idea what else I can do to make this work ?
I have a asp.net project. The solution has a web project and a console application. The web project also host a wcf service. And the console application consume the wcf service. They works fine before. Last month I did some change to the web project, and deployed it. My question is do I have to rebuild the console application and publish it too?
Unless you modified the method signatures (or modify classes that they may return) of your WCF Services that your console application consumes, then you shouldn't need to rebuild it.
I have been through tons of threads and am unable to find the correct answer for my question. I have created a very simple WCF service on my development machine using visual studio 2010. The service works correctly when using VS to host it. I have even had success creating a small c# application to consume this service. However I now need to move this service to IIS on my work's development server. I have tried following several guides online but nothing has worked so far. Any help would be greatly appreciated.
if you are able to execute your wcf service using WCFTestClient successfully and not on IIS
that means problem is in endpoint configuration. I suggest have a look once again endpoint suggestions.
Using Web Deploy to publish from Visual Studio to a remote web server requires additional installation of Web Deploy on the server http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy
Visual Studio generates an output log during the web deploy publish that may have additional information on why it is failing. Sometimes there are permission issues to work through as well http://blogs.iis.net/krolson/archive/2009/11/04/using-iis-manager-accounts-for-web-deployment-tool-msdeploy-delegation.aspx
You can also generate a Web Deploy Package with Visual Studio and manually deploy it to the server http://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx
I am opening some older demo code and received the following message when I started a debugging session:
"The Silverlight project you are about to debug uses web services. Calls to the
web service will fail unless the silverlight project is hosted in and launched
from the same web project that contains the web services."
I am working in Visual Studio 2010, and the projects are configured for .NET 4.0. There is a web project which hosts the xap file and a Silverlight project which builds the xap. The Silverlight project has a service reference to a publicly available stock quote service.
My question: What does the above warning mean (in layman's terms) and how do I resolve it?
I think this will go away if you set the web project which hosts the Silverlight application to be your startup project (right-click on the project in the Solution Explorer and select "Set as Startup Project").
Silverlight by default can only make calls either to services hosted on the same domain where the XAP was downloaded, or to services which explicitly allow callers from other domains to make this call - see http://msdn.microsoft.com/en-us/library/cc197955%28VS.95%29.aspx for more information on that. Since you say you're calling a publicly available service (I'm assuming you don't own it), then either the calls will just work (if the service allows cross-domain calls), or they will fail (if it doesn't).
Basically, I have a web Service which I developed. I then went down to the installation site to install the web Service and a handheld app which uses it.
Problem is, I came back off site, and now need to change some things with the handheld app and web Service, and send it to them (site is hundreds of miles away).
I can change the web service fine, but how can I change the web reference to that web service, on the handheld app? its pointing to a location that does not exists as there is no remote access to their servers.
How can I trick Visual Studio into updating the web reference to get my LOCAL objects, but compiling to keep the web reference that only exists on THEIR local servers?
You can configure the url that the webreference is using by setting it to dynamic. It will add the url to the config.
Also see: http://www.codeproject.com/KB/XML/wsdldynamicurl.aspx