So, we deployed an application to Windows Azure and it crashed there for no apparent reason. After debugging it for a while we encountered an error that appeared due to Razor engine parsing failure. This was somewhat surprising as the application worked just fine on a local IIS Express. The error seemed to be caused by a different version of the Razor view engine in Azure Cloud Service and local IIS Express.
Apparently not everything is deployed to Azure when the application is and seems like the Razor view engine is one of those libraries which is NOT deployed with the actual project or red from any configuration file. This was somewhat surprising to me as I was pretty sure that everything is either deployed with the application package OR checked from a configuration file and a correct version is used in the Azure IIS. It seems a bit silly to use different versions that might cause bugs in the applications running in the Azure environment.
Now the question is; What is actually deployed or "installed" to the Azure Cloud Service IIS based on the configuration files in the application to be deployed and what is not?
I didn't find any information about this and am curious about how the actual Azure cloud service configuration is done upon the application deployment.
Also another question; What version of IIS is Azure Cloud Service actually using?
Your Azure PAAS machines are very basic and contain default installs of Windows server. You want to make sure that anything outside of the .NET framework is deployed with your application (e.g. CopyLocal is true), ie; MVC, RDLC, etc.
It is one of the more common deployment vows, as your solution may rely on the .DLL's from the GAC while your deployed to Azure server will not have the same stuff in GAC. So, paying attention to CopyLocal is very important.
Related
We have a .NET Core 2.1 Web App on Azure as an App Service. We deploy it to Azure via Visual Studio 2017's publish option (though it is also in a Git repo). It has a bunch of custom domains and SSL on all of them provided by Azure.
We've written a new version of the web app in .NET Core 3.1, in VS 2019. Identical functionality but written from the ground up rather than trying to upgrade the existing 2.1 version.
There's no staging version online as such - instead we develop on local machines and then just use test domains online that use the same service but where the environment is switched to use dev DBs and bucket locations etc, which is one of the reasons to write a new app rather than upgrade it, also, it just seemed cleaner and I saw that people had some issues when doing upgrades...
Is there an easy way to switch/publish the new web app/code into the current Azure App Service, to replace the old one? Or will I need to create a new App Service and then create all the custom domains, SSL etc there after removing them from the old one?
Or could I perhaps switch to git deployment and push the entire new project in over the old one - would that work or just create some kind of disaster?
There is usually no issue when pushing a new application version to your app service, even if it uses a new version of .NET Core.
You have to consider two things:
Windows AppService Plan: .NET Core 3.1 runtime has been rolled out worldwide, while the SDK has not (yet). When in doubt, use self-contained deployment.
Linux AppService Plan: You need to select the desired runtime version in the portal. Using e.g. Azure Pipelines you can set the runtime version at the same time as you publish the new version. Not sure how VisualStudio handles this.
As a general recommendation, you should follow silents suggestion of using slot deployments to have as little impact for your customers as possible. Each slot can have e.g. a different .NET runtime version, so you can test everything on the staging slots.
We have several intranet ASP.NET applications as parts of erp system running on local company Windows server, but recently decided to move to Linux servers due to low cost of maintenance. I know that it's possible to deploy ASP.NET Core Apps to Google Cloud Platform, but I did not find any info how to setup Linux VM to make deploy possible.(there is only info about setting up Windows VM).
Maybe someone had an experience of deploying asp.net core to linux on Google Cloud Platform?
You can set up a Linux VM in the GCP Console (on VM instances page) and then deploy your app using that instance, however, Google Cloud Platform documentation offers 4 substitute ways to deploy an ASP.NET Core app to GCP.
The simplest one would be to deploy it from Visual Studio.
To deploy your ASP.NET Core app to GCP, you can use Google Cloud
Tools for Visual Studio extension, which takes care of all the
necessary details to deploy your app from right inside the Visual
Studio IDE.
Another option would be to deploy a Framework Dependent Deployment bundle (see “Method 2” in the mentioned documentation).
This would be the simplest way to deploy your app from the command
line.
If you need more control over how your app’s container is built, you can also specify your own Dockerfile to deploy your app to Google App Engine with it (see “Method 3”).
This method would be especially helpful if you need to install custom
packages in the container, extra tools or need more control over the
contents of the container.
Alternatively, if you need more control over your workloads, or need to use protocols not supported by App Engine, you can use the Container Engine ("Method 4").
Here you may find a step-by-step tutorial on deploying an ASP.NET Core app to App Engine, which you might want to use as a reference.
I've been trying out Azure Functions and have deployed them successfully to Azure. As their name suggests, Azure Functions are intended to be deployed to Azure. However, now I have the need to deploy those functions to local IIS.
I'm aware that I can adapt the code and create a regular WebAPI project instead, but was wondering if the Azure Function project can be deployed to IIS as-is or with minimal changes.
In Visual Studio there doesn't seem to be an option to publish to local IIS. I tried the option to publish to a Folder (bin/Release). I tried to deploy those files to IIS but it doesn't seem to work.
If you need to run Functions on your own infrastructure, you should use Azure Functions Runtime.
It is deployed to Windows Containers (not IIS), but it will give you a similar experience to Azure-hosted Function Apps.
I have configured a cloud service to run multiple web applications in one web role. More information on this is in the documentation.
The documentation does not appear to be correct for local builds with the Azure 2.3 SDK. Apparently, since SDK 1.8, the physicalDirectory attribute is not relative to the Azure cloud service project folder, but its output folder. Also see this question. By changing the path to ../../../Project.Name the service can be built and deployed locally from VS2013 with SDK 2.3.
We also use continuous integration on Visual Studio Online. However, the project now fails to build with the message that the path to my second web project is invalid. The path it's trying to use is C:\Project.Name\. I don't think this is quite correct.
I have tested with ../Project.Name as the physicalDirectory attribute value on VSO, but that also fails.
Is it a matter of somehow correctly configuring this for Visual Studio Online, or is it simply not currently supported?
I am new to Windows Azure and need help with deploying my Azure application, which is correctly deployed to Azure, to a local server.
My application consists of one Web Role, which contains a Silverlight client for a Silverlight application.
I installed and configured windows server appfabric on the server and the server is actually ready. But I don't know how can I deploy/publish the application.
To deploy to Azure, i created the .cspkg file using the publish option in the right click on Azure application. And then deployed the generated files to Azure using azure management portal. how can i do something like that for the local server?
Windows Azure provides an emulator environment that runs on your development machine. You may either run a Windows Azure app in that emulator, or publish to Windows Azure. There's no option to deploy a Windows Azure application to Windows Server.
While some of the services offered are similar (such as cache), Windows Server AppFabric is not equivalent to the services provided by Windows Azure, and there's no equivalent fabric controller that runs on Windows Server.
EDIT: Adding clarification per #Asmaa's comments.
Building a private cloud is not the same as creating a local version of Windows Azure. The Private Cloud you reference is essentially a set of Windows Servers running virtual machines managed by Hyper-V, and some type of local storage. You'd be fully responsible for replication, disaster recovery, durable storage (where storage survives even with a disk crash), scaling, etc.
Windows Azure provides the abovementioned features, but only within its data centers. As #Avkash mentioned, there is a Windows Azure Appliance, but it there are only a handful in existence and they're huge (as in made for a data center).
If the objective is to run your code either locally or in Windows Azure, this can be done, but not by pushing the Windows Azure package to your Windows Servers. You'd need to build separate solutions to run your code in the two environments. You can reuse your core code if it's packaged correctly, but the notion of the Role Environment, Diagnostics, and other Windows Azure features would need to be replaced with something else.
One last thing: if you want to build a hybrid app, where some of it is deployed locally and some to Windows Azure, then there are certainly ways to bridge the two. See this article for more info.
The bottom line is that you can not deploy Azure Application to Windows Server machines in your own data center and David added all the info needed on this context. However, I just want to add little more as you are new to Windows Azure. I can understand why you are trying to do something like this and because I have had similar conversation with other partners in past, I believe this information is useful.
The main why you couldn't do it because Windows Azure main components i.e. Compute, Storage, Networking and other value added services which are built upon main component are just not available in your machine however, there is a lot more to it.
Windows Azure Appliance is a product which can be deployed to any Data Center and currently used by Dell, eBay, Fujitsu and HP as described in this link. Windows Azure and Windows Azure Appliance are not exactly same, however, Windows Azure Appliance does have a similar model of Compute, package deployment, Storage, Management portal and functionality. So when available to general public this could be a choice for data centers to have something similar to Azure running in their premise however it is currently available to only very limited partners.