unable to connect to backend

Oct 25, 2012 at 11:54 AM

hi, 

 

I'm following your installation procedure, but I still can't have it working. I'm using asp.net mvc 4 and visual studio 2010.

I added the reference and added the necessary configuration into the root web.config.

Here is my root web.config file

 

  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <section name="elFinder" type="elFinder.Connector.Config.AppConnectorConfig, elFinder.Connector" requirePermission="false" />
  </configSections>
  <elFinder apiVersion="2.0"
    localFSRootDirectoryPath="C:\SVN\DataExport\Wellman\Wellman\Upload"
    localFSThumbsDirectoryPath="C:\SVN\DataExport\Wellman\Wellman\Upload\.thumbs"
    rootDirectoryName="Root"
    uploadMaxSize="20M"
    defaultVolumeName="LocalFileSystem"
    baseUrl="http://localhost:57014/upload/"
    baseThumbsUrl="http://localhost:57014/upload/.thumbs/">
    duplicateFilePattern="Copy of {0}"
    duplicateDirectoryPattern="Copy of {0}"
    thumbsSize="48,48"
  </elFinder>

added the global.asax

    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            //ControllerBuilder.Current.DefaultNamespaces.Add("Wellman.Controllers");

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            // register IoC
            var builder = new ContainerBuilder();
            // add other registrations...
            // add elFinder connector registration
            builder.RegisterElFinderConnector();
            // create container
            IContainer _container = builder.Build();
            // need also to set container in elFinder module
            _container.SetAsElFinderResolver();
        }

and the routeconfig.cs

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("elfinder.connector");

            routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

            routes.MapRoute(
                name: "LogOff",
                url: "logout/{id}",
                defaults: new { controller = "Account", action = "LogOff", id = UrlParameter.Optional }
            );
            
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Dashboard", action = "Index", id = UrlParameter.Optional }
            );

        }

So what am I doing wrong?

Coordinator
Oct 25, 2012 at 12:10 PM

Hi,

check your web.config, because it looks like

<elFinder>
section is not closed properly:

  <elFinder apiVersion="2.0"
    ...
    baseThumbsUrl="http://localhost:57014/upload/.thumbs/">  <------ this '>' shouldn't be here
    duplicateFilePattern="Copy of {0}"
    duplicateDirectoryPattern="Copy of {0}"
    thumbsSize="48,48"  				     <----- '>' should be here
  </elFinder>

 

best,

Chris

Oct 25, 2012 at 12:17 PM

still can't connect to back end. 

Am I missing something?

I also configure the folder to be access able

  <location path="Upload">
    <system.web>
      <authorization>
        <allow users="*"  />
      </authorization>
    </system.web>
  </location>

This is my handler

  <system.webServer>
    <directoryBrowse enabled="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
    <handlers>
      <add name="elfinder" path="elfinder.connector" type="elFinder.Connector.Connector, elFinder.Connector" verb="*" />
    </handlers>
  </system.webServer>

Coordinator
Oct 25, 2012 at 12:22 PM

What error exactly you get? 404 not found? What happens if you naviage to http://<you-website>/elfinder.connector?

Also, are you setting this up on IIS7 or Web Development Server included in VS2010? If you are using it on Web Development Server then you should also add handler to <httpHandlers> of <system.web> because Web Development Server (and IIS6) uses this section instead of <system.webServer> (which is used by IIS7):

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

Oct 25, 2012 at 12:37 PM

it worked , thanks!