The type or namespace name 'Integration' does not exist in the namespace 'elFinder.Connector'

Oct 30, 2013 at 2:39 PM
Hey,

I would like to use the elFinder in one of my project, and I have downloaded the folder and added as reference what I found in it. But when i try to run it, it comes with the following error message : The type or namespace name 'Integration' does not exist in the namespace 'elFinder.Connector'. Clearly I am missing something but I couldn't realize what is it8.
Here is my Global.asax content:
<%@ Application Language="C#" %>
<%@ Import Namespace="elFinder.Connector" %>    
<%@ Import Namespace="Autofac" %>
<%@ Import Namespace="elFinder.Connector.Integration.Autofac" %>

<script runat="server">
    
    void Application_Start(object sender, EventArgs e) 
    {

        // register IoC
        var builder = new ContainerBuilder();
        // add other registrations...
        // add elFinder connector registration
        builder.RegisterElFinderConnector();
        // create container
        var _container = builder.Build();
        // need also to set container in elFinder module
        _container.SetAsElFinderResolver();
    }
    
    void Application_End(object sender, EventArgs e) 
    {
        //  Code that runs on application shutdown

    }
        
    void Application_Error(object sender, EventArgs e) 
    { 
        // Code that runs when an unhandled error occurs

    }

    void Session_Start(object sender, EventArgs e) 
    {
        // Code that runs when a new session is started

    }

    void Session_End(object sender, EventArgs e) 
    {
        // Code that runs when a session ends. 
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer 
        // or SQLServer, the event is not raised.

    }
       
</script>
And my web config file :
<configuration>
  
  <configSections>
    <section name="elFinder" type="elFinder.Connector.Config.AppConnectorConfig, elFinder.Connector" requirePermission="false" />
  </configSections>

  <!-- IIS6 and development server style -->
  <system.web>
    <compilation debug="false" targetFramework="4.0"/>
    <httpHandlers>
      <add verb="*" path="elfinder.connector" type="elFinder.Connector.Connector, elFinder.Connector"/>
    </httpHandlers>
  </system.web>

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


  <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.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SqlServerCe.4.0"/>
      <add name="Microsoft SQL Server Compact Edition Client Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition Client 4.0" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
    </DbProviderFactories>
  </system.data>
</configuration>
Coordinator
Oct 30, 2013 at 4:12 PM
Did you downloaded source code or compiled binary from "Downloads"? The elFinder.Connector.Integration.Autofac assembly and namespace exists only in source code form right now, so you should get the source code, compile it and then add reference to both assemblies.
Oct 31, 2013 at 11:25 AM
Hey KZmorzynski,

Thank you for your reply.
I have did what you have suggested and it seem It works ,
but now I get a different error :

JavaScript runtime error: 'elFinder' is undefined

$.fn.elfinder = function(o) {
    
    if (o == 'instance') {
        return this.getElFinder();
    }
    
    return this.each(function() {
        
        var cmd = typeof(o) == 'string' ? o : '';
        if (!this.elfinder) {
            new elFinder(this, typeof(o) == 'object' ? o : {})
        }
        
        switch(cmd) {
            case 'close':
            case 'hide':
                this.elfinder.hide();
                break;
                
            case 'open':
            case 'show':
                this.elfinder.show();
                break;
                
            case'destroy':
                this.elfinder.destroy();
                break;
        }
        
    })
}

$.fn.getElFinder = function() {
    var instance;
    
    this.each(function() {
        if (this.elfinder) {
            instance = this.elfinder;
            return false;
        }
    });
    
    return instance;
}
Coordinator
Nov 4, 2013 at 7:04 AM
And are all necessary js files included? elFinder, jQuery?