ASP.Net inside Wordpress on Azure ASP.Net inside Wordpress on Azure wordpress wordpress

ASP.Net inside Wordpress on Azure


Ive finally managed to work it out

I went to the azure kudu console for the app, and edited the root web.config file, and added a rule to make sure Wordpress completely ignored the subdirectory

<rule name="dataapp" stopProcessing="true">            <match url="^aspapp/*"/>            <action type="None" />        </rule>        <rule name="WordPress: http://earselectric.azurewebsites.net" patternSyntax="Wildcard">            <match url="*"/>                <conditions>                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>                </conditions>            <action type="Rewrite" url="index.php"/>        </rule>

The first rule is the one i added, and it made sure that all requests to the aspapp virtual directory were ignored - allowing the ASP.net app to handle all requests - perfect


In your Azure Web App, you need to go to Application Settings and configure the Virtual Directory for your app and mark it as a Virtual Application by checking the box. This will allow you to run an ASP.NET website, within a sub-folder, of the parent / host web site in Azure App Service.