How Console in New Windows Azure Portal Works? - azure

In the new Windows Azure Portal, how does the "Console" Window works? What really happens behind the scenes? I am curious to know how it works internally.
(I can't find that out for myself since I don't have an Azure account :-( )
http://assets.andrewconnell.com/media/Default/Misc/AzurePortalManager04.png

I actually made this console as my internship project while at Microsoft. It was made before the xplat-cli was available, but it's still very simple and actually uses the Kudu service. Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. More information on Kudu here: https://github.com/projectkudu/kudu/
When your web application is created on azure, Kudu stands up a scm website for your web application with the end point yoursite.scm.azurewebsites.net. The console then takes commands that you give it, calls Kudu's REST API using the scm website as the endpoint, and then displays you the output in the console.

That console looks exacly like the Azure Cross-Platform Command-Line Interface (xplat-cli) which is based on node.js. I'm not a node.js expert, but a good guees would be, that the browser creates a node.js session und runs the xplat-cli in there.
xplat-cli in turn use the Service Management API of Azure, which are all REST-based.
You can compare the xplat-cli on your own by installing them from the Downloads page. At the bottom of this page are the download links for Windows, Mac, and Linux.

Related

ABCpdf .NET with Azure App Service

I am trying to use ABCpdf .NET with Azure App Service and getting the following error when generating a PDF.
Unable to render HTML. Failed to configure IE 9 or above for the MSHtml engine:
Access denied while writing to the registry.
For IIS applications, please enable "Load User Profile" or
consult MSHtmlBootstrap in the documentation.
Usually in a VM I would set Load User Profile to True and it works but in Azure App Service, I do not have access to IIS Application Pool configuration.
According to the developer of ABCpdf, it should work with Azure websites.
http://www.websupergoo.com/support-azure-abcpdf.htm
Windows Azure Web Sites
WAWS sites operate as 32-bit processes in a multi-tenanted environment. In order to isolate one site from another WAWS is locked down to prevent inter-process communication. While you may find ABCpdf (32-bit) will install to WAWS, we expect the functionality will be diminished.
You cannot modify the registry with Azure Web Apps (formerly Web Sites). So, you're getting an error because the app cannot register itself. Being a multi-tenant service, you are not allowed to make registry modifications.
You need to go back and look at that page again, where they suggest using a VM or a web/worker role (both of which do allow for registry modification).
Even though this is a few years old it's the top StackOverflow question for "ABCpdf App Service" so it seems pertinent add an updated answer.
As of version 12.1 ABCpdf.NET includes the ABCWebKit HTML rendering engine based on WkHTMLToPdf 0.12.6 (Qt patched version).
Although limited compared to the default ABCChrome engine, it will enable rendering in a 64-bit Azure App Service on Windows using Basic App Service plans B1 and above.
NB: it will not work on any of the free App Service plans, or on 32-bit instances.
More information:
Updated ABCpdf .NET Azure Deployment Guide for App Services
Example project on GitHub

What is a web job on azure, is it part of a web application or standalone

Is it a job attached to a web app, or is it a type of web app itself? I tried following this example but couldn't find the add webjobs link it mentioned, just links to create a web app.
https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/
Yes, a job is "attached" to a Web App. A Web App is the execution container for WebJobs. In some cases you might also have a companion website also running in the WebApp, but often, the Web App only contains WebJobs.
Once you have a Web App, you can create/manage WebJobs via the portal "WebJobs" blade in the new portal. You'll find it in the Settings blade under "Features".
Another way to think of a Web Job is as an extra .exe/process that runs on the same VM as your web app, with the only special thing being that it is launched with the same set of environment variables as the web app and has access to the same set of directories.
There's a great post here explaining WebJobs and how to create/operate one. Everything you need to know to get going.

Web service migration from Local IIS to Azure

I Used Azure Website Migration Assistance to migrate my web service that was running on my Local VM's IIS. My Migration process was successful and also I was able to use this web service. But I can't find where to find the migrated source code in azure portal. All I can see is some 20Mb of data in on the dashboard graph of azure portal. If I need to changed some of my code where to do this?
What is on the Azure Web App should now match what was on your IIS server. Now, to update the web app, you can use the deployment techniques here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
The simplest method to deploy to check what content is on your web app would be to use the SCM site. This is available at: https://your-site-name.scm.azurewebsites.net. Go to Debug Console > CMD and then the site > wwwroot folder to see your web app content. You can also upload to the site via drag and drop.
Alternatively, you can download the publishing settings for your web app via the portal and then re-use the migration tool, select the site, and then upload the publishing settings. However I would suggest using the deployment techniques above first. (Disclaimer: I wrote the migration tool.)
There are multiple ways to push changes to your Azure Website/Web App. They are listed here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
One simple way is to use an FTP client like FileZilla. In the classic portal, you will find the FTP address (hostname) and the credentials in the dashboard tab. In the new portal, select your Web App and the FTP address will be displayed in the Essentials section at the top of the page. Click on Settings and Deployment credentials to set your FTP user password.
Another simple alternative is to use Dropbox. Take a look at this video for how to set instructions: https://channel9.msdn.com/Series/Windows-Azure-Web-Sites-Tutorials/Dropbox-Deployment-to-Windows-Azure-Web-Sites

Azure Websites Dropbox Sync from API

I have been looking through the C# and Rest API's for the Microsoft Azure web sites but I cannot find a way of executing the drop box sync command that can be done through the azure portal. Is this possible from an API that any one knows of?
There is support for deploying a WebDeploy file to a Website using PowerShell, so there must be a corresponding API for it.
If you download the publish settings for the website, you'll se that it has a PublishUrl which is the WebDeploy endpoint for the server, along with a msdeploySite, which is your unique site on the server. A WepDeploy file is nothing more than a fancy zip (AFAIK), so by digging into this it should be possible to come up with something which can talk to the webdeploy endpoint and thereby publish.
I don't think that API is something Microsoft publishes though, so you might have to dig deep.

Azure does not read web.config settings

I have to deploy my (old school) application to Azure using the Web deployment tools/Azure Web Accelerator. I'm not an Azure pro and I havn't set up the whole Azure Publishing enviroment.
Still i can publish my application with Visualstudio to Azure. Never the less when I try System.Configuration.ConfigurationManager.AppSettings["setting"] I get an empty value.
Local on the webapplication I get a value.
So I know that 'RoleEnvironment.IsAvailable' is true and localy isn't still that's the only lead I have. Any help is welcome
Thanks guys but I've fixed it. It's quite simple after all. The Azure Web Accelerator was configured at url service.test.com the site which couldn't read the web.config was a the same base url only a virtual application like service.test.com/shop.
When I changed the service.test.com/shop to run at testshop.shopname.com everything worked. So basicly you can't run both web app/sites on the same url.
If it's OK when using the local simulator? You could RDP to your windows azure virtual machine to have a look on the web.config directly. About how to use RDP on windows azure please have a look
http://msdn.microsoft.com/en-us/library/windowsazure/gg443832.aspx
http://geekswithblogs.net/shaunxu/archive/2010/12/03/remote-desktop-to-your-azure-virtual-machine.aspx

Resources