【问题标题】:elFinder and asp.net - unable to connect to backendelFinder 和 asp.net - 无法连接到后端
【发布时间】:2012-10-25 11:59:28
【问题描述】:

我正在按照作者的安装过程进行操作,但仍然无法正常工作。我正在使用 asp.net mvc 4 和 Visual Studio 2010。

我添加了引用并将必要的配置添加到根 web.config 中。

这是我的根 web.config 文件

  <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>

添加了 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();
    }

和 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 }
        );

    }

那我做错了什么?

【问题讨论】:

    标签: jquery asp.net-mvc jquery-ui asp.net-mvc-4


    【解决方案1】:

    可能已经晚了,但请尝试修复“>”位置:

    <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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-20
      • 2018-06-14
      • 2019-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-10
      • 1970-01-01
      相关资源
      最近更新 更多