I'm creating web service by through
File->New Project->web->ASP.Net Web Service Application.
Instead of File->New Website->ASP.Net Web Service Application.
After Coding and building Project, I got the web service Link library,
Here my question is how to deploy Link library into the IIS.
First of all, you shouldn't be doing any new development using ASMX web services, unless you have no choice. You should be using WCF instead.
Second, depending on which version of Visual Studio you are using (and you didn't tell us), you should be able to right-click the application and choose Publish.
Related
I want to publish my single page app to Azure. I have created the App Service, App Service Plan and downloaded the publish profile settings on my local. Now I can use FTP to publish it to Azure. But I am wondering if there is a way I can configure this in the my Visual Studio similar to what we do when publishing a .Net application (MVC or Web API) as shown below in the snapshot.
My single page application is not part of the solution. This is how the structure of my projects look like.
It has one .Net Core Web API project and one Single Page App created in Vue.js. I can publish the Web API project from the Visual Studio but not the SPA. Any help with this please?
Per my knowledge, it is impossible to publish it in Visual Studio similar to what we do when publishing a .Net application. There is no Publish... option for us to choose.
As a workaround, we can upload our SPA project to Azure web app via KuDu.
More information about KuDu, we can refer to: Using KUDU with Microsoft Azure Web Apps
We just need to drag the SPA project into KUDU under wwwroot folder as below:
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.
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 a multi tier windows application. one of the layers is implemented using web services and the UI layer communicate with this layer. I want to make an installation package for the application and i need the installation package to deploy the web services to the local machine's IIS during the installation, so the user doesn't need to go to IIS and configure it manually.
You can package your Web Service (or any web application) as a Web Deploy Package.
See this link on how to do this from Visual Studio: https://www.tutlane.com/tutorial/aspnet-mvc/asp-net-mvc-publish-with-web-deploy-package
Such a package also comes with a .cmd file that could be run by your setup. Read the deploy-readme.txt alongside it to learn more.
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).