Last post Sep 24, 2018 08:49 AM by Zhi Lv - MSFT
Sep 21, 2018 11:28 AM|vijay1986|LINK
We have large application in asp.net web forms, in this application we have only one aspx page and dynamically loading the user control(ascx) based on the URL, we have around 3000 ascx controls. now we are implemented the MVC with razor view and Web
API in the same application.
It works very well in development box after we upload to test server, when hit the application very first time vbc.exe getting more memory and system hanged, please help to solve and thanks in advance.
Sep 21, 2018 12:07 PM|PatriceSc|LINK
3000 ASCX controls seems really a lot and they are likely recompiled on the fly when the app starts. Try to precompile your app :
Sep 21, 2018 12:38 PM|vijay1986|LINK
All code behind of ascx are compiled as dll and its working without any problem currently in production without MVC, after implemented MVC only it has the problem.
Is there any way to not load the MVC the ascx control (mean compile on fly)
Sep 21, 2018 04:02 PM|PatriceSc|LINK
Maybe CSHTML then or are you sure the compilation option was not altered. If fully compiled you shouldn't find any markup in your ASPX pages but just a placeholder sentence such as "do not delete this file". Not sure about ASCX.
If I remember "ASP.NET Health Monitoring" allows to track compilation events which is perhaps where you should start to track what happens.
Sep 21, 2018 06:08 PM|vijay1986|LINK
Thank you so much PatriceSc,
Yeah the ASCX files compiled and put in to the Temporary ASP.Net Folder, that time it takes more memory once i add mvc dlls in the application, otherwise its good
Sep 24, 2018 08:49 AM|Zhi Lv - MSFT|LINK
vbc.exe getting more memory and system hanged
As for this issue, you could try to build the application in release mode.
More details, please refer to the following links: