How to get Visual Studio project to output to approot/bin - c#

I have a Visual Studio 2012 solution for my Azure cloud service. The solution has a MVC site in one project and a windows service in another project. I would like to run the windows service at startup on the web service.
I get an error that the service is not found in approot/bin.
How do I get the Windows Service project to install itself in approot/bin when I build locally or deploy to Azure?

Related

Create folder in Azure App service while debugging in Visual Studio

I have an ASP.NET Core Web API published on Azure App Service. When I debug this API on my local machine, I am uploading few files so the question is how can I create a directory in Azure App Service from Visual Studio while debugging it?
It is trying to connect directory in my local project.
i.e Azure App Service: example.com
Automatic path: d://abc//test//xyz.com

Visual Studio Publish profile settings for Single Page App on Azure

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:

How do I host my API 2 project externally?

I have a functioning API that I can launch from Visual Studio 2015, I can also clean and build it. It outputs a dll file with other supporting files but I don't understand how I take the build files and actually host them as an API.
How can I host my API 2 project externally?
Like most Microsoft web technologies, you'll most likely have to host them on a web server running IIS.
http://www.c-sharpcorner.com/UploadFile/2b481f/how-to-host-Asp-Net-web-api-on-iis-server/
Visual Studio has a wizard for publishing API services to IIS.
http://dotnetmentors.com/web-api/host-asp-net-web-api-in-iis-using-visual-studio-publish.aspx
If you don't have an IIS web server, you can host on the Microsoft Azure cloud platform which will provide an instance of IIS for you.
http://www.asp.net/web-api/overview/data/using-web-api-with-entity-framework/part-10

How to deploy a WCF web service in IIS 8.0 using Visual Studio 2010?

I've developed a WCF Restful service with C#, .NET Framework 4.0 and Visual Studio 2010.
On Visual Studio 2010, I have did right click on WCF project, and select Publish.... On Publish web dialog I have selected File system as publish method.
This WCF service runs perfectly on my IIS 7, running on a Windows 7 Ultimate 64 bits.
I have followed this tutorial to publish it on an IIS8, running on a Windows Server 2012.
But, when I access the url http://localhost/MyService.svc/users I get a 404 NOT FOUND error.
This error page show that it is trying to access the physical path D:\IIS\MyProject\MyService.svc\users that is not found.
What do I have to do to enable my WCF Service?
I have solved this problem following this:
http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45
And then doing this:
http://gyorgybalassy.wordpress.com/2012/09/24/publishing-a-wcf-service-on-iis8/.

Mvc3 application to windowazure

I want to convert my MVC - 3 project to WindowAzure project. I downloaded SDK for VWD express 2010. Can anybody please guide to do this?
This should help you: Migrating an Existing ASP.NET App to run on Windows Azure
This TechEd 2010 Presentation on Using Microsoft Visual Studio 2010 to Build Applications That Run on Windows Azure by Jim Nakashima should get you going
To start with, you don't need to make any changes in your MVC application to move to Windows Azure. Once you have Azure SDK (June 2012) Installed, you will have an option with your Solution properties as "Add Windows Azure Cloud Service Project" to move your MVCx application to Windows Azure. There will not be any change to your main application, but this way your application will be part of Windows Azure Application and run as a Web Role there.
Now if your Azure Application is set as Startup project and if you run your application, this will launch your application in Windows Azure Emulator so you can test your MVCx application in Windows Azure Emulator.
Finally you would need to make necessary code changes (i.e. Database connection etc) to successfully run your application as Windows Azure Cloud Service in cloud. This is all depend on what kind of your application is and how you would want to run your application in cloud.

Categories