azure-worker-roles

Hangfire dashboard authorization in Azure WorkerRole OR Self Hosted application

99封情书 提交于 2019-12-11 11:48:23
问题 It is very recent that I have introduced to Hangfire, and I must say it is awesome. I am working on an application, wherein I am hosting hangfire in Azure worker role. Everything works perfect ; the hangfire configuration, job scheduling, dashboard etc. except configuring authorization to hangfire dashboard . I have added an OwinStartup class where I have configuring hangfire dashboard. I have used my custom implementation of IAuthorizationFilter and an OwinMiddleware , anticipating that user

Advantages of Azure WorkerRole vs. starting a new thread

北战南征 提交于 2019-12-11 11:08:18
问题 Can someone please summarize the advantages of creating an Azure WokerRole vs. simply starting a new thread? 回答1: By starting a new worker role instance you have all of the memory and CPU available to that instance size vs. when creating threads you'd be sharing the resources of one role for that instance size. I would say that it also depends on what you're processing. Also, I think that threading or any parallel processing only makes sense when you're using a Medium instance and up where

Antimalware for Azure Cloud Service

回眸只為那壹抹淺笑 提交于 2019-12-11 11:04:25
问题 I understand that there is way to enable Antimalware for Azure VM like below: But I don't see such option when creating a Cloud Service. There is a worker role running on Azure Cloud Service. The organization has a security rule of having Antimalware on the machines. Does a Cloud Service by default contain antimalware? 回答1: I Wish Microsoft were better at documenting their stuff. It seems that AntiMalware extension is also avialable for Cloud Services, not only Virtual Machines. But this can

How to stop Azure worker without losing any message?

佐手、 提交于 2019-12-11 10:43:19
问题 Actually, when I want to stop my worker on azure, this function is called. public override void OnStop() { if (messageProvider != null) { messageProvider.StopListening(); } base.OnStop(); } When I upgrade the worker, If there is any message beeing processed, I lose that message. Do you know how can I safely stop my worker? 回答1: You have five minutes, from the time OnStop() is called, and before OnStop() exits, to finish your current processing (whatever that means). In your case, it looks

Referencing runtime content from .ccproj (Azure SDK 2.9)

妖精的绣舞 提交于 2019-12-11 08:48:25
问题 I have a worker role that contains a reference to a few nuget packages that drop a few needed runtime files as a post-build step to the project bin folder. The problem I'm facing is that these files are not being copied over to the published worker role as they are not tracked by the worker role .csproj Worker role .csproj: ... <Import Project="[path-to-nupkg]\build\package.targets" Condition="Exists('[path-to-nupkg]\build\package.targets')" /> package.targets copy post-build resources, so

Enabling logging/debugging in Azure worker role to azure storage

主宰稳场 提交于 2019-12-11 08:29:25
问题 I have a .net project that I am trying to deploy as a worker role in Azure. I am able to publish the file directly from Visual Studio but then when the worker role runs I am getting a uncaught exception. I am attempting to enable logging to azure storage from the worker role so I can get more information on the exception but I am running into issues getting MIT configured. Can anyone provide assistance on the best way to enable this logging? 回答1: I’m not a massive fan of the recommended Azure

Will Azure find my RoleEntryPoint implementation class if that's the direct class it derives from?

雨燕双飞 提交于 2019-12-11 05:29:44
问题 Let's say I have: public abstract ServiceBase : RoleEntryPoint { ... } public MyRealService : RoleEntryPoint { ... } Will my Azure WorkerRole project be able to correctly figure out MyRealService class as the WorkerRole entry point? This used to be working well for me but now that I've updated to Azure Tooling 2.0 it doesn't hit any breakpoint so I'm not even sure what entry point class it is loading. 回答1: Problem solved. It basically had to do with some references pointing to the old 1.8.0.0

Azure: Output not as expected in Blob Write

二次信任 提交于 2019-12-11 04:36:17
问题 I am trying to write output to a text file stored in my azure container. Following is my woker role snippet for it : string copyTemp=""; copyTemp += "hi" + "\n"; copyTemp += "hello" + "\n"; if (String.IsNullOrEmpty(copyTemp)) return; using (var memoryStream = new MemoryStream()) { memoryStream.Write(System.Text.Encoding.UTF8.GetBytes(copyTemp), 0, System.Text.Encoding.UTF8.GetBytes(copyTemp).Length); memoryStream.Position = 0; blockBlob.UploadFromStream(memoryStream); } Now, when i download

Setting up Redis on Azure cloud service worker role

佐手、 提交于 2019-12-11 02:19:20
问题 I'm creating a cloud service where I have a worker role running some heavy processing in the background, for which i would like a Redis instance to be running locally on the worker. What i want to do is set up the worker role project in a way that the Redis instance is installed/configured when the worker is deployed. The redis database would be cleared on every job startup. I've looked at the MSOpenTech redis for windows with nuget installation, but i'm unsure how i would get this working on

Contents ofAzure worker role e:\approot folder disappearing on instance reboot

♀尐吖头ヾ 提交于 2019-12-11 01:50:30
问题 When a Windows Azure worker role instance is rebooted from within the Azure portal, are the contents of the e:\approot folder deleted? I have an elevated startup task which checks for the existence of a file in this folder before adding some registry settings. This has worked in the past but is now failing because the file it expects to find is no longer there following a portal-induced reboot. If I perform a 'shutdown' command from within the startup task, the instance reboots but the