Try our conversational search powered by Generative AI!

Disable edit/admin UI on front servers


What's the correct way to disable edit/admin UI on front servers? If there is no "correct" way, I'll settle with a good way ;-) We're on CMS 6 R2

What I would like to happen when I try to enter the UI URL is to return a regular 404. No login prompt should be shown.

Tried so far:

  • In web.config, removed <allow roles> from <authorization> element. Problem is it still gives unathorized and prompts me for a login.
  • In Episerver.config, set uiUrl to "/" and removed VirtualPaths to admin and shell. Still get a login prompt from Util.
  • In web.config, removed all <location> entries that were refering to EPiServer-specific folders. Internal Server error.


Dec 02, 2011 14:01

I would remove the virtual path providers in the episerver secion of config, at least the CMS one and possibly more if you want to disable online center etc as well.

Dec 02, 2011 14:49

Thanks, but I've already tried to remove the Virtual Path Providers... Problem is that I still get the login prompt... How do I disable online center?

Dec 05, 2011 8:33

Did you remove the corresponding locations as well?

Dec 05, 2011 9:17

Finally, with some additional assistance from EPiServer support I've managed to get a 404 when trying to access edit/admin on front servers! \o/

Just like Magnus suggested, the key is to remove the VirtualPath entries in episerver.config (~/UI/CMS/, ~/Util/, ~/WebServices, ~/UI/Shell/) AND the corresponding location entries in web.config (ui/cms and util).

Dec 21, 2011 1:36
Jan 02, 2012 10:03

Sorry Magnus, had to remove the answered flag as I've investigated a little more... Yes, the edit/admin will be disabled by these changes. But this will cause errors, since EPi adds references to the contextmenu-related JS files in the front page (which now gives 404) and JS code to wire the context menu. This doesn't look good at all from a SEO perspective (and the JS error which will follow).

In order for this solution to fully work, all EPi-references must be removed from the front server. How can this be achieved?

Edited, Jan 02, 2012 10:20

Hi Johan,

Couldn't you just remove the Util VPP and that would make it impossible to login and access the edit/admin mode as you need to be authenticated for those places? 

Whenever you tried to access admin or edit you would get redirected to the login page which would of course give you a 404 as that VPP has been removed. 

Jan 02, 2012 14:30

As Magnus pointed out, removing the appropriate sections in web.config and episerver.config will cause 404 when trying to access edit/admin... so that is fine. Problem now is that in the other end (when viewing front page), for some reason (even if I am not logged in to Episerver), he tries to load the context menu file and fail (since they also are 404)...

I don't understand why EPiServer wants to add contextmenu in this case. Is it because of the change in location tags?

Jan 02, 2012 15:08

OK did some more investigation now and it seems that this might be a bug in EPiServer.

Reflected the code for ContextMenu and realized that the criteria for the menu to be shown is that you have GET access to /edit path. Now, if we remove the VPP:s, you will get a 404 when trying to access /edit. This apparently counts as a valid GET and the menu is shown.

I am reluctant to changing the MasterPage to check whether we are on a front server and then programattically disable the context menu, but for now it seems to be the only solution.

Jan 02, 2012 17:05

Toni, I've tried to take out only the Util VPP but in some strange way Episerver still manages to redirect to /util for a login prompt. I also tried to screw up the utilUrl setting but still it seems to find its way to Util...

Surely we can't be pioneers in wanting to disable UI on front servers?...

Jan 19, 2012 0:24

If you removed the Util VPP then it shouldn't find the Util path. Unless you have a Util folder in your web root. How else is it finding where the Util folder is located? Seems impossible. And if you change the utilUrl it should use that when unauthorized users wants to access protected locations. If it uses another path, then the change hasn't gone through yet (restart IIS) or you are editing the wrong file.

Unfortunately that's the only advice I can think of. 

Jan 19, 2012 8:19

It is possible to disable edit and admin mode on a front-end server by removing parts of the web.config and episerver.config, but there does seem to be a bug in EPiServer that causes the pages to try and load the context menu. I have written a blog post on this which includes a work around for that problem.

Disable EPiServer Edit/Admin secure paths on front-end servers

Edited, May 29, 2012 18:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.