- Visual Studio 2015
- MIT
- ASP.NET
- asp.net file manager
- 08/08/2019
File Manager Control for ASP.NET WebForms and ASP.NET MVC 3+ (.NET Framework 4.0+).
Integrate a file manager into your ASP.NET application or site rapidly.
- Browse and manage files with access control.
- Accept files with the advanced upload functionality.
- Offer a structured and neat download area.
- Preview documents (70+ file formats, including PDF & Microsoft Office), images, audios and videos.
Note: This project contains a fully working version of the product, however without a license key it will run in trial mode. For more information, please see FileUltimate: ASP.NET File Manager product page.
-
Add references to FileUltimate assemblies. There are two ways to perform this:
-
Add reference to GleamTech.Core.dll and GleamTech.FileUltimate.dll found in "Bin" folder of FileUltimate-vX.X.X.X.zip package which you already downloaded and extracted.
The other DLLs in the same folder, i.e. GleamTech.ImageUltimate.dll, GleamTech.VideoUltimate.dll and GleamTech.DocumentUltimate.dll are assemblies that FileUltimate depends on for some of the features. They are separate assemblies as they are also standalone products with the same names. MSbuild or Visual Studio will automatically copy these 3 DLLs along with the main referenced assembly GleamTech.FileUltimate.dll to your bin folder during build so they don't need to be referenced directly (unless you are using these products separately in the same project and you have a license for them). Note that even without these 3 DLLs, FileUltimate will work but it will just turn off the corresponding features such as generating image or video thumbnails or the document viewer. So with this modular approach, you can opt-out of the features you do not need by excluding the corresponding DLL, i.e. MSBuild or Visual Studio would automatically copy a dependency only if that DLL is found in the same folder as the main referenced DLL so you can simply delete/move a DLL to opt-out.
-
Or install NuGet package and add references automatically via NuGet Package Manager in Visual Studio: Go to Tools -> NuGet Package Manager -> Package Manager Console and run this command:
Install-Package FileUltimate -Source https://get.gleamtech.com/nuget/default/
If you prefer using the user interface when working with NuGet, you can also install the package this way:
-
GleamTech has its own NuGet feed so first you need to add this feed to be able to find GleamTech's packages. Go to Tools -> NuGet Package Manager -> Package Manager Settings and then click the + button to add a new package source. Enter
GleamTech
in Name field andhttps://get.gleamtech.com/nuget/default/
in Sourcefield and click OK. -
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution, select
GleamTech
orAll
in the Package source dropdown on the top right. Now enterFileUltimate
in the search field, and click Installbutton on the found package.
-
-
-
Set FileUltimate's global configuration. For example, you may want to set the license key. Insert some of the following lines (if overriding a default value is required) into the
Application_Start
method of your Global.asax.cs://Set this property only if you have a valid license key, otherwise do not //set it so FileUltimate runs in trial mode. FileUltimateConfiguration.Current.LicenseKey = "QQJDJLJP34...";
Alternatively you can specify the configuration in
<appSettings>
tag of your Web.config.<add key="FileUltimate:LicenseKey" value="QQJDJLJP34..." />
As you would notice,
FileUltimate:
prefix maps toFileUltimateConfiguration.Current
. -
Open one of your View pages (eg. Index.cshtml) and at the top of your page add the necessary namespaces:
@using GleamTech.AspNet.Mvc @using GleamTech.FileUltimate
Alternatively you can add the namespaces globally in Views/Web.config under
<system.web.webPages.razor>/<pages>/<namespaces>
tag to avoid adding namespaces in your pages every time:<add namespace="GleamTech.AspNet.Mvc" /> <add namespace="GleamTech.FileUltimate" />
Now in your page insert these lines:
<!DOCTYPE html> @{ var fileManager = new FileManager { Width = 800, Height = 600, Resizable = true };
<span class="pl-k" style="color:#d73a49">var</span> <span class="pl-en" style="color:#6f42c1">rootFolder </span>= <span class="pl-k" style="color:#d73a49">new</span> <span class="pl-en" style="color:#6f42c1">FileManagerRootFolder</span> { Name = <span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>A Root Folder<span class="pl-pds">"</span></span>, Location = <span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>~/App_Data/RootFolder1<span class="pl-pds">"</span></span> }; rootFolder.AccessControls.Add(<span class="pl-k" style="color:#d73a49">new</span> <span class="pl-en" style="color:#6f42c1">FileManagerAccessControl</span> { Path = <span class="pl-s" style="color:#032f62">@"\"</span>, AllowedPermissions = FileManagerPermissions.Full }); fileManager.RootFolders.Add(rootFolder);
} <html> <html> <head> <title>File Manager</title> @this.RenderHead(fileManager) </head> <body> @this.RenderBody(fileManager) </body> </html>
This will render a file manager control in the page which displays one root folder named "A Root Folder" which points to "~/App_Data/RootFolder1" with Full permissions.
-
Add references to FileUltimate assemblies. There are two ways to perform this:
-
Add reference to GleamTech.Core.dll and GleamTech.FileUltimate.dll found in "Bin" folder of FileUltimate-vX.X.X.X.zip package which you already downloaded and extracted.
The other DLLs in the same folder, i.e. GleamTech.ImageUltimate.dll, GleamTech.VideoUltimate.dll and GleamTech.DocumentUltimate.dll are assemblies that FileUltimate depends on for some of the features. They are separate assemblies as they are also standalone products with the same names. MSbuild or Visual Studio will automatically copy these 3 DLLs along with the main referenced assembly GleamTech.FileUltimate.dll to your bin folder during build so they don't need to be referenced directly (unless you are using these products separately in the same project and you have a license for them). Note that even without these 3 DLLs, FileUltimate will work but it will just turn off the corresponding features such as generating image or video thumbnails or the document viewer. So with this modular approach, you can opt-out of the features you do not need by excluding the corresponding DLL, i.e. MSBuild or Visual Studio would automatically copy a dependency only if that DLL is found in the same folder as the main referenced DLL so you can simply delete/move a DLL to opt-out.
-
Or install NuGet package and add references automatically via NuGet Package Manager in Visual Studio: Go to Tools -> NuGet Package Manager -> Package Manager Console and run this command:
Install-Package FileUltimate -Source https://get.gleamtech.com/nuget/default/
If you prefer using the user interface when working with NuGet, you can also install the package this way:
-
GleamTech has its own NuGet feed so first you need to add this feed to be able to find GleamTech's packages. Go to Tools -> NuGet Package Manager -> Package Manager Settings and then click the + button to add a new package source. Enter
GleamTech
in Name field andhttps://get.gleamtech.com/nuget/default/
in Sourcefield and click OK. -
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution, select
GleamTech
orAll
in the Package source dropdown on the top right. Now enterFileUltimate
in the search field, and click Installbutton on the found package.
-
-
-
Set FileUltimate's global configuration. For example, you may want to set the license key. Insert some of the following lines (if overriding a default value is required) into the
Application_Start
method of your Global.asax.cs://Set this property only if you have a valid license key, otherwise do not //set it so FileUltimate runs in trial mode. FileUltimateConfiguration.Current.LicenseKey = "QQJDJLJP34...";
Alternatively you can specify the configuration in
<appSettings>
tag of your Web.config.<add key="FileUltimate:LicenseKey" value="QQJDJLJP34..." />
As you would notice,
FileUltimate:
prefix maps toFileUltimateConfiguration.Current
. -
Open one of your pages (eg. Default.aspx) and at the top of your page add add the necessary namespaces:
<%@ Register TagPrefix="GleamTech" Namespace="GleamTech.FileUltimate" Assembly="GleamTech.FileUltimate" %>
Alternatively you can add the namespaces globally in Web.config under
<system.web>/<pages>/<controls>
tag to avoid adding namespaces in your pages every time:<add tagPrefix="GleamTech" namespace="GleamTech.FileUltimate" assembly="GleamTech.FileUltimate" />
Now in your page insert these lines:
<!DOCTYPE html> <html> <head runat="server"> <title>Document Viewer</title> </head> <body> <GleamTech:FileManagerControl ID="fileManager" runat="server" Width="800" Height="600" Resizable="True">
<<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerRootFolder</span> <span class="pl-e" style="color:#6f42c1">Name</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>A Root Folder<span class="pl-pds">"</span></span> <span class="pl-e" style="color:#6f42c1">Location</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>~/App_Data/RootFolder1<span class="pl-pds">"</span></span> > <<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerAccessControl</span> <span class="pl-e" style="color:#6f42c1">Path</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>\<span class="pl-pds">"</span></span> <span class="pl-e" style="color:#6f42c1">AllowedPermissions</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>Full<span class="pl-pds">"</span></span>/> </<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerRootFolder</span>> </<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerControl</span>> </<span class="pl-ent" style="color:#22863a">body</span>>
</html>
This will render a file manager control in the page which displays one root folder named "A Root Folder" which points to "~/App_Data/RootFolder1" with Full permissions.
FileUltimate does not depend on any Web.config settings to work (it's config-free for easy deployment). However if you want to support the lowest level upload method Html4 which is the only possible method for old browsers without Html5 or Flash or Silverlight support, then you will need to increase the request limits (ASP.NET's default is 4MB) so that you can upload files larger than 4MB on these browsers. Edit your project's Web.config file and add the following settings inside <configuration> tag:
<!-- Html4 upload method requires the limits to be set to the maximum value (2 GB). Other upload methods use chunking so there is no 2GB limit for them. --> <location path="fileuploader.ashx"> <system.webServer> <security> <requestFiltering> <!-- Maximum value for maxAllowedContentLength (in bytes) is 2147483648 (2GB). maxAllowedContentLength should be always equal to (or greater than) maxRequestLength x 1024. --> <requestLimits maxAllowedContentLength="2147483648"/> </requestFiltering> </security> </system.webServer> <system.web> <!-- Maximum value for maxRequestLength (in kilobytes) is 2097152 (2GB) --> <httpRuntime maxRequestLength="2097152"/> </system.web> </location>
-
Add references to FileUltimate assemblies. There are two ways to perform this:
-
Add reference to GleamTech.Core.dll and GleamTech.FileUltimate.dll found in "Bin" folder of FileUltimate-vX.X.X.X.zip package which you already downloaded and extracted.
The other DLLs in the same folder, i.e. GleamTech.ImageUltimate.dll, GleamTech.VideoUltimate.dll and GleamTech.DocumentUltimate.dll are assemblies that FileUltimate depends on for some of the features. They are separate assemblies as they are also standalone products with the same names. MSbuild or Visual Studio will automatically copy these 3 DLLs along with the main referenced assembly GleamTech.FileUltimate.dll to your bin folder during build so they don't need to be referenced directly (unless you are using these products separately in the same project and you have a license for them). Note that even without these 3 DLLs, FileUltimate will work but it will just turn off the corresponding features such as generating image or video thumbnails or the document viewer. So with this modular approach, you can opt-out of the features you do not need by excluding the corresponding DLL, i.e. MSBuild or Visual Studio would automatically copy a dependency only if that DLL is found in the same folder as the main referenced DLL so you can simply delete/move a DLL to opt-out.
-
Or install NuGet package and add references automatically via NuGet Package Manager in Visual Studio: Go to Tools -> NuGet Package Manager -> Package Manager Console and run this command:
Install-Package FileUltimate -Source https://get.gleamtech.com/nuget/default/
If you prefer using the user interface when working with NuGet, you can also install the package this way:
-
GleamTech has its own NuGet feed so first you need to add this feed to be able to find GleamTech's packages. Go to Tools -> NuGet Package Manager -> Package Manager Settings and then click the + button to add a new package source. Enter
GleamTech
in Name field andhttps://get.gleamtech.com/nuget/default/
in Sourcefield and click OK. -
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution, select
GleamTech
orAll
in the Package source dropdown on the top right. Now enterFileUltimate
in the search field, and click Installbutton on the found package.
-
-
-
Set FileUltimate's global configuration. For example, you may want to set the license key. Insert some of the following lines (if overriding a default value is required) into the
Application_Start
method of your Global.asax.cs://Set this property only if you have a valid license key, otherwise do not //set it so FileUltimate runs in trial mode. FileUltimateConfiguration.Current.LicenseKey = "QQJDJLJP34...";
Alternatively you can specify the configuration in
<appSettings>
tag of your Web.config.<add key="FileUltimate:LicenseKey" value="QQJDJLJP34..." />
As you would notice,
FileUltimate:
prefix maps toFileUltimateConfiguration.Current
. -
Open one of your View pages (eg. Index.cshtml) and at the top of your page add the necessary namespaces:
@using GleamTech.AspNet.Mvc @using GleamTech.FileUltimate
Alternatively you can add the namespaces globally in Views/Web.config under
<system.web.webPages.razor>/<pages>/<namespaces>
tag to avoid adding namespaces in your pages every time:<add namespace="GleamTech.AspNet.Mvc" /> <add namespace="GleamTech.FileUltimate" />
Now in your page insert these lines:
<!DOCTYPE html> @{ var fileManager = new FileManager { Width = 800, Height = 600, Resizable = true };
<span class="pl-k" style="color:#d73a49">var</span> <span class="pl-en" style="color:#6f42c1">rootFolder </span>= <span class="pl-k" style="color:#d73a49">new</span> <span class="pl-en" style="color:#6f42c1">FileManagerRootFolder</span> { Name = <span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>A Root Folder<span class="pl-pds">"</span></span>, Location = <span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>~/App_Data/RootFolder1<span class="pl-pds">"</span></span> }; rootFolder.AccessControls.Add(<span class="pl-k" style="color:#d73a49">new</span> <span class="pl-en" style="color:#6f42c1">FileManagerAccessControl</span> { Path = <span class="pl-s" style="color:#032f62">@"\"</span>, AllowedPermissions = FileManagerPermissions.Full }); fileManager.RootFolders.Add(rootFolder);
} <html> <html> <head> <title>File Manager</title> @this.RenderHead(fileManager) </head> <body> @this.RenderBody(fileManager) </body> </html>
This will render a file manager control in the page which displays one root folder named "A Root Folder" which points to "~/App_Data/RootFolder1" with Full permissions.
-
Add references to FileUltimate assemblies. There are two ways to perform this:
-
Add reference to GleamTech.Core.dll and GleamTech.FileUltimate.dll found in "Bin" folder of FileUltimate-vX.X.X.X.zip package which you already downloaded and extracted.
The other DLLs in the same folder, i.e. GleamTech.ImageUltimate.dll, GleamTech.VideoUltimate.dll and GleamTech.DocumentUltimate.dll are assemblies that FileUltimate depends on for some of the features. They are separate assemblies as they are also standalone products with the same names. MSbuild or Visual Studio will automatically copy these 3 DLLs along with the main referenced assembly GleamTech.FileUltimate.dll to your bin folder during build so they don't need to be referenced directly (unless you are using these products separately in the same project and you have a license for them). Note that even without these 3 DLLs, FileUltimate will work but it will just turn off the corresponding features such as generating image or video thumbnails or the document viewer. So with this modular approach, you can opt-out of the features you do not need by excluding the corresponding DLL, i.e. MSBuild or Visual Studio would automatically copy a dependency only if that DLL is found in the same folder as the main referenced DLL so you can simply delete/move a DLL to opt-out.
-
Or install NuGet package and add references automatically via NuGet Package Manager in Visual Studio: Go to Tools -> NuGet Package Manager -> Package Manager Console and run this command:
Install-Package FileUltimate -Source https://get.gleamtech.com/nuget/default/
If you prefer using the user interface when working with NuGet, you can also install the package this way:
-
GleamTech has its own NuGet feed so first you need to add this feed to be able to find GleamTech's packages. Go to Tools -> NuGet Package Manager -> Package Manager Settings and then click the + button to add a new package source. Enter
GleamTech
in Name field andhttps://get.gleamtech.com/nuget/default/
in Sourcefield and click OK. -
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution, select
GleamTech
orAll
in the Package source dropdown on the top right. Now enterFileUltimate
in the search field, and click Installbutton on the found package.
-
-
-
Set FileUltimate's global configuration. For example, you may want to set the license key. Insert some of the following lines (if overriding a default value is required) into the
Application_Start
method of your Global.asax.cs://Set this property only if you have a valid license key, otherwise do not //set it so FileUltimate runs in trial mode. FileUltimateConfiguration.Current.LicenseKey = "QQJDJLJP34...";
Alternatively you can specify the configuration in
<appSettings>
tag of your Web.config.<add key="FileUltimate:LicenseKey" value="QQJDJLJP34..." />
As you would notice,
FileUltimate:
prefix maps toFileUltimateConfiguration.Current
. -
Open one of your pages (eg. Default.aspx) and at the top of your page add add the necessary namespaces:
<%@ Register TagPrefix="GleamTech" Namespace="GleamTech.FileUltimate" Assembly="GleamTech.FileUltimate" %>
Alternatively you can add the namespaces globally in Web.config under
<system.web>/<pages>/<controls>
tag to avoid adding namespaces in your pages every time:<add tagPrefix="GleamTech" namespace="GleamTech.FileUltimate" assembly="GleamTech.FileUltimate" />
Now in your page insert these lines:
<!DOCTYPE html> <html> <head runat="server"> <title>Document Viewer</title> </head> <body> <GleamTech:FileManagerControl ID="fileManager" runat="server" Width="800" Height="600" Resizable="True">
<<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerRootFolder</span> <span class="pl-e" style="color:#6f42c1">Name</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>A Root Folder<span class="pl-pds">"</span></span> <span class="pl-e" style="color:#6f42c1">Location</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>~/App_Data/RootFolder1<span class="pl-pds">"</span></span> > <<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerAccessControl</span> <span class="pl-e" style="color:#6f42c1">Path</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>\<span class="pl-pds">"</span></span> <span class="pl-e" style="color:#6f42c1">AllowedPermissions</span>=<span class="pl-s" style="color:#032f62"><span class="pl-pds">"</span>Full<span class="pl-pds">"</span></span>/> </<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerRootFolder</span>> </<span class="pl-ent" style="color:#22863a">GleamTech:FileManagerControl</span>> </<span class="pl-ent" style="color:#22863a">body</span>>
</html>
This will render a file manager control in the page which displays one root folder named "A Root Folder" which points to "~/App_Data/RootFolder1" with Full permissions.
FileUltimate does not depend on any Web.config settings to work (it's config-free for easy deployment). However if you want to support the lowest level upload method Html4 which is the only possible method for old browsers without Html5 or Flash or Silverlight support, then you will need to increase the request limits (ASP.NET's default is 4MB) so that you can upload files larger than 4MB on these browsers. Edit your project's Web.config file and add the following settings inside <configuration> tag:
<!-- Html4 upload method requires the limits to be set to the maximum value (2 GB). Other upload methods use chunking so there is no 2GB limit for them. --> <location path="fileuploader.ashx"> <system.webServer> <security> <requestFiltering> <!-- Maximum value for maxAllowedContentLength (in bytes) is 2147483648 (2GB). maxAllowedContentLength should be always equal to (or greater than) maxRequestLength x 1024. --> <requestLimits maxAllowedContentLength="2147483648"/> </requestFiltering> </security> </system.webServer> <system.web> <!-- Maximum value for maxRequestLength (in kilobytes) is 2097152 (2GB) --> <httpRuntime maxRequestLength="2097152"/> </system.web> </location>