Azure: Will I be able to use source control integration? - visual-studio

Currently, my visual studio solution has 3 projects:
MVC project - to be deployed at say www.something.com
Web Api - to be deployed at api.something.com
SPA application - to be deployed at app.something.com
Will I be able to host all of these just through VSO source control? I am not sure if azure would be able to host the applications at respective sub-domains without explicitly defining them?
Can anybody please clarify? And what would be the best approach?

if you host your application on Azure App service, there is continues deployment service. You can have your code next to your site (Local Git https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/) or you can have your code in supported repository e.g github/bitbucket etc ..
And Azure App Service supports virtual directly, you can have multiple apps in the same site. see detail answer from here Publish Multiple Projects to Different Locations on Azure Website

Related

Unable to publish Web API from Visual Studio

I have created a simple web api in ASP.NET Core and wanted to publish to Azure Web App.
I'm using free trial subscription and have only one web app resource created in Azure.
The app service plan is using free tier 'D1' SKU and is the only one present in my subscription.
However, while trying to publish the web api by choosing this web app in Visual Studio publish profile, it says 'there are no existing instances available'.
The web app resource does appear here:
Clicking next while the resource is selected, results in the issue:
I have created a .Net Core Web App in the Azure free trial Subscription with free tier plan
Initially it contains only hoststart.html
KUDU Console of Initial App Service
Created a sample .Net Core Web API Application in Visual Studio and tried to Publish to the App Service which I have created in Azure portal
Make sure you have login to the same subscription in Visual Studio where you have created the web app in Portal
Initially it was prompted to re-enter the credentials after changing the Azure Subscription,I have refreshed the Visual Studio , after few seconds Iam able to see the correct Subscription details.
Iam able to see the App Service which I have created in Portal
Able to successfully deploy the WebAPI to the App service in Portal
KUDU Console of App Service after Publishing the WebAPI from Visual Studio
Deployed WebAPI Output
Update
You are in the correct path, after selecting the web app it asks to create the api.Click on the + symbol and add the API Management
Seems like you created a Web API resource and no API Management resources. Those two are independent Azure services. Former is needed to host your API application. The other one provides additional features to your APIs and is completely optional - you can look it up in the official documentation.
The step to select/configure API Management resource was introduced in deployment wizard at some point. It is confusing and probably could be handled differently.
Unless you need API Management resource, just skip the step and you'll have deployment profile ready.

Azure VSTS deployment related issue (Deploying a laravel app)

I'm using azure to deploy my web application, Laravel application
laravel uses site\wwwroot\public as entry point
For that reason I'm using "site\wwwroot\public" in Virtual applications and directories under application settings
Where can I find the setting of the location where the code will deploy that will arrive from VSTS (deployment source)
Application settings on Azure
Right now this is the link where whenever my project arrives from VSTS is deployed
I don't want that, I want it to be deployed in "site\wwwroot\" yet keep entry point of application same as above in bullet

Windows Azure and Dreamweaver

Can I use Dreamweaver to build an HTML based site and then upload this site to the Azure platform via ftp, more specifically will Windows Azure recognise the default page for my website without explicitly having to reference it in the URL?
Azure PaaS (either Cloud Services or Web Sites), no.
Azure IaaS, yes... with a bunch of initial setup.
You could spin up an Azure VM and host a plain HTML web site from within IIS there. You would need to configure the IIS web site (e.g. start page) and set up the FTP server when you first provision the server.
My gut feeling is that Windows Azure is not a very economical hosting model for a project of this kind though.

WebApi Deployed to Azure - Controllers Don't Work (500 Error)

I have a WebApi project that wraps the Dynamics CRM Online web service and provides a REST api. I have a simple controller that gets some contacts from CRM and returns them to the caller.
Everything works fine when I run it in the local emulator. However, when I deploy the project to Azure, I can reach the home page, but the controllers all return http 500 errors. Why would this happen? And how can I troubleshoot to get more details?
UPDATE
The issue is with the absence of Microsoft.IdentityModel.dll on the Server 2012 instance running the web role in Azure. I found this by opening web role instance in RDP, installing Fiddler, and making the request from Fiddler to the local IIS server. It responded with the detailed error.
Now my issue is figuring out how to enable IdentityModel on a Windows Azure Web Role. You're supposed to be able to add it via the Server 2012 Add Roles and Features wizard, but it's totally locked down on the Web Role. You can't check any boxes that aren't already checked. Is this even possible?
The issue is giving the Web Role access to Windows Identity Foundation when it's inherently not there. Marc Schweigert provides clear steps to do this here:
http://blogs.msdn.com/b/devkeydet/archive/2013/01/27/crm-online-amp-windows-azure-configuring-single-sign-on-sso.aspx
Go to the 23:00 mark of the video and you'll see the 4 necessary steps:
Reference Microsoft.IdentityModel.dll (need WIF SDK installed)
a. Set copy local = true
Create RegisterWIFGAC.cmd in your web role project
Create Startup Task in ServiceDefinition.csdef that invokes RegisterWIFGAC.cmd
Add GacUtil to the project (used in the startup task) to put Microsoft.IdentityModel.dll in the GAC every time the web role starts).

Debugging a Windows CE application which uses a Microsoft Azure service

This question has probably less to do with actual programming and more to do with environment setup.
I'm developing an application for a Windows CE device, which will use a service hosted in Microsoft Azure. Obviously, this is all under development, and the service itself has not yet been uploaded to Azure. So I'm using the emulators provided by MS to deploy the service locally. Also, I don't think uploading the service to Azure just to debug it is a good idea, as that could net us a bill for Azure we don't yet want to pay.
Also, please note, I'm using VS2008 for the Windows CE project and VS2010 for the Azure project (thank you MS for dropping support for mobile devices -_-).
The problem is, the service seems to be accessible only via 127.0.0.1 or localhost, and if I physically connect a Windows CE device or use an emulated one, it becomes a new entity on the network, and cannot access that service any more.
How can I debug my Window CE application and have it see the service, whilst still being able to debug the service itself?
You are correct, the development fabric (the compute emulator that allows you to build an azure application and debug it locally) is only meant for local development. There are some hacks that allow you to get around that, but I wouldn't recommend it.
My recommendation would be to spin up the service in a more traditional hosting environment, at least in these early stages. You can define it as a web app just as you always would have, and get it functioning. Then, when you know its mostly complete, create a cloud service project and do an add existing to bring your web app into the cloud service solution. Once in, its a simple matter to add the web app as a web role.
From there, you can complete testing of the service in both the local and hosted azure environments as needed. This allows you to minimize your development costs while still leveraging the power of the cloud. As an upside, you also have done most of the basic work to ensure your service is compatible with multiple deployment scenarios giving you a greater degree of choice for its final production state.
OK, I don't know if this was intentional, or if I found one of the mentioned hacks, but I saw that IIS hosts the Azure site I created on port 5100, and the binding for this site is *, so it accepts all connections.
Using this I could access the service from my emulator, and I could still debug all Azure related stuff.

Resources