Whether you are in the process of building .NET applications or whether you have .NET-based Web services already running in production, you must ensure that these applications deliver the expected return on investment (ROI). Efficiently supporting these .NET applications and minimizing time-to-resolution when problems occur are therefore absolutely critical.
With .NET applications, you will have to make myriad components and services, some developed in-house and some developed by a 3rd party, work flawlessly together on a whole new software infrastructure to form a reliable, scalable business process. Whether migrating an existing application or developing from scratch, you are bound to face many challenges when problems occur. And problems will occur.
Best Practices forAccelerating ProblemResolution in .NETApplications andWeb ServicesUntitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.2Abstract:Whether you are in the process of building Microsoft.NET applicationsor have .NET-based Web Services already running in production, youmust ensure that these applications deliver the expected return oninvestment (ROI), and that means high levels of application availabilityand performance.With .NET, you have to make myriad components and services some developed in-house and some developed by a 3rd party worktogether flawlessly on a whole new software infrastructure to form areliable, scalable business process. Whether migrating an existingapplication or developing from scratch, you are bound to face manychallenges when problems occur. And problems will occur.An effective .NET application problem resolution strategy is absolutelycritical to minimize the risk of deploying .NET applications. To help,this paper:1. Identifies the main components of the Microsoft .NET architecture2. Outlines the most common .NET application problems3. Presents strategies and best practices for .NET applicationmanagement and support, which minimize problem resolution time and increase return on investment (ROI).Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.3Table of ContentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4The Basics of Microsoft .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Common Problems with .NET Applications . . . . . . . . . . . . . . . . . 6Identify s AppSight Application Problem Resolution System . . . . . . 8How AppSight Helps Pinpoint Problems in .NET Applications . . . 10AppSight and Internal Application Logging . . . . . . . . . . . . . . . . 14About Identify Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.4OverviewWhether you are in the process of building .NET applications orwhether you have .NET-based Web services already running inproduction, you must ensure that these applications deliver theexpected return on investment (ROI). Efficiently supporting these.NET applications and minimizing time-to-resolution when problemsoccur are therefore absolutely critical.With .NET applications, you will have to make myriad componentsand services, some developed in-house and some developed bya 3rd party, work flawlessly together on a whole new softwareinfrastructure to form a reliable, scalable business process.Whether migrating an existing application or developing fromscratch, you are bound to face many challenges when problemsoccur. And problems will occur.This paper introduces the main components of the Microsoft .NETarchitecture and outlines the most common .NET application problems.It then describes how Identify s AppSightTMis used to minimize therisk of deploying .NET applications and accelerate the applicationproblem resolution process.Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web ServicesThe Basics of Microsoft .NET" Microsoft .NET is Microsoft s platform for building N-tierapplications. Microsoft .NET encompasses a family of products builton industry and Internet standards that provide for each aspect ofdeveloping (Visual Studio .NET), managing (.NET Servers) andusing Web services." Web services is a software technology that is used to connectapplications and users over standard Internet protocols. Web servicescan be implemented through Microsoft Windows DNA, Microsoft.NET, and J2EE applications." XML (Extensible Markup Language) is the universal format forWeb services. XML is a set of rules for designing text formats fordata, in a way that produces files that are easy to generateand read (by a computer), and that are unambiguous andplatform-independent." SOAP (Simple Object Access Protocol) is a protocol built on XML.Using SOAP, applications call each other in a standard, looselycoupled way, making it possible to build applications that aredistributed across the Internet. If you think of the interactionsbetween XML Web services as a phone call, XML describes thethings that applications say to each other in their conversationsand SOAP describes how they call each other on the phone." CLR (Common Language Runtime) is a core component of theMicrosoft .NET Framework. Similar to a Java Virtual Machine, theCLR is a native Windows program that provides various services,such as memory management, security management and errorhandling, to .NET managed applications. Programs can be writtenfor the CLR in any .NET language, including C# and VB.NET." ASP.NET, the new version of Microsoft s ASP, is a programmingframework built on the CLR that can be used on a server to build.NET Web applications." ADO.NET, the new version of Microsoft s ADO, provides .NETapplications with optimized access to data sources such asMicrosoft SQL Server, as well as data sources exposed throughOLE DB and XML. Visual Studio .NET and the.NET Framework are amongthe most important productsever released by Microsoftand uderscore our long-termcommitment to developersuccess. As the first fullyintegrated environment forbuilding XML Web servicesand next generation Internetapplications, Visual Studio.NET and the .NET Frameworkwill enable the next big waveof developer opportunity,creating XML Web servicesthat will soon become thebasis for all major newsoftware development. Bill GatesChief Software ArchitectMicrosoft Corporation 2006 Identify Software, Ltd.5Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services" Remoting is a .NET technology for calling procedures over thenetwork using XML, SOAP, and HTTP just as if they were hosted onthe same computer (you can think of Remoting as the .NET versionof DCOM)." Interop is the process of getting managed and unmanagedobjects (e.g. COM objects) to work together." Assembly is the .NET logical equivalent of a DLL, a reusableapplication component." GC (Garbage Collection) is the .NET mechanism for managingmemory, designed to absolve developers from tracking memoryusage and knowing when to free memory.Common Problems with .NET ApplicationsWhile Microsoft .NET addresses many of the issues historicallyassociated with building and deploying distributed applications, itpresents many new challenges related to deployment and support.This is due to the following reasons:" .NET applications are typically highly distributed; hence problemtriage is complex and time-consuming." .NET is a gigantic new set of technologies and concepts. As withany new software platform, problems are common and inevitable." Web services often translate to significantly higher levels ofdependency between applications and a growing number of end-users, thus increasing the direct and indirect costs of problems andinefficiencies in the support process.The following are some of the common problems associated with.NET applications:Performance ProblemsAs with any software environment, performance problems arecommon and often difficult to pinpoint. The possible causes forthese problems include:" Inefficient code (e.g. frequent exceptions, many large objects, 2006 Identify Software, Ltd.6Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Servicesinefficient database calls using ad hoc queries rather thancompiled stored procedures)." Memory consumption (e.g. not freeing objects when they are nolonger used, allocating too much memory per request, inadequatedefinition of maximum number of Worker and IO threads)." Improper application settings (e.g. inadequate session-stateprovider, buffering disabled on a Web Forms page)." Interoperability with legacy Windows code (e.g. marshaling a lotof data from COM/COM+ to managed .NET objects)." Infrastructure problems (e.g. bad network response times thatcause degradation in application performance).Functional ProblemsThe Microsoft .NET Framework has been designed to free thedeveloper from dealing with various programming tasks, suchas memory allocations and security. However, just like in anydevelopment platform, coding errors are still in abundance.Some of the most common coding errors are:" Incorrect business logic (e.g. incorrect calculation of interest rate)." Thread deadlock situations." A severe error which leads to an application crash.Configuration ProblemsWhile .NET promises to resolve DLL-hell issues, configurationproblems are far from gone. The following detail some of thecommon configuration issues with .NET applications:" Insufficient permissions to access a resource (e.g. no permissionto write to an application directory)." Incompatible components (e.g. incorrect versions of assemblies orCOM/COM+ objects)." Incorrect application settings in .NET configuration files 2006 Identify Software, Ltd.7Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services" Conflicts with other applications (e.g. an anti-virus tool that causes aWeb application to restart intermittently).User Errors.NET applications are built to serve end-users. As with any softwareapplication, users make mistakes. Some of these mistakes are resolvedquickly, while some take days to figure out.Identify s AppSight Application Problem Resolution SystemWhen software problems occur, IT teams typically go though a costly,iterative process to gather information and replicate the problem beforebeginning the root cause analysis and resolution phases. Identify sAppSight automates this entire process.AppSight leverages patented Black Box software technology to monitorapplication execution and capture a synchronized, real-time log of useractions, system events, performance metrics, configuration data, andcode execution flow much like the black box flight recorder on an aircraftcaptures a real-time record of a flight. The AppSight Black Box log canbe replayed and analyzed to quickly pinpoint the root cause of all kindsof Microsoft Windows, .NET, and J2EE application problems, whetherrelated to performance, configuration issues, user mistakes, or code errors.By capturing actual problem history in a centralized repository, AppSightprovides the basis for team collaboration and communication. By allowingeach member of the team to quickly analyze problem information usingrole-based views, rather than recreate the problem, AppSight eliminatesup to 70% of the cycle time traditionally consumed by root cause analysis. 2006 Identify Software, Ltd.8 As the Microsoft .NETFramework is becomingone of the preferredplatforms for deployingWeb services, applicationsupport technologies arecritical to the success ofsoftware projects. Identify sAppSight solution enablesIT organizations andcustomer support teamsto provide better serviceto their customers andreduce cost of ownershipby pinpointing problemsin .NET connectedapplications in production. John MontgomeryDirector, Developer andPlatform EvangelismMicrosoft CorporationUntitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.9The AppSight/System view plays back Black Box recordings at multiplelevels, showing user actions on the top pane and the system-level executionlog on the bottom pane. This view also includes information on applicationconfiguration, performance, memory utilization, and more.Fully synchronized with AppSight/System, the AppSight/Code view playsback Black Box recordings at the code-level, displaying function calls,arguments, variable values, and more.1. AppSight s Black Boxsoftware technologyrecords full problemdata on the clientand server sides.2. Black Box logsare communicatedthroughout the support chain using theorganization s existingservice desk system.3. The AppSight consoleviews enable eachsupport level (IT Ops,Service Desk andDevelopment) toplay back Black Boxrecordings at therequired level ofdetail and identifyroot cause of anyapplication problem.Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.10How AppSight Helps Pinpoint Problems in .NET ApplicationsIdentify s AppSight provides complete support of .NET applications.AppSight s Black Box software technology records all major .NETFramework components, including Web services calls, Remotingcalls, ASP .NET, ADO.NET, .NET Config, GC, CLR, and more. Speciallydesigned for .NET, the AppSight console provides powerful viewsthat empower every person involved in application support to playback and pinpoint the root cause of problems quickly and efficiently.The following table lists examples of specific .NET application problemsand describes how they are pinpointed by Identify s AppSight.CONFIGURATION PROBLEMSRoot CauseInsufficient accesspermissions(e.g. application cannotwrite information to adirectory)Conflict with otherapplications(e.g. an anti-virustool causes the Webapplication to restartand lose session data)Incorrect applicationsettings (e.g. incorrectport settings for theapplication)How AppSight Black Box Pinpoints Root CauseThe Black Box records all accesses andattempted accesses of the application toany resource on the computer, enabling asupport engineer to quickly identify theproblematic resource and root cause.Additionally, users can compareconfiguration to pinpoint such issues.The Black Box records all the interactionsof the user s application with any otherapplications, thus allowing the AppSightuser to quickly identify conflict situations.Furthermore, the Black Box can recordany 3rd party application to understandits impact on the user s application.The Black Box records all accesses toapplication configuration files (.NETConfig class), therefore allowing the supportengineer to track application settings andunderstand their impact on application sexecution. Using the AppSight console,users can compare application configurationrecorded on two computers for rapididentification of differences.Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.11Problems with accessingexternal resourcesor services (e.g. a Webservice cannot beinvoked)Incompatible components(e.g. an incorrect versionof a 3rd party componentused by the application)Incorrect business logic(e.g. incorrect calculationof interest rate)Furthermore, the Black Box can beconfigured to collect any configuration(or log) files and save them as part of theBlack Box log, thus providing all the datarequired to pinpoint any applicationconfiguration issue.The Black Box records all the interactionsof the user s application with any externalresource or service, thus allowing theAppSight user to quickly pinpoint anyaccess issues. For example, the BlackBox will show unsuccessful Web servicescalls, .NET Remoting calls, or failures inaccessing a database.The Black Box records the interactions ofthe application with home grown and 3rdparty components, thus allowing the userto easily identify unsuccessful componentinvocations and calls.The Black Box records the completeflow of managed and unmanaged code,including function calls, arguments,return values, variable values, and stack.It also captures handled and unhandledexceptions, which may indicate a codeproblem. The Black Box does not requireany change in the application, andruns against optimized, productionapplications.Additionally, the Black Box canautomatically record internal loggingfunctions (.NET Trace class). The eventsare integrated into the Black Box log,thereby dramatically enhancing thevalue of internal logging.FUNCTIONAL PROBLEMSUntitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web ServicesHang (e.g. due to athread deadlock situa-tion or the application iswaiting for a responsefrom an externalresource, such as adatabase)Crash (e.g. due to anaccess violation with aCOM object)Slow external WebservicesInefficient code(e.g. an applicationopens connection to thedatabase upon everyrequest)Memory consumptionThe Black Box records the execution ofmultiple threads and processes at thecode level, allowing a support engineeror a developer to easily find the rootcause of hang situations.The Black Box records application executionat the code level and automaticallycaptures a stack dump upon crash events,thus allowing a support engineer or adeveloper to quickly understand theroot cause of crashes.The Black Box records all Web servicescalls made by the application (client andserver side), thus allowing the AppSightuser to easily detect a Web service that isnot performing as expected. To understandthe root cause of the problem, a BlackBox can be deployed on the remotecomputer which hosts the Web service.Furthermore, in a distributed environment,the AppSight user can follow Web servicescalls from client to server and from serverto server in order to identify the point offailure, and then drill down into codelevel execution.The Black Box records the completeexecution flow at the system and codelevels, providing information on number offunction calls and their duration at anywindow of time, thus allowing a developerto easily identify problem area and drilldown to locate inefficient code.The Black Box records performancecounters that can indicate that the causeof a performance problem is memory(e.g. % of time spent on GarbageCollection, allocated bytes/sec.) 2006 Identify Software, Ltd.12PERFORMANCE PROBLEMSUntitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web ServicesGarbage Collection(GC)Application andFramework settings(e.g. max number ofthreads in thread poolis insufficient)Inefficient use ofRemoting (e.g. too muchdata transferred in eachRemoting call)InteroperabilityEnd-user mistakesThe Black Box records performancecounters related to .NET GC. Thesecounters indicate the status of GC atany point in time. Fully synchronized withall other recorded data (e.g. assemblyinvocations, database calls, processstart, and more), a developer can easilyidentify GC-related problems.The Black Box records all necessaryperformance counters, messages writtento the Event Log, as well as applicationand framework settings (.NET config fileaccesses, IIS configuration and browsersettings). Integrated into the Black Boxlog, this data allows the support engineerto pinpoint non-optimized settings thatcause application slow downs.The Black Box records all Remoting calls(both on the client and server sides) andpresents their performance in the applicationperformance dialog, thus allowing adeveloper to pinpoint the slow performingcalls. When required, the AppSight usercan drill down to analyze execution ofRemoting calls at the code level.The Black Box records the interactionsof the application with home grown and3rd party components, thus allowingthe AppSight user to easily identifyperformance bottlenecks that are causedby external .NET and legacy components.The Black Box records all end-useractions and allows a support engineer toplay them back as a movie or text, thuspinpointing end-user errors and easilyunderstanding the end-user experience. 2006 Identify Software, Ltd.13END-USER ERRORSUntitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web Services 2006 Identify Software, Ltd.14AppSight and Internal Application LoggingIn addition to achieving tremendous savings in application supportand enhancing customer service, users can also realize significantcost reductions in development of internal logging mechanisms.These development efforts, which are taken solely for the purposeof application support, may represent 10%-30% of the total costof the project. AppSight s Black Box software technology recordsproduction-ready applications at the code level using a configurablerecording profile, thus eliminating the need to build and maintaininternal loggers. Using AppSight, developers are able to dedicatemore time to building new functionality, rather than investing timein developing logging code, which adds no value to end-users.If internal logging functions (i.e., .NET Trace class functions) exist,the Black Box will automatically embed them into the recordedlog, thus allowing AppSight users to retain their investment ininternal logging.AppSight/System plays back a Black Box recording that includes .NETTrace messages.Untitled DocumentBest Practices for Accelerating Problem Resolutionin .NET Applications and Web ServicesAbout Identify SoftwareIdentify is the leader in application problem resolution software,helping hundreds of enterprises and software vendors speedapplication delivery, increase application quality, performance, andavailability, and reduce application support costs. The company sAppSight Application Problem Resolution System leverages patentedBlack Box Application Flight Recorder technology to capture,communicate, and determine the root cause of application problems,thereby dramatically accelerating problem resolution processesacross the application lifecycle. Founded in 1996, Identify is aglobal organization, with operational headquarters in New Yorkand offices throughout the U.S., Europe, and Asia Pacific.For more information about Identify, please visit www.identify.comor call 800.364.5467 or +1 919.878.3717.Identify is a registered trademark and AppSight is a trademark of Identify Software Ltd.Other product and company names herein may be trademarks of their registered owners. Identify s AppSight Black BoxSoftware provides customerswith a valuable applicationsupport solution. AppSightoptimizes the process ofdeploying and supportingMicrosoft .NET Framework-based applications, enablingenterprises and independentsoftware vendors to achievea high level of customerservice and satisfaction. Prashant SridharanSenior Product ManagerMicrosoft Corporation 2006 Identify Software, Ltd.15WPNET-072605