Configuration :: Test For Memory Leaks On A Website Running Locally?
Nov 14, 2010
The application pool randomly shuts down. I am assuming this is due to Rapid Fail Protection and errors are occuring that are triggering it. However... there are no errors being reported in the event logs. So my next inclination is to think of the possibilities of a memory leak. How do you test for memory leaks on a website running locally?
I have an ASP.net application with c# which uses MS SQL server 2005. I find that the cpu usage of my server reaches 100% when ever i run the application. I was told that i may have memory leak in my application. How can i trace is there are any memory leaks in my application? Note: I am not the programmer of this application. But i have the complete source code as i am doing maintenance and enhancements on this application.
After researching why a page I have using an UpdatePanel to perform a refresh every 15 seconds was using up piles and piles of memory over time, I discovered that this is a "well-known" issue with the UpdatePanel not cleaning up properly in IE (some issue with reference counting in COM interop or some such). UpdatePanel does not seem to have this issue in Firefox (haven't confirmed the issue in other browsers).If this is a "well-known" issue, two questions:Is there a "well-known" workaround to this? I know that a full-page refresh will cause the memory to be cleaned up, but some pages may be up for a long time and I don't want to interrupt any user interaction with the page that may be going on. I will if it is required, but it is a sloppy, sloppy UI kluge... you know, one of those "as a self-respecting coder I hang my head in shame at what I have wrought" kind of kluges.Is there any effort being made to fix this? I've looked about, however, most articles on this do not make mention of even MS acknowledging bug status for this while I've seen many telling me why this is an issue, and how it's a "design" thing. I hear IE9 is supposed to take care of this... I guess what you'd call a non-issue, but it will only be available to Windows 7 users.
some differences hosting a website on some remote server VS running it locally on dev environment.The reason why i am asking is, If I run my website locally it works fine no exceptions, runs smooth. But when deployed on a remote hosting server. Its like a nightmare to me :(very often i get object Instance not set to instance of object..... I am ok with the error message, But the same situation should happen locally,
Coming from WinForms/WPF I've learned the hard way that not remembering to unhook event handlers can lead to memory leaks.
Does this apply to Webapps too? It seems like when the request ends, everything (non-static) should be eligible for garbage collection. Is that true?
I remember jumping through all sorts of hoops to ensure that events got unhooked when an object goes out of scope, especially with multi-threading going on to ensure a responsive UI. Is all of that still necessarily in a webapp or is that one of the luxuries of working with a (mostly) RESTful model?
The error is mentioned below, the cssfriendly.dll is in bin, and browser file is in there app_browsers folder. And it is working in same PC (developping PC), on remote server that belong to my company (i just installed .net 3.5 on that server)
I tried uploading the same site on 2 dufferents hosting, and finally i got the same error. What could gone wrong ? I tried contacting the hosting support but they work in ticketing system and this is extremely slow.
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'CSSFriendly.MenuAdapter'.
I have a website that is hosted on IIS6 and set to use .NET 4.0, but I still have a WCF service on the site that is using 3.5. When i browse my svc file, i get the error:
unrecognized attribute 'targetFramework'
and it point to the websites root web.config. I have tried this MSDN article and still get the same error. My site is using a different app pool than my WCF service, and is configured to use 4.0 in the ASP.NET tab of properties. I have also checked and made sure that my WCF service is using 3.5(2.0) in its ASP.NET properties tab.
This may be obvious to many of you (hopefully!) I have a site under asp.net created using Visual Web Developer 2008 and MSSQL 2007 (all express editions)All ok so far.My PSP requires the addition of a couple of traditional ASP 'screens' to redirect payments to them. I cannot run this under VWD2008 development server as .asp are not allowed, so am looking to move to running it locally under IIS7 which is turned on.How do I alter the site to run on the IIS7 instance?
I have a form that's used to submit emails for a project. This uses the SMTP Client class and is currently delivering the emails to a local directory , for now.
There is some logic that checks to see if a mailbox is busy or unavailable. A message is displayed for the appropriate situation. There is also some logging and exception handling.
I want to know if there is a way to test this logic, logging and exception handling while this app is local. I don't know if there is a SMTP Status Code that's returned since this is being done locally and not with a real smtp server.
Is there a way to test this locally? Can these values be set manually in the code as a test?
I have a very simple and stupid problem but I'm unable to find a solution. I'm trying to create folders and files locally through my code, however I get a permission exception when I try to write in a folder in my application. Normally I'd run this on a remote server, and ask the system administrator for writing permission on this specific folder, but I need to run this locally for the moment.
If I navigate to the file in windows explorer, and right click the folder and click on Properties, I can see that it's set as Read Only. However when I try to disable this tickbox and click on Accept, nothing happens. It ignores me, and next time I open the Properties of this same folder, it's still marked as Read Only.
I've googled this and found a solution which implies using MS-DOS and a command named "attrib". This is not working for me either. I also read about adding an ASP.NET account on my PC and granting the right permissions to this, but I'm not sure how to do is.
My application running locally on my PC - on the Visual Studio Server (Cassini Server).My SQl Server DB is hsosted in a server on the internet.I think there are some configurations to be done in the SSMS ( Enable Remote conn.).
I host a website that has recently been upgraded from .NET Framework 2.0 to .NET Framework 4.0. Within the website, I have an instance of BlogEngine which still requires .NET Framework 2.0. Each website is in it's own application pool. My issue is that when I browse to the blog portion of my website, I receive a 500.19 error with the following information...
The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration The web.conf file that is listed in the error message is the config file that belongs to my root website which is running .NET Framework 4.0. How do I get the two websites to run together in the same website using different versions of the .NET Framework?
The first one displays fine locally but not on the Web server, whereas the second one displays fine both locally and on the Web. How do I get the first to resolve like the second? In the database, I have the reference prefixed with "~/i/" so it's puzzling to me that it would resolve to some other form.
Recently got a new (used) machine and had to reinstall VS 2008 - may or may not be related. Yesterday, I opened an existing website via Source Control. I can check files in and out and make edits, but when I try to debug locally, I get a list of errors, starting with:
"Could not load file or assembly 'System.Web.Abstractions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
Everyone else working on this website is able to deploy it locally. Also, if I create a new website, I can debug just fine, and I used to be able to edit and debug other sites. Everything I've found by Googling this error so far has to do with MVC projects, and suggests changing the webconfig or other files. Since other people can run this, it seems it must be a problem with my software, not the code.
I have a menu that uses a sitemap. The menu works locally, but not on the server. Below is my code for the menu, data source, and the sitemap. why I can run it locally and use the menu, but I cannot use the menu on the server?
When I deploy my web service, I get the following error:
There is no build provider registered for the extension '.svc'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
I found one thread ([URL] that a solution but, I can not get it to work. If I make the changes to my web config file as in the thread, I then get a configuration error. One odd thing is that, if I check the machine.config file on my machine, located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGmachine.config, I don't see any of the config settings described in the thread. As a matter of fact, there is no mention of "compilation" or "buildProviders" at all.
I have a solution that was originally created using VS 2008. I have quite a few unit tests that all passed when ran in VS 2008.
Yesterday I opened this solution in VS 2010 and converted it using the wizard. The solution built just fine, it runs just fine, BUT now all tests that access the db fail. I get the same error on every test (below).
"The runtime has encountered a fatal error. The address of the error was at 0x5b3b5ad7, on thread 0x19a4. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack."
In test classes that use ClassInitialize() and ClassCleanup() methods, all the tests fail. All tests fail with the same error, "The agent process was stopped while the test was running." Tests in test classes that do not utilize ClassInitialize() and ClassCleanup() (these tests do not hit the database) all pass.
When this was a VS2008 project all 153 tests passed. No changes have been made to these tests, other than converting the project to a VS2010 project.
I've been playing around with one test class. I commented out the ClassInitialize() and ClassCleanup() methods. I rewrote one test method and mocked everything. I tried running just that one test. I still got the "The agent process was stopped while the test was running" error.
Visual Studio 2010, version 10.0.30319.1 RTMRel
Test framework: integrated VS 2010 MS Test
Mocking framework: Not using mocking, I have a db that is destroyed and recreated in MyClassInitialize(), it is populated with known values. Yes, I know I should be using mocking, but this is an older app and it has not been updated with all of the new bells and whistles yet.
DB Framework: NHibernate
Target Framework is 3.5 for all projects in this solution except for the test project. The target framework is 4.0 for the test project. I tried changing it to 3.5, it will not let me.
"Attempted re-targeting of the project has been canceled. You cannot change the specified .NET framework or profile for a test project."