-
Notifications
You must be signed in to change notification settings - Fork 43
elfinder : System.NullReferenceException: Object reference not set to an instance of an object. in asp.net #8
Description
I am trying to use elFinder in my asp.net web application and it is showing the exception "System.NullReferenceException".
What I did.
Added references
elFinder.Connector.dll (Ver : 0.2.5.0)
elFinder.Connector.Integration.Autofac.dll (Ver : 1.0.0.0)
Autofac.dll (Ver : 2.6.3.862)
My project is asp.net based, so I am using windows hosting on IIS.
Below is my web.config configuration
<configuration> <configSections> <section name="elFinder" type="elFinder.Connector.Config.AppConnectorConfig, elFinder.Connector" requirePermission="false" /> </configSections> <system.web> <compilation debug="true" targetFramework="4.0"/> <httpRuntime executionTimeout="90" maxRequestLength="20480" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true"/> <pages controlRenderingCompatibilityVersion="4.0"/> <customErrors mode="Off"></customErrors> <httpHandlers> <add verb="*" path="elfinder.connector" type="elFinder.Connector.Connector, elFinder.Connector" /> </httpHandlers> </system.web> <connectionStrings> </connectionStrings> <elFinder apiVersion="2.0" localFSRootDirectoryPath="~\Images" duplicateDirectoryPattern="Copy of {0}" thumbsSize="48,48" duplicateFilePattern="Copy of {0}" localFSThumbsDirectoryPath="~\Images" rootDirectoryName="Root" uploadMaxSize="20M" defaultVolumeName="LocalFileSystem" baseUrl="http://voteadmin.localhost/Images/" baseThumbsUrl="http://voteadmin.localhost/Images/"> </elFinder> <appSettings> </appSettings> <system.webServer> <handlers> <add name="elfinder" path="elfinder.connector" type="elFinder.Connector.Connector, elFinder.Connector" verb="*" /> </handlers> <validation validateIntegratedModeConfiguration = "false" /> <modules runAllManagedModulesForAllRequests = "true" /> </system.webServer> </configuration>
Below is my client code
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div class="row-fluid"> <div class="box span12" style="position: relative;"> <div class="box-header well" data-original-title> <h2> File Manager</h2> <div class="box-icon"> </div> </div> <div class="box-content"> <div class="fileManager"></div> </div> </div> <!--/span--> </div> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server"> <script type="text/javascript" charset="utf-8"> $(document).ready(function () { $('.fileManager').elfinder({ url: 'elfinder.connector', height: 600 }); }); </script> </asp:Content>
Thank you in advance