1

I have an Azure WebJob that I am publishing to an App Service. The problem I am having is that I want to target the x86 platform but when I publish the WebJob and attach to the App Service, it's always listed as x64.

I set the platform target to x86 for all of my solution configurations. There is only one solution platform. I even have RuntimeIdentifier in the publish scipt set to "win7-x86". I have no idea what I could possibly be missing.

The App Service is set to run on a 32-bit platform in the Application Settings.

James B. Nall
  • 1,088
  • 2
  • 16
  • 22

2 Answers2

2

AFAIK, the default worker process for your web app is 32-bit. In order to check the current environment of your web app, you could leverage KUDU.

For platform 32-bit:

enter image description here

For platform 64-bit:

enter image description here

Details you could access https://{your-app-name}.scm.azurewebsites.net/Env.cshtml.

For your webjob, you could use the Process explorer as follows:

For platform 32-bit:

enter image description here

For platform 64-bit:

enter image description here

In general, I would recommend you delete your existing webjob and redeploy it, then use the kudu to check the environment to narrow this issue.

Bruce Chen
  • 17,123
  • 2
  • 14
  • 27
0

There is no direct approach to find out the Webjob process bitness from the Azure Portal or KUDU console. To determine it, you would need to collect the memory dump manually from the KUDU and this blogs covers it http://jsandersblog.azurewebsites.net/2017/02/02/how-to-get-a-full-memory-dump-in-azure-app-services/

Once the memory dump is collected for the Webjob process, you would need to open it in Windbg and run the following command:

Here is the command to check the process bitness:

0:000> !peb
NUMBER_OF_PROCESSORS=4
PROCESSOR_ARCHITECTURE=x86
WEBSITE_COMPUTE_MODE=Dedicated
WEBSITE_SKU=PremiumV2

0:000> .effmach
Effective machine: x86 compatible (x86)

Alternatively, you can open (just drag and drop) the dump in the Visual studio to see this information:

enter image description here

So, Webjob was concluded to be running as x86 bit.

In my case I wanted to run it x64 bit ness and this WebJob was deployed via VSTS built pipeline and missing the Platform argument. After setting that up to x64 the Webjob now runs x64 bit successfully.

enter image description here

Samir Jain
  • 21
  • 1
  • 8