How can we implement excel.interop services in azure? - azure

We have a web application that we have hosted as an app service in Azure.In this we are using excel.interop services. Would like to know whether we will we able to retain the same code in the application after hosting it on azure.

As far as I know, if we want to use Microsoft.Office.Interop.Excel, we should install MS office. But it seems that Azure App Service does not support it.
I recommend two workarounds:
Use Azure VM to host the application and install MS office on the Azure VM, you refer to this article.
Instead of excel.interop, use OpenXML to do it, you could refer to this article.
Hope it helpful.

You can "containerize" your application as a container and run it in App Service as a Windows Container App (this feature is still in preview).
https://azure.microsoft.com/en-us/blog/announcing-the-public-preview-of-windows-container-support-in-azure-app-service/
https://azure.microsoft.com/en-us/updates/windows-server-2019-support-added-to-public-preview-of-windows-container-support/
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-get-started-windows-container
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-windows-containers-custom-fonts

Related

C#, how to get WindowsIdentity.GetCurrent().Name from Azure application

We are trying to deploy our legacy webforms app to azure.
Our application security model is based around Window Active Directory.
1 For a site hosted in Azure, what is the equivalent c# code for this:
WindowsIdentity.GetCurrent().Name;
This articles demonstrates using "OWIN" middleware.
https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-v1-aspnet-webapp. Am i on the right track?
2 Since my localhost isn't hosted on Azure (it' running under IIS Express), what's an alternative to using this everywhere:
if (debugMode or localhost) then WindowsIdentity.GetCurrent().Name
else Azure-AD-equivalent-code.
For a site hosted in Azure, what is the equivalent c# code for this: WindowsIdentity.GetCurrent().Name;
It seems that you using the Azure WebApp service, if it is that case, unfortunately, we can't use the Windows Authentication in azure WebApp service.
Maybe Azure Web Sites Azure Actice Directy is the best option. Sync from AD to Azure Actice Directy is also quite easy to setup. Then use Azure Easy Authentication to do that.
If you still want to use the Windows Authentication, I recommand that you could use the Azure VM. You need to join the VM to your AD.

Glassfish server on Microsoft Azure

I have a web app that has been developed using Glassfish server, and am looking to change hosts to Microsoft Azure.
The trouble is, Azure appears to not support Glassfish as a web container, and instead only currently offers Jetty or Tomcat.
Unless I'm missing something, I believe I will need to convert my server to run with one of the two above options, although obviously if there is a method to run GF on Azure that's the ideal option.
Looks like there is a concept named 'worker roles' which can be used to do this.
Have a look at this article: https://blogs.msdn.microsoft.com/dachou/2011/01/17/run-java-with-glassfish-in-windows-azure/
More information:
Microsoft Azure and Glassfish
GlassFish and Java EE 6 everywhere, even in the Azure cloud!
I think you're looking at Web Apps, which doesn't include Glassfish. But that doesn't stop you from simply spinning it up in your own VMs (or web/worker role instances, assuming you can install it in an automated way, in Windows).
Note: to deploy Cloud Services (web/worker roles) you're limited to Visual Studio and Eclipse (on Windows) for creating the deployment package.

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

Window Azure vs Citrix Xenapp

Current my company delivers our software to our customers through a Citrix Xenapp Server. As administrators we are able to launch instances of the servers and our customers are only able to launch their specific application
My Question is does Windows Azure also offer this type of environment. I am looking to deploy a new version of our application and I am leaning towards Azure, but if that is the direction we go in I would like to migrate all of our existing system to Azure and not maintain both Azure and Citrix.
Greg,
In principle yes you can do this, but you can't just plug in Azure as a direct replacement for XenApp (with zero/minimal effort). Azure effectively has it's own runtime. While it is Windows based and there is certainly potential to reuse code in an existing app in an Azure equivalent, you would need to re-write your app to make it run in Azure.
Given your app is running on XenApp it is likely it is a fat client app, i.e. most of its logic lives in the main executable that you run on XenApp, with potentially some other back end services being utilised. In comparison you should think of Azure as a platform for providing web apps. So you would re-architect the app as an Azure hosted web app, then you could deploy it via Azure in a multi-tenanted manner to your customers who would then access it through a browser rather than a Citrix Receiver.
Regards,
Donovan

Accessing Azure Storage Services from Azure Websites?

I'm curious to know if this is possible, and if so, is it a good or bad idea?
We are developing an Azure application that is largely centered around worker roles that receive their work on a CloudQueue, and put the results in a CloudBlob, that the client then downloads. The web interface itself is a dead-simple ASP.NET MVC site that throws jobs in the CloudQueue, and builds URLs to download CloudBlobs.
Currently we accomplish this by having a Azure Cloud Project in our solution, which has a Web Role with the UI, and Worker Roles with the actual work.
Could we use Azure Websites to publish and host the UI, which calls back to our Worker Roles? The Azure DLLs are just regular old .NET libraries, I'm assuming Azure Websites won't have a problem with them. So, when we want to update the UI, we just publish with Visual Studio. And when we want to update the Worker Role - which is 300MB+ and has a bunch of nasty dependencies like Crystal Reports - we can build the cloud bundle and update the Cloud Service through the Azure management portal.
This seems to me like doing this would make it easier to update the UI. I think it would also be cheaper to host it, as we won't have to buy a bunch of instances for the Web Role.
If your question is "Could we use Windows Azure Websites*", based on your application architecture, you sure can use Azure Website to deploy your front end and configure all the networking connection properly so you can continue access other Azure Storage services. As you are using mostly Blob and Queue, you can continue use HTTP/HTTPS settings in the Azure websites. You can keep worker role by as it is however if it is very complex to deploy, using Windows Azure VM may be another direction to go.
I could say website deployment could be easier if your web app does not have something complex to configure in web server as websites may not be able to match web server level configuration compare to webrole and Azure VM. Answering "Easier and cheap" could be very subjective as this is all depend on load and distribution so you would have to try and evaluate it.

Resources