Referenced file usercontrol

Published by Jayaraj on

A friend of mine placed the user controls in the /usercontrols folder of the virtual directory and added the user control reference in the default.master. When he tried to see the page in browser he got the following error.

The referenced file /usercontrols/someusercontrol.ascx is not allowed on this page.

When the same usercontrol was placed in the _Controltemplates folder of the 12 hive, things worked.

We went through the web.config and found that _controltemplates folder entry was made in the SafeControls section.

We added an entry for the usercontrols folder and things worked fine.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.