我正在关注作者安装程序,但我仍然无法使用它。我正在使用asp.net mvc 4和visual studio 2010。
我添加了引用并将必要的配置添加到root 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 }
);
}
那么我做错了什么?
答案 0 :(得分:0)
可能会迟到,但请尝试修复'&gt;'位置:
<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>