Scott Hanselman

Been Doing Some A Hrefhttpmsdnmicrosoftcomlibrarydefaultaspurllibraryenuscpguidehtmlcpcondevelopinghighpe

November 26, '02 Comments [0] Posted in Web Services | ASP.NET | TechEd | Speaking | XML | Bugs
Sponsored By

Been doing some Web Gardening lately, and I'm disappointed at the lack of documentation on this supposedly powerful option for ASP.NET.  If I'm using a Quad-Proc Box and an ASP.NET Application that as some time is calling (via Interop) an inproc free-threaded C++ COM Component that then does some opereations and a (legacy) DCOM call out to another box, you'd think that having MaxWorkerThreads (per CPU) at some number x where 25<x<75 would be reasonable thing.  I would assume that a DCOM call (or Web Service call) would count as "waiting for an external resource" and that a few extra threads, and certainly a worker process per CPU would be ideal.  Per MSDN:

"If your application uses a slow database server or calls COM objects that have external dependencies, to name only a couple of possibilities, it can be beneficial to enable Web gardening for your application."

Certainly, this is vague at best.  Of course, everyone has seen the decks with one slide that mention Web Gardening, as well as books that spend a sentence on Web Gardening.  How do these ASPNET_WP.exe worker processes really behave?  I would presume it's as if one box becomes four...separate Cache Objects, separate Application objects. 

With Web Gardening, I'm seeing ASPNET_WP processes recycling constantly, and CoCreateInstance calls to my legacy DLLs failing.  However, without Web Gardening, things are peachy keen, and 30-50% better performance.

  • What are the ramifications for legacy COM and DOM calls within ASP.NET Worker Processes within a Garden?
  • Is Web Gardening just one of those many tweaks you give a try? 

Before this exercise, Web Gardening was an option in my architectural quiver...now (as it's not behaving at ALL like I'd have though) I'm not sure.

I'd had similar trouble in the past trying to tune MaxIoThreads and MaxWorkerThreads.  I had an ASP.NET application that was calling out to 2 or 3 Web Services, and when the system was under significant load, it would crap out - It was actually unable to get a free thread (from the system's thread pool I assume) to even get out of the box.  I was getting errors in the Socket Class, in the bowels of WebRequest.  Seemed that the box was SO busy dealing with the multiplicity of calls coming in (that were fanning out into n*2 outbound calls - ya, I know...) that it couldn't make the calls out...everyone blocked. (I even wondered if this was a nageling issue...or perhaps the HTTP stack not wanting too many calls (>2 [section 8.1.4]) out to the same server? ) And changing MaxIoThreads and MaxWorkerThreads from ANYTHING but the default of 25 was useless. 

  • Would it have been better to have written my own reserved thread pool and made the calls from there? 
  • Calling back to the Web Gardening problem...in the interest of throughput, should the calls to the COM object (that then calls out via DCOM to others) be made via my own worker thread pool? 
  • Or perhaps, from a COM+ application (That's what Clemens suggested).

These are the things that are currently disturbing my sleep...

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Automated Testing NET Web Services And Applications I Just Found Jim Klo

November 26, '02 Comments [0] Posted in Web Services | ASP.NET | NUnit | Nant | XML
Sponsored By

Automated Testing .NET Web Services and Applications

I just found Jim Klopfenstein's Executing ASMX files without a web server article. Jim's code could simplify most Web Service unit testing. And since it doesn't need IIS, or even ASP.NET, it would be easy to run during automated builds. Jim doesn't say, but I wouldn't be surprised if this is the reason he was trying to get this working.
I haven't thought much about it but you should be able to do the same thing for ASPX files. Has someone already done this?
[matt.griffith]

Interesting!  I knew that Cassini  (the ASP.NET "Host ASPNET_WP.EXE yourself" sample) and Web.Hosting, once "discovered", would cause good things to be built.  I'm sure if this was combined with my friend Jim Little's NUnitASP it could all be run within a NAnt automated build.

I wonder how hard it would be to insert an .NET interception layer/proxy server in between a Web Browser and ASP.NET to record the HTTP GETs and POSTs into a simple XML "recorder" file.  These could then be played back as part of an NUnit/NUnitASP Test and added to the build.  Regular expressions and and maybe an SGMLReader, also stored in the XML could validate the reponses...then I could stop using LoadRunner or SilkPeformer...

Has this app already been written? 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Good Article And Primary On The Basics Of Cryptography And NE

November 26, '02 Comments [0] Posted in Web Services
Sponsored By

Good article and primary on the basics of Cryptography and .NET.

"Mark Strawmyer provides an overview of cryptography, covers the basics on some of what's available through the .NET Framework, and then focuses on the use of symmetric encryption to protect data such as user passwords."

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Great Info And Technology Updates Up On Microsoftcom This Week FONT Face

November 25, '02 Comments [0] Posted in Web Services | ASP.NET | XML
Sponsored By

Great info and Technology updates up on Microsoft.com this week:

New Voices Columns

At Your Service: Adding a Progress Bar to Your Web Service Client Application
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service11052002.asp

Ask Dr. GUI: Outlining a GDI+ Path with the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui11192002.asp

Two for the Road: Creating Custom Controls with the .NET Compact Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road11272002.asp

Web Team Talking: All Work and No Play¬Ö
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebteam/html/webteam11042002.asp

New Technical Articles

Visual Basic .NET Code Sample: Interacting with a Windows Service
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvssamp/html/vbcs_InteractingwithaWindowsService.asp

Working with Custom Polygons in MapPoint .NET 2.0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmapnet/html/map_polygons.asp

Revised Articles/Columns

MDAC Road Map
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html/data_mdacroadmap.asp

New Seminars

How Web Services Change Application Architecture
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20010410devt1-09/Portal.xml

Architecting an Application Using Microsoft .NET Framework
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20010710devt1-21/Portal.xml

Building .NET Applications
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20010710DEVT1-22/Portal.xml

ASP.NET with Visual Studio .NET
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20010710DEVT1-25/Portal.xml

Best Practices for Upgrading Visual Basic 6.0 Projects to Visual Basic .NET
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20010710DEVT1-26/Portal.xml

How to Develop an End-to-End Application with Microsoft .NET
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20011009devt1-32/Portal.xml

.NET Framework Overview
http://www.microsoft.com/seminar/includes/seminar.asp?url=/Seminar/en/Developers/20010109devt1-02/Portal.xml

New Chats

MSDN Chat Transcript: Introduction to Visual J#
http://msdn.microsoft.com/chats/vstudio/vstudio_111202.asp

MSDN Chat Transcript: Windows Installer Custom Actions
http://msdn.microsoft.com/chats/windows/windows_110602.asp

New in Downloads

.NET Alerts SDK
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/002/104/msdncompositedoc.xml

Revised in Downloads

Microsoft .NET Speech SDK Version 1.0 Beta 2
http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/002/091/msdncompositedoc.xml

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Wow A 512 Meg CF Card For 140nbsp Crapa

November 25, '02 Comments [0] Posted in Musings
Sponsored By

Wow, a 512 meg CF Card for $140?  Crap...and I JUST bought a 128 meg...

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.