- Home
- Forum
- ASP.NET MVC
- Published website to host - Out of Memory Exception thrown
Published website to host - Out of Memory Exception thrown
Exception of type 'System.OutOfMemoryException' was thrown.
Thanks for contacting Syncfusion support.
We checked with the bundled Syncfusion script files and CSS files in sample and its works fine on the IIS host. We did not face any exception while running the sample.
Please find the code example :
|
public static void RegisterBundles(BundleCollection bundles) {
---------------------------------- bundles.Add(new ScriptBundle("~/Scripts").Include( "~/Scripts/ej.web.all.min.js", "~/Scripts/ej.unobtrusive.min.js")); bundles.Add(new StyleBundle("~/Themes").Include( "~/Themes/default-theme/ej.widgets.all.min.css")); |
Sample: http://www.syncfusion.com/downloads/support/forum/123684/ze/EJGrid295665063
The mentioned exception occurs due to memory fragmentation. This also occurs when loading huge data to memory stream and your system memory is not capable of storing so much of data. To resolve the issue, we have to clean the temp folder and cache before running the sample.
For more information, refer to the below link,
https://support.microsoft.com/en-in/kb/909678
Please try the attached sample and still if you face any issue, please provide the following details
Please refer to the following code example.
|
[ej.widgets.all.min.css] @import url("../ej.widgets.core.min.css"); @import url("ej.theme.min.css"); bundles.Add(new StyleBundle("~/Content/css").Include( ... "~/ejThemes/ej.widgets.core.min.css", "~/ejThemes/default-theme/ej.theme.min.css", ... ); |
In other way, if you need to refer “ej.widgets.all.min.css” file, then it add as a separate bundle by applying a CssRewriteUrlTransformation in it. Please refer to the following code example.
|
bundles.Add(new StyleBundle("~/Content/ej").Include( "~/ejThemes/default-theme/ej.widgets.all.min.css", new CssRewriteUrlTransform() )); |
Regards,
Prasanna Kumar N.S.V
The files are large and since the widgets.all is very large, how do I bundle conditionally to include only Grid or schedule based on what controls there are on the page. for e.g. can I control the bundling in the child or partial views on which scripts load.
thanks
Hi, I have an issue where the loading very slow, or in shared web hosting, if there are 10 to 20 users looking at a grid with data, I get memory exception errors. You can also see this in VS 2015 application insights view.
The files are large and since the widgets.all is very large, how do I bundle conditionally to include only Grid or schedule based on what controls there are on the page. for e.g. can I control the bundling in the child or partial views on which scripts load.
thanks
Query : “How can i use a smaller set of JavaScript files and not load the ej.web.all.min.js?”
We can generate custom scripts for the specified Syncfusion controls using Custom Script Generator, which will reduce the size of script files.
Please refer to the following UG document for Getting Started to Custom Script Generator.
Link : http://help.syncfusion.com/js/custom-script-generator#getting-started-with-custom-script-generator
Also include the following scripts
|
<link rel='nofollow' href="Style/ej.widget.default-theme.min.css" rel="stylesheet" /> <script src="scripts/jquery-1.10.2.min.js">script> |
Refer to the below link to generate custom script.
Link : http://csg.syncfusion.com/
Note : In the Custom Script Generator, we can create a selected theme file.
Regards,
Prasanna Kumar N.S.V
- 6 Replies
- 3 Participants
-
CK Cindy Kee
- Apr 11, 2016 03:57 AM UTC
- Apr 18, 2016 09:56 AM UTC