Posted on: 8/21/2013 11:02:57 AM | Views : 654

Hi, I'm trying to force a 404 on anonymous visitors accessing the v4.master in SharePoint 2010 via a user control.  This all works well and provides the desired '404' in IE and Chrome, however Firefox and Safari both display a blank page - viewing the source on this blank page, shows no source at all. Obviously these browsers handle this differently, can anyone advise what I need to do to achieve the same behaviour? Code below: 
public partial class RedirectControl : UserControl { protected void Page_Load(object sender, EventArgs e) { SPWeb web = SPContext.Current.Web; if (web.CurrentUser == null) { string host = Request.Url.Host; URLCheck(host); } } public void URLCheck(string strHost) { if (strHost == "mysite") { Respons ...

Go to the complete details ...