locked
Cannot edit Web.Config RRS feed

  • Question

  • I try to find any way edit my Web.Config of my Azure Web App.

    In my wwwroot folder I don't find any web.config only one HTML:

       

    I found the rootweb.config over the Kudu Debug Console/Editor but I get "Access Denied";

    Finally I tried also the AppCmd Command on the Kudu Console and another one but I get also "Access Denied"...

    So what is the solution for this? I found this whole thing very stupid because also the IIS Manager cannot connect anymore to the Azure Web Apps and there is still no solution!




    • Edited by Michael-CM Wednesday, June 6, 2018 6:45 PM
    Wednesday, June 6, 2018 6:33 PM

Answers

  • Hey Michael

    Could you try following:

    1. Create a file named "applicationHost.xdt" with following content:

    <?xml version="1.0"?>
    	<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    	<system.webServer>
    	<security>
    	    <requestFiltering allowDoubleEscaping="true"  xdt:Transform="SetAttributes(allowDoubleEscaping)">
    	</requestFiltering>
    	</security>
    	</system.webServer>
    </configuration>


    2. Upload the file to your site folder
    3. Restart your webapp and test.



    Thursday, June 7, 2018 11:31 PM

All replies

  • Hey Michael

    Sorry for the inconvenience. Any particular reason why you'd like to modify the web.config? Generally speaking, you don't want to make live changes to your production files as best practice. With that said, have you tried using the App Service Editor? Here's ~5min video demo-ing this feature: https://www.youtube.com/watch?v=vYCHpo1wf1E

    Recommended way is to use Application Settings in the Azure Portal which will override values in your web.config file. Even better & more secure, you'd want to Use Azure Key Vault from a Web Application if possible. 

    Hope this helps! 


    Wednesday, June 6, 2018 8:28 PM
  • I want to allow DoubleEscaping:

    appcmd set config /section:requestfiltering /allowdoubleescaping:true

    Can you show me which Application Setting i have to use here to configure it (already tried this)?

    Thanks!

    Thursday, June 7, 2018 1:10 PM
  • Hey Michael

    Could you try following:

    1. Create a file named "applicationHost.xdt" with following content:

    <?xml version="1.0"?>
    	<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    	<system.webServer>
    	<security>
    	    <requestFiltering allowDoubleEscaping="true"  xdt:Transform="SetAttributes(allowDoubleEscaping)">
    	</requestFiltering>
    	</security>
    	</system.webServer>
    </configuration>


    2. Upload the file to your site folder
    3. Restart your webapp and test.



    Thursday, June 7, 2018 11:31 PM
  • Thanks it works!
    Friday, June 8, 2018 4:30 AM