These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

HTTP 500 Error with Ver. 3.6(current ver)

Hello,

Trying to migrate over to the 3.6 ver. of FileUltimate and I'm getting a http 500 error Response Content type is not application/json.  Has anyone seen this?  I'm sure it's something simple I'm missing.
Jonathan Emmett 5/28/2013 7:08 AM
Hi Jonathan,
I can guess what causes your problem.
I remember that we implemented AD authentication for your project and edited Global.asax for ignoring some requests in Application_AcquireRequestState method. It was something like

if (!Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/fileAccess.aspx"), StringComparison.OrdinalIgnoreCase)
                && !Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/fileultimate/"), StringComparison.OrdinalIgnoreCase))
                return;


In v3.6, FileUltimate related requests do no longer start with /fileultimate, instead they are either filemanager.ashx or fileuploader.ashx so you should use something like this

if (!Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/fileAccess.aspx"), StringComparison.OrdinalIgnoreCase)
                && !Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/filemanager.ashx "), StringComparison.OrdinalIgnoreCase)
                && !Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/fileuploader.ashx"), StringComparison.OrdinalIgnoreCase))
                return;
Cem Alacayir 5/28/2013 7:54 AM
Hey Cem,

We actually commented that out ( we and as in you and I ), so I don't think that is the issue.  I could very well be wrong. 

Here is my global.asax:

using System;
using System.Security.Principal;
using System.Threading;
using System.Web;
using System.Web.Configuration;
using System.Web.SessionState;
using System.Web.Security;

namespace CelltronInternal 
{
    public class Global : HttpApplication
    {
        
        protected void Application_Start(object sender, EventArgs e)
        {

        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {
     
        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {
            Session.Abandon();
        }

        protected void Application_AcquireRequestState(object sender, EventArgs e)        
        {
            //System.Diagnostics.Debug.WriteLine("Application_AcquireRequestState");

            /*
            if (!Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/fileAccess.aspx"), StringComparison.OrdinalIgnoreCase)
                && !Request.RawUrl.StartsWith(Server.MapPath("~/FileUltimate/fileultimate/"), StringComparison.OrdinalIgnoreCase))
                return;
            */

            ActiveDirectoryAuthManager.ImpersonateLoggedonUser();
        }

        protected void Application_PostRequestHandlerExecute(object send, EventArgs e)
        {
            ActiveDirectoryAuthManager.UndoImpersonateLoggedonUser();
        }
 
        protected void Application_End(object sender, EventArgs e)
        {
                
        }
    }
}
Jonathan Emmett 5/28/2013 8:07 AM
Hey Cem,

That seems to work, I'll upload tonight and see if I can still access from home.  I can't remember honestly why we commented it out the first go around.. 
Jonathan Emmett 5/28/2013 10:02 AM