Unable to connect to backend. Backend not found.

Feb 17, 2016 at 11:24 AM
Edited Feb 17, 2016 at 11:25 AM
I have done all the configuration as said
i have downloaded the mvc test and it works fine
but it doent work when i am integrating it with new solution
getting an error
"Unable to connect to backend.
Backend not found."

i have taken the dll from the mvctest project which is working properly

Here's my configuration
web.config
<configuration>
  <configSections>
    <section name="elFinder" type="elFinder.Connector.Config.AppConnectorConfig, elFinder.Connector" requirePermission="false" />
  </configSections>
  
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>

  <elFinder apiVersion="2.0"
    localFSRootDirectoryPath="c:\users"
    localFSThumbsDirectoryPath="c:\users\.thumbs"
    rootDirectoryName="Root"
    uploadMaxSize="20M"
    defaultVolumeName="LocalFileSystem"
    baseUrl="http://localhost:55470/data/"
    baseThumbsUrl="http://localhost:55470/data/.thumbs/"
    duplicateFilePattern="Copy of {0}"
    duplicateDirectoryPattern="Copy of {0}"
    thumbsSize="48,48">
  </elFinder>

  <system.web>
    <compilation debug="true" targetFramework="4.0" >
    </compilation>
    <httpHandlers>
      <add verb="*" path="elfinder.connector" type="elFinder.Connector.Connector, elFinder.Connector"/>
    </httpHandlers> 

    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
      </namespaces>
    </pages>
  </system.web>

  <system.webServer>
    <handlers>
      <add name="elfinder" path="elfinder.connector" type="elFinder.Connector.Connector, elFinder.Connector" verb="*" />
    </handlers>

    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Global.asax
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using elFinder.Connector;
using Autofac;
using elFinder.Connector.Integration.Autofac;

namespace MvcApplication2
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801
    public class MvcApplication : System.Web.HttpApplication
    {
        private static IContainer _container;

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            // register IoC
            var builder = new ContainerBuilder();
            builder.RegisterElFinderConnectorDefault();
            _container = builder.Build();
            // need also to set container in elFinder module
            _container.SetAsElFinderDependencyResolver();
        }
    }
}
index.cshtml
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div class="fileManager">finder</div>   

 <script type="text/javascript" charset="utf-8">
     $(function () {
         $('.fileManager').elfinder({
             url: '/elfinder.connector',
             height: 600
         });
     });
</script>
Get an javascript error
"NetworkError: 404 Not Found - http://localhost:54904/elfinder.connector?cmd=open&target=&init=1&tree=1&_=1455711119143"
Can you please help me i m struggling to fix it from a week
Feb 17, 2016 at 12:23 PM
Edited Feb 17, 2016 at 12:23 PM
Sorry I have identified the problem

It was with the route.config


Thanks.
Marked as answer by ganeshguin on 2/17/2016 at 5:23 AM