|
||||
Tuesday, October 19, 2004Hiding and Outlining Code: using the #region keyword in .NET
Quick tip: you can put sections of your code inside #region blocks in order to collapse and expand them using .NET Studio's outlining feature. The text after the #region keyword is displayed next to the plus/minus sign, so keep it descriptive.
Tuesday, October 12, 2004For example:
would give you two code regions named "database code" and "encryption code". You could then collapse the regions you're not interested so the code view is easier to manage. You can also nest regions:
to gain finer control of what code is shown or hidden. In the above example, you could hide the entire function, or just hide sections of it. Check out MSDN's page on outlining and hiding code to get more information on regions and what menu options are available. Happy outlining! Missing SMTP Virtual Server in Windows 2003
Sometimes the SMTP Virtual Server will disappear in the IIS Manager on Windows 2003, especially if you've done some installing/uninstalling/reinstalling of IIS, SMTP, etc.
Friday, October 08, 2004Until it's fixed in Service Pack 1 (we hope), you can restore it by running this from the command prompt (in the Accessories program menu): regsvr32 c:\windows\system32\inetsrv\smtpsnap.dll Fast Flash applications for the web
Laszlo appears to be a free, open-source tool for quickly building rich web applications. It takes XML-based source files and generates Flash applications. Sounds very similar to Macromedia's own Flex, except that Laszlo is free and Flex is $10,000 per CPU, last time I checked. Hmm.
Thursday, October 07, 2004Configure SMTP relaying with IIS 6 / Windows 2003
I've spoken with other developers about how to use the SMTP service built into Windows 2003 as an outbound SMTP relay. For example, say you have a small web site with an "Email this web page to a friend" feature. You want to be able to use Windows 2003 SMTP to send emails to anyone in the world, yet protect yourself from being used as an open relay by spammers. Normally you would make use of the authentication with Active Directory, but it becomes more problematic if you want to use the SMTP service from something like PHP or another machine.
Here's how to make Windows SMTP a protected open relay: That's it. You can now use that machine as a general purpose SMTP box. CPU Monitoring and Throttling in IIS 6
You can enable some basic CPU monitoring in IIS, but the downside is you have very few options if a given site takes up too much CPU. You can either a) record something in the event log, or b) have the site shut down. Step a) doesn't prevent the haywire site from continuing to hog the CPU, yet step b) is too drastic.
What we'd really like is a way to throttle a site based on CPU, similar to IIS bandwidth throttling. Thankfully, there's a general way to accomplish this:
Archives September 2004 October 2004 November 2004 December 2004 January 2005 February 2005 March 2005 April 2005 May 2005 |
||||
| ||||