CKFinder ConnectorBuilder is raising a generic type definition exception on startup of asp.net mvc web application

311 Views Asked by At

I have an ASP.NET MVC application with CkEditor i was integrating CKFinder to the editor. I Used the Nuget to install the CKFinder. Everything was installed successfully, I followed the configuration found on https://ckeditor.com/docs/ckfinder/ckfinder3-net/integration.html#integration_existing_application. Below is the code I added in the Startup.cs as mentioned by the tutorial. However, when I try to run the application I get the following error.

Type CKSource.CKFinder.Connector.Core.Commands.JsonParamtersBase`1[T] is a generic type definition

at the line

var connector = connectorBuilder.Build(connectorFactory);

private static void SetupConnector(IAppBuilder app)
    {
       
        var connectorFactory = new OwinConnectorFactory();
        var connectorBuilder = new ConnectorBuilder();
      


        connectorBuilder               
            .LoadConfig()
            .SetRequestConfiguration(
                (request, config) =>
                {
                    config.LoadConfig();

                   
                    config.AddBackend("default", new LocalStorage(@"~/Upload/"));
                    config.AddResourceType("images", builder => builder.SetBackend("default", "images"));
                    config.AddAclRule(new AclRule(
                        new StringMatcher("*"),
                        new StringMatcher("*"),
                        new StringMatcher("*"),
                        new Dictionary<Permission, PermissionType> { { Permission.All, PermissionType.Allow } }));
                    
                    var defaultBackend = config.GetBackend("default");
                    var keyValueStoreProvider = new FileSystemKeyValueStoreProvider(defaultBackend);
                    config.SetKeyValueStoreProvider(keyValueStoreProvider);
                }
            );

       
        var connector = connectorBuilder.Build(connectorFactory);           
        app.UseConnector(connector);
    }

Stack Trace

If I disabled the Owin and I tried to run the application the CKEditor gives me an error and cannot find the connector's path.

Does anyone have any idea what could be the issue or how to resolve this?

Thank you in advance.

0

There are 0 best solutions below