IgnoreHttpsStatusCode is ignored in ARM template deployed AI web test

Jon Peterson 26 Reputation points
2022-11-03T20:05:40.027+00:00

I have the exact issue as this SO question. The gist is I want to test a resource for SSL validation. I can uncheck the HTTP Response box in the portal but cannot get the ARM template to do the same

I have tried a few permutations of these config values. Just like the SO post, the ARM template values don't seem to turn this setting off.

256991-image.png

Edit:

Here's the complete resource

257352-image.png

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,922 questions
0 comments No comments
{count} votes

Accepted answer
  1. Stanislav Zhelyazkov 21,766 Reputation points MVP
    2022-11-04T14:23:44.92+00:00

    Hi,
    Application Insights has two types of tests - Classic (ping) and Standard. Validation Rules properties are only for Standard tests. You are probably setting classic ping test and thus those are not reflected. If you want to set Standard test kind should have value 'ping' and properties.kind should have value 'standard'. properties.Configuration should be set to null or not provided at all. Keep in mind that to ignore HTTP response properties.ValidationRules.ExpectedHttpStatusCode should be set to 0. If you want to do Classic text it is harder to do that as the configuration is provided as string in xml format via properties.Configuration.WebTest property.

    Update: Forgot that there is a typo in this API. The property name is properties.ValidationRules.IgnoreHttpStatusCode . Note IgnoreHttpStatusCode not IgnoreHttpSStatusCode. No matter that the API reports that the property should be IgnoreHttpSStatusCode, it is actually IgnoreHttpStatusCode. See this thread.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful