# MasterPageFile in web.config does not work

I have set a theme for this webform project in the web.config file and also a masterpagefile

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<pages  theme="themeName" masterPageFile="~/mp1.master" />
</system.web>
</configuration>


Unfortunatly this did not work. I have spend a long time searching why my application kept showing the old masterpagefile. I believe that it had to do with this checkbox:

When you publish your webform application and click on configure, you should set the checkbox near the ‘allow precompiled site to be updatable’.

Otherwise it seems that during the compilation, it will bake in the configured masterpage file in your *.aspx files.

Please let me know if I am wrong, but this did fix it for me.

Good luck!

# Manage users for webform auth missing option in Visual Studio

and then there was this stacktrace and error… I have not had this issue before. It was since the 4.6 framework was installed.

Thankfully I found this stackoverflow answer which resolves it:

in notepad++ and ctrl+g (go to) line 989 and give the string appId the value of “1” instead of the stringutil.blabla
StringUtil.GetNonRandomizedHashCode(String.Concat(appPath, appPhysPath)).ToString("x", CultureInfo.InvariantCulture);