.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Web Q&A: Releasing Memory in JScript, Bulkload Problems, and More

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

More Related Resource Links

Visual Studio 2008 Memory problems


My memory in task manager reaches about 900,000K  and I don't know why it does this. Definately slows everything down, especially when I rebuild my tableAdapters, takes about 30 seconds sometimes to rebuild the project.

SQL Server not releasing memory back!

Hi Guys,   I have done enough research on this topic and understood that SQL Server loves to cache as much memory as it can get hold of , but did not find a straight forward answer to my problem.   To explain things in detail, We are currently using SQL Server 2005 (64 Bit) on Windows 2003 (64 Bit) with 32 GB of RAM. This morning when I checked, it was showing the memory as 1GB RAM.  As soon as I stopped and restarted SQL Sever, I got back all 31GB of it! This is a live mirrored server, and the data is exposed through a .NET Win Application. Also, this is a dedicated SQL Server.   The min and max memory of the SQL Server is set at 16 and 2147483647 respectively.   My questions: 1. What can be done to make SQL Server release the memory back once the process is complete?   2. If this involves setting a limit to the max memory of the SQL Server, what can it be set to? And does setting the max memory low affect the performance of server?   3. I have other servers that are not dedicated SQL Servers which are showing the same 'memory' related problems, what should be the max memory setting on these ?   Any help in this regard is deeply appreciated.   Little_Birdie.

Not Releasing memory in sql server 2008 R2

HI I have a server with 8 Gb Ram I installed Sql server 2008 R2 Enterprise Edition on 64 bit platform Enterprise edition,in that for Sql server I allocated 6 GB of Ram I enable the AWE oprtion as well but in processing time it taking above 6 Gb ram like 7.gb or more after query completing its not release the memory how can I resolve this issue. Actually when we running quries it taking the memory and memory increasing gradually after executing the query its not releasing the memory per example I set maximum 6 GB per Sql server then I run the query memory will increase gradually like 3.4 gb,3.7 gb, 4.5gb,and so on it will reach 7.56gb then after it steadily over there not come to down I am using X64 bit windows server 2008 sql server 2008 R2. My system configuration is sql server 2008R2(10.0.3798) windows server 2008 X64 Ram is 8GB

Releasing memory for vm purposes


Other than faking memory pressure to get sql to release memory, is there any other way to quickly release memory?


My issue is I do large imports every few nights.  This spikes my memory, but once the import is complete, I no longer need immediate access to that table, so I can release the memory.  However there's no way for sql server to do that apparently other than having the os pressure it to release it by temporarily running another memory consuming process.


I know what you'll say, if the os doesn't need it, why release it?  Because I have multiple virtual machines working with a set memory pool size.  If I have one box taking up 16gb of my pool, the other machines will suffer, and that one machine will have no idea that it needs to release the memory, even if it is not actively using it.

problems running exe as an embedded resource from memory

i'm having some problems running exe from an embedded resource in memory
 public class Searcher
    public static void RunSearch(string path, string text)
      //Get the current assembly
      Assembly assembly = Assembly.GetExecutingAssembly();

      //Get the resource stream
      Stream resourceStream = assembly.GetManifestResourceStream("App.Utils.Search.exe");

      //Verify the internal exe exists
      if (resourceStream == null) return;

      //Read the raw bytes of the resource
      byte[] resourcesBuffer = new byte[resourceStream.Length];


Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

How to detect and avoid memory and resources leaks in .NET application

Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

file upload in chunks or not buffering in memory before writing to disk?


What are the options for handling file uploads to reduce the memory footprint?  Is there a way to upload in chunks?  Is there a way to stream upload directly to disk instead of loading entire file in server memory?


Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Any plans on releasing the source code for WebMatrix itself?


I tried reflecting into WebMatrix.exe but was unable.  I'm interested on how you integrated the WPF Ribbon & the Office-style sidebar.

Problems with Forms Authentication in DD 4 site


Hello,  I am seeing a strange problem with Forms Authentication in my DD site.   A user logs into and can view/edit/delete data all day, but when they execute a Custom Filter against data (for example , a control DynamicData/Filters/CustomerLastNameSearch.ascx ) then the site auth fails, and redirects to the log in screen.

in web.config I have

     <authentication mode="Forms">
            <forms name=".Star" loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" path="/" timeout="43200" cookieless="UseCookies" />     

Offhand, I am thinking two things : that DynamicData/Filters path requires some special handling for some reason, or the control extension ascx is causing auth to get confused.   Has anyone else experienced this or have any suggestions?  Thanks!

Problems posting to a package


Hey Y'all

I'm currently creating a program that accesses a mysql package to add data to a few tables.  I'm currently getting an error that says  "

ORA-01403: no data found
ORA-06512: at "JESSE.PKG_WORKPLAN", line 42
ORA-06512: at "JESSE.PKG_WORKPLAN", line 177
ORA-06512: at line 1


These lines are


and 177:add_team_members(V_PROJECT_ID, V_START_DATE, v_FISC_YEAR, V_MEMBERS ,V_NUM_MEMBERS,'add');

Checking these variables in my asp.net page they are all receiving parameters.

Is there a  way to see what the database is actually receiving from the asp.net page?

Or is there another thing to be looking at?


URL Routing and Existing HttpHandler problems


Hello everyone,

I have a problem:

I am currently using 2 features: 

1. HttpHandler

Registering the path="res.aspx" verb="*"

2. URL Routing:

Registering with this pattern: "Company/Edit/{*companyId}","~/CompanyEdit.aspx"

In my CompanyEdit.aspx page, I used httphandler res.aspx to generate some images at client.

  • res.aspx?img=1
  • res.aspx?img=3

Now the problem is here, the page is load success with companyId = "12345", but when the images was loaded at client, it loaded the CompanyEdit.aspx again and show error with wrong id.  

I have debug and find the problem that because when image's urls were generated to client with url=res.aspx?img=1, url=res.aspx?img=3, the asp.net will understand that they are Company/Edit/res.aspx?img=1, Company/Edit/res.aspx?img=3 when it maps with URL Routing pattern.

=> So the CompanyEdit.aspx was load again with wrong id (id now is "res.aspx"). 

So, do you have any ideas to solve this problem, or other design.

Thanks, and best regard

ASP.NET 4 precompilation problems



We used ASP.NET precompilation (first manually, then with VS2008 WDP) with .NET 3.5 almost (see below) successfully.

After we moved to 4.0, the precompilation no longer works properly. The precompilation process itself succeeds, and the website works, but it consumes about twice the CPU it does without any precompilation. We use non-updatable precompilation (so webpages get compiled completely).

Our internal profiling tells us that most of the threads spend their time within variations of the following stack:


  System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(System.Web.VirtualPath virtualPath, bool ensureIsUpToDate) + 0xa2 bytes 
  System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) + 0x5b bytes 
  System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(System.Web.HttpContext context, System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) + 0xcb bytes 

Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. T


when a crystal report for same id is opened again at same time or refreshed then it gives the

"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Stack Trace is :-

Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0
CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend