.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

Threading: Break Free of Code Deadlocks in Critical Sections Under Windows

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

Critical sections, a mechanism that prohibits more than one thread at a time from executing a particular section of code, is a topic that has not received much attention and thus tends not to be well understood. A solid understanding of critical sections in Windows can really come in handy when you need to track down multithreading performance issues in your code. This articles delves under the hood of critical sections to reveal information useful in finding deadlocks and in pinpointing performance problems. It also includes a handy utility program that shows all of your critical sections and their current states.

Matt Pietrek and Russ Osterlund

MSDN Magazine December 2003

View Complete Post

More Related Resource Links

Free Code Snippets - ASP.NET

You Can Find Useful ASP.NET Related Posts on the above link.

Free Code Snippets - C#

Free C# Code Snippets

ActiveSync 4.5 (Free Down Load) using in Windows Mobile Pocket Pc

Microsoft ActiveSync 4.5 is the latest sync software release for Windows Mobile-powered devices. ActiveSync provides a great synchronization experience with Windows®-powered PCs and Microsoft Outlook right out of the box.


* Faster file transfer speed and photo sync via Outlook are only available for Windows Mobile 5.0 powered devices.
* Remote PC Sync (via WiFi or LAN) has been removed due to Enterprise customer feedback around security issues.
* Customers using Microsoft Exchange 2003 Service Pack 2 with devices running the Messaging and Security Feature Pack for Windows Mobile 5.0 will benefit from the following feature enhancements included in ActiveSync 4.5: Direct Push Technology, local device wipe, and certificate powered authentication to Microsoft Exchange.
* Microsoft® Outlook® 2000 is not supported by ActiveSync 4.5. It is highly recommended that users upgrade to Microsoft® Outlook® 2003 messaging and collaboration client.
* Conversion of database files for use on a mobile device is not supported by ActiveSync 4.5. On previous versions, this feature was limited to devices running Windows Mobile software for Pocket PC 2003 and earlier.
* Conversion of font files for use on a mobile device is not supported by ActiveSync 4.5. On previous versions, this feature was limited to devices running Windows Mobile software for Pocket P

how to set break point at inline code

I set the element height value by using inline code 
<%# Eval("s") %>
where "s" is the variable declared in page load event. when i run the application it don't set the height. 
Is there any way, i can set break point into .aspx file. i mean how i can check if my Eval("s") get the value.  

Smart Storage: Protect Your Data Via Managed Code And The Windows Vista Smart Card APIs


Smart cards are a compelling alternative to the reliance on passwords, which are the weakest link in authentication systems. Get the Windows smart card programming basics here.

Dan Griffin

MSDN Magazine November 2006

ASP.NET: Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals


If you want to schedule ASP.NET tasks, one solution is to use a Web service to provide an interface to your ASP.NET application and build a Windows service that calls to it at scheduled intervals. Thus the ASP.NET application doesn't have to own the scheduling logic. Here the author shows how to schedule your ASP.NET tasks using a Windows service to initiate the Web service call because Windows services can start themselves when Windows boots up.

Andrew Needleman

MSDN Magazine March 2005

Code Name Longhorn: A First Look at Writing and Deploying Apps in the Next Generation of Windows


The next version of the Microsoft Windows operating system, code-named "Longhorn," marks a significant change not only in terms of how the operating system works, but also in the way in which applications are built. The Longhorn version of Windows includes a new storage system, natural search technology, and an increased emphasis on security and trustworthy computing. Here the author provides an overview of Longhorn, focusing on the build-once, deploy n-times application model. In addition, he discusses the new language, code-named "XAML," that's used to create UI elements, then presents some working samples.

Dino Esposito

MSDN Magazine January 2004

Debug: Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP


In a previous article, the author devised a simple method to detect Graphical Device Interface (GDI) objects that are not properly released by Win32-based applications on Windows 9x platforms. Because some newer versions of Windows require a slightly different approach to GDI leaks, the author has updated his techniques for those operating systems. He builds and explains two tools designed to detect and eradicate GDI leaks in applications running on Windows XP, Windows 2000, and Windows NT.

Christophe Nasarre

MSDN Magazine January 2003

Windows Script Host: New Code-Signing Features Protect Against Malicious Scripts


Downloading scripts from the Web or e-mail leaves users vulnerable to security risks because scripts can't be signed. But now developers can use Windows Script Host (WSH) to hash scripts so users can verify their source and safety. With WSH, scripts can be signed or verified using all the same tools ordinarily used to sign EXE, CAB, DLL, and OCX files. This article discusses public-key cryptosystems, the process of signing and verifying scripts in WSH, and several warnings about attacks that could potentially be made against cryptographically secured scripts and ways in which to avoid them.

Eric Lippert

MSDN Magazine April 2001

gdi32.dll + unsafe code on 32+64Bit Windows

Which target cpu should I use to compile a .NET 3.5 app (developed on a 32 Bit System) that contains an assembly which uses [DllImport("gdi32.dll")] static extern IntPtr CopyEnhMetaFile(IntPtr hemfSrc, IntPtr hNULL); and which also has the option checked: "Allow unsafe code" because of the following code: ((byte*) dst.Scan0.ToPointer())[(dst.Stride*y) + x] =... so that the app is able to run both on 32 and 64 Bit Windows ? If the answer is "x86", does it mean that all referenced assemblies of the app have to be compiled with "x86" or just the "app.exe" ? Thanks.

VS2010 not displaying code when break hit.

Hosting a WCF application built on the .Net 3.0 framework in VS2010 and when a break is hit in the code the class will not display.  I can get other classes to display, but the class that I need to work on, where I put the break, is hidden and will not display no matter what I do. Thanks, Dave

How to Find out Windows service application path from Code ?

Dear frnds, Could you please help me to find out the path of  windows serivce exe ( application path ) from code?   Regards. Sajid P K  

Text in code windows became very blur

I do remember what I did but text in code windows became very blur. Another screens such as option, solution explorer are still very clear. How to fix it? I tried to reset to reset all setting but no luck.I do remember what I did but text in code windows became very blur.Another screens such as option, solution explorer are still very clear.How to fix it?I tried to reset to reset all setting but no luck.

Moving part of the code/processing from Asp.net hosted in IIS to WCF-Windows Services will help to r

I have a web application with no user interface (GUI), this web application (asp.net) accepts some input from a program and doing some processing; In the Page Load event I am doing all processing and calling a WCF service, after receiving the response from WCF services the page get unload before writing the processing status/result to database) this asp.net application is hosted in IIS.   The WCF services is also hosted in the same machine in windows Services where IIS is hosted, I am concern about its performance of the application which is hosted in IIS.  Should I move some part of the code (processing) to another program say Create a new WCF Services and host it in Windows Services  so that the load on IIS will be reduce?  The new WCF Services will process some part of the code which IIS used to process, so helping IIS to reduce the load.       By moving some part of code from asp.net [processing] to another program hosted in WCF- Windows Services in same machine will able to reduce the load on IIS?   Please guide me.. Thanks Shaju

.Net code errors out in 64bit (X64) windows 2003 server

All, I have a simple code developed on my PC. ( 32 bit) . It has a few dll's as a reference. When i run the same code on my server 64bit (X64) windows 2003  ..( I grab everything from project directory ..\bin\Debug in the visual studio 2005 ) and i put the exe and the dll's in the same directory on the server. I get the following error Unhandled Exception: System.Runtime.InteropServices.COMException (0x80040154): R etrieving the COM class factory for component with CLSID {E063B04A-CB8B-460E-99D 0-F7D8FA2FAAA2} failed due to the following error: 80040154.          
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