question

LarryBilodeau-9315 avatar image
0 Votes"
LarryBilodeau-9315 asked LarryBilodeau-9315 edited

Using a logic app trigger with sas for CSP reporting breaks IIS

I've created an Azure logic app as a consumer for my CSP reporting-uri for our web pages. I'm adding the CSP header using the web.config file per https://www.sitepoint.com/improving-web-security-with-the-content-security-policy/.

Problem I have is while this works with other endpoints the Azure logic app endpoint uri has a rather long SAS attached to URL and when used IIS generates a 500 error on loading.

Is there a way I can configure IIS to handle the longer string? OR Is there a way I could configure the logic app to accept a shorter URL as a trigger? Or something I can do within Azure to get around this problem?

azure-logic-appswindows-server-iispartner-center-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered LarryBilodeau-9315 edited

@LarryBilodeau-9315 If the problem is indeed due to the longer trigger URL of Logic Apps, you could front it with Azure Front Door or Azure APIM that can provide a shorter and more intuitive URL, forwarding the request to Logic Apps.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

For local content dev work destined for an IIS VM it would be nice not to need more infrastructure. Using some sort of routing service is a solution once the site is deployed into Azure.

Better still would to get the IIS team to process csp report-uri values to accept urls generated by Azure.

0 Votes 0 ·
HuryShenMSFT-3800 avatar image
0 Votes"
HuryShenMSFT-3800 answered LarryBilodeau-9315 commented

Hi @LarryBilodeau-9315 ,

For this problem, please check if the 500 error was generated by IIS or logic app. If 500 error comes from logic app, it should be something wrong inside logic app, you need to check the actions in your logic app. If 500 error was generated because some issue when IIS request the logic app url, you need to check the cause of this issue. You can use FRT to check the error details.

If you get 500 error outside IIS and the actual error is 414 The request url is too long, you can take a look of this post, I think it may help with your problem.

By the way, I'm afraid we can't set the trigger url of logic app with a short one because as far as I know we can't disable SAS of logic app url.


If the answer is helpful, please click "Accept Answer" and upvote it.


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The error is comming from IIS complaining about web.config syntax.

0 Votes 0 ·