How to host website and webapi using PAAS model on windows azure - asp.net

I have a asp.net website and web api project. I am trying to host them on windows azure using the PAAS model. At present in my local dev environment I have hosted the website and web api as shown in the screenshot below:
Both the asp.net website and web api are attached to different Visual Studio Solutions. The web api project is referenced within the asp.net website.
At present for website I use Visual Studio 2013 for publishing the package. I want to host the web site and the web api in the same pattern done in local dev envrionment on azure using the PAAS model.
Can anyone help me to resolve this issue?

In VS2015 and possibly in VS2013Z(I cannot confirm since I don't have it installed anymore), you can just right click on the API/web project and select 'Publish' in the context menu. In the 'Publish Web' dialog, select the 'Microsoft Azure App Service'. Follow the instructions in selecting your azure account and resource group.
Not quite if this is what your are looking for.

Related

Regarding application deployement in Azure using visual studio

I have signed up for a free azure account. I am trying to deploy my application in azure through visual studio 2017,but the drop down box for the subscriptions is always blank and I'm not able to go forward. I have also restarted visual studio after my subscription.
It often caused by cache issue. You need to sign out and remove all the account from Visual Studio Account setting panel. After that, please restart your Visual Studio and login your Azure account again.
If it also doesn't work for your, you could publish your web application to Azure Web App by downloading profile from Azure portal. Steps below are for your reference.
Create Azure Web App on Azure portal.
Get publish profile from Azure portal.
Choose import profile when deploying your web application using Web Deploy.

Can we retrieve asp.net project from azure?

I am working on a asp.net test project. I were deploy the project to windows azure. After that I add some code and the project stop working, but the project on azure is still working. Is there any way that can make me retrieve the project from azure ?
In visual studio, I can connect to windows azure and displaying the projects that I deployed to it. I can see some of the files but not all. The important files for me which is the controller files doesn't appear.
Azure isn't source control. What you would have published to azure (I'm hoping) will not be the whole code but a 'published' version of it.
Short answer would be no
When you publish a Web dev project to Azure Visual Studio compiles all the source code (.net) you have. Then the compilation results are binary files (.dll) and some other website assets like css,js and html files.
So there are no .Net source files from your project published into the website, because of that you can't get your source files again.
I strongly recommend you to check these links
Continuous deployment using GIT in Azure App Service
Using Git
in Visual Studio
spanish demo - Repositorios Git privados y
gratuitos
Besides of that you can try to use any source code repository or ALM suite, As you're using azure you can also use Visual Studio Online to host your projects for free and also be able to publish directly to azure repositories.
more info Visual Studio Online
You can not get code from this method. use FTp tool, like Core FTP, FileZilla for that.
These are steps get ftp of your web application.
Go to azure (https://portal.azure.com).
Select web app from browser all option.
Select you app from list an then click on settings option.
Then click on properties, then enable you ftp and create password for that.
FTP/Deployment User , FTP HOST Name , Password
Note: You will not get your code fils( .cs).

Configure Visual Studio Azure cloud service project

I'm looking to host a CMS-driven ASP.NET web application using Azure cloud services.
I'm new to Azure but have successfully managed to configure a basic Visual Studio project and publish it to an Azure web role from Visual Studio.
The application I'm building will have a very specific configuration where the IIS default web site will itself contain multiple IIS applications, each configured with physical path pointing to the same directory as the main website.
So what I'd like to know is, can this kind of setup be configured within the Visual Studio project. If so, can anyone explain how? If not, how can I ensure that my auto-scaling web roles all adopt the correct IIS configfuration?
By using the Sites element within the service definition file, ServiceDefinition.csdef, you can configure your web role to support multiple websites and web applications. This is accomplished using the sites, applications, and virtual directories features in Internet Information Services (IIS) 7.0. These features enable each web role in Azure to support configuration for multiple websites and applications.
Reference: https://msdn.microsoft.com/en-us/library/azure/gg433110.aspx
Hope this helps.
-Nithin

ASP.NET MVC 4 and Web API in Azure - No HTTP resource was found

Using Visual Studio 2012, I created a simple Windows Azure Project (Cloud project) for which contains a ASP.NET MVC 4 website. I didn't change anything to the template and I simply try to deploy it using Azure Website. I imported the "publishing profile" from Windows Azure Dashboard into my project and deployed (using Visual Studio).
At the very end of the deployment process I am getting the following message: "failed to open 'http://mysite.azurewebsite.net'. Exception:Class not registered". I can only click "Ok" on that dialog. Any idea why I am seeing this message?
When I look at the Output Window, I see that the deployment succedded. I go the a Web API url and I am getting "No HTTP resource was found that matches the request URI 'http://mysite.azurewebsites.net/api/values'". What puzzle me is that I can access that same url on my local environment.
What am I missing? Thanks!
I could access using my Azure website using ASP.NET Web API. If you use default MVC4 Web API template, please access "http://[yoursite].azurewebsites.net/api/Values/".
My Environment is below.
- Visual Studio 2012
- ASP.NET MVC4
You don't need to create a cloud project to use Azure Websites. You can simply create an MVC app and then use git deploy or even FTP to push the site to Azure
Make sure that you referenced the latest version of WindowsAzure related assemblies in your project.
Microsoft.WindowsAzure.Diagnostics 2.0 (and not 1.8)
Microsoft.WindowsAzure.ServiceRuntime 2.0 (and not 1.8)

Runtime Error with referenced WCF Service

I have created a reference to an IIS hosted WCF service in my ASP.NET website project on my local workstation through the "Add Service Reference" option in Visual Studio 2008. I was able to execute the service from my local workstation.
When I move the ASP.NET web site using the "Copy Web Site" feature in Visual Studio 2008 to the development server and browse to the page consuming the service, I get the following error:
Reference.svcmap: Specified argument
was out of the range of valid values.
Has anyone experienced this same error and know how to resolve it?
EDIT: My development server is Win2k3 with IIS 6
The problem may be due to a mismatch with the solution/project folder structure and the IIS web site folder structure. I ran into similar problems a good while ago and ended up changing how I deploy web services. Here and here are some discussions of similar problems to yours, they ended up not using the Add Service generated client and rolled their own client. Also, I can vouch for using the "Publish web site" method for deploying my services. Here is a good article on web service deployment models.
#Sixto Saez: I was able to use the following resource similar to the one you provided to generate a proxy class using the ServiceModel Metadata Utility Tool (svcutil.exe).
Here is the exact command line:
svcutil /t:code http://<service_url> /out:<file_name>.cs /config:<file_name>.config
Here is the reference I found that suggested using the method.
Also, I was able to consume the service by creating a reference using the Visual Studio 2008 "Add Web Reference" command. It generates code based on .NET Framework 2.0 Web Services technology.
Unforunately, the WCF service web site and I can not use the svcutil solution (Unless you know of a way how...). Do you deploy you service or your web site with the service reference using Visual Studio 2008 publish web site feature?

Resources