Thursday, December 20, 2007

Spring Framework

The Spring Framework looks interesting stack of techologies.

PHP compiler for .NET

Phalanger the PHP compiler for .NET.

Monday, December 17, 2007

SqlMetal is now LINQ to SQL classes in Visual Studio .NET 2008

So, I looked at SqlMetal and thought it was real interesting, and even found a nice tutorial.

In the new Visual Studio .NET 2008, you just have to do two things to use the new features that are similar to SqlMetal:
  1. Ensure that your project is set to Microsoft .NET Framework 3.5 in the Project Properties
  2. Then just Add an Item... and select the LINQ to SQL Classes item

That's it and now your rolling with LINQ and SQL. Ya!

LinqPAD

LinqPAD is a nice tool to learn Linq .NET.

Friday, November 2, 2007

Microsoft Silverlight

I am starting to dig into Microsoft Silverlight. I'm really interested in a rich-UI framework that is cross platform.

Here is a list of resources I have found that seem worth having:

Tuesday, October 23, 2007

The Servant Notes

I'm participating in a book discussion of James C. Hunter's The Servant. Here a couple notes I've taken on it (thus far):

Ch. 1
  • Management is not something you do to other people
  • You manage things, you lead people
  • (Def.) Leadership: The skill of influencing people to work enthusiastically toward goals identified as being for the common good
  • (Def.) Power: The ability to force or coerce someone to do your will, even if they would choose not to, because of your position or your might.
  • (Def.) Authority: The skill of getting people to willingly do your will because of your personal influence.
  • Authority is about who you are as a person, your character, and the influence you've built with people.
  • Power erodes relationships
  • When power must be exercised the leader should reflect on why resorting to power was necessary
  • Behavior is choice
  • (Def.) $25,000 Challenge: The idea that for the right motivation anyone can modify their behavior
  • Challenge for the leader is to pick the character traits that need work and apply [edit] the $25,000 Challenge to them
  • Key then to leadership is accomplishing tasks at hand while building relationships
  • Without trust, it is difficult if not impossible to maintain a good relationship

Tuesday, October 16, 2007

Sorting and Classifying E-mail

This was interesting read as it describes the way FogBugz sorts and classifies incoming e-mail.

Baltimore Marathon

So, I ran jogged hobbled one leg of the Baltimore Marathon. It was fun to be involved in something that so many other people were participating in at the same time. And the encouragement from the bystanders only help all the more so.

Here are a couple of the painful lessons I learned as to not repeat again:
  1. Make sure to actually train before hand
  2. Wear sunglasses if you route runs east for any period of time
  3. Wear performance socks to prevent blisters
  4. Make sure that you park in a location that is not blocked by the race route
One can only guess how I learned these lessons.

Thursday, October 11, 2007

Bug Tracking Comparison

Here is a nice comparison between different bug tracking applications (its compared to BugZero).

Thursday, September 13, 2007

Allowing Visual Studio .NET Add-ins to load via a network share

We recently migrated to using a central file storage for our My Documents and this now means the the My Documents/Visual Studio 2005/Add-ins now lives on a network share. To allow .NET to load the add-ins you have to run CasPol.exe to change the permissions on the drive.

The below will grant full trust (least secure) privileges to the share. Read more about it here.


C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>CasPol.exe -m -ag 1.2 -url file://machineNameGoesHere/shareName/* FullTrust


Happy coding!

Friday, September 7, 2007

Flash + OpenSource + Charts

This is very cool.

UPDATE: It needs a native .NET API, maybe I'll create one and submit it.

UPDATE: I've submitted a first draft of a .NET web control. Hope to see it show up soon on the site.

Wednesday, August 29, 2007

IIS MetaEdit

Found a tool for editing the IIS 5.0 MetaBase.

How to enable HTTP Compression in IIS 6.0 for ASP.NET

Here is my simple guide to setting it up.

Step 1: Configuring Web Service Extensions in IIS Manager

  1. Open Internet Information Services (IIS) Manager
  2. Right-click the Web Service Extensions
  3. Click on Add a new Web Service extension...
  4. Enter Extension Name (recommend Http Compression)
  5. Click Add...
  6. Select C:\WINDOWS\system32\inetsrv\gzip.dll (alter path to your windows install directory as appropriate)
  7. Check the Set extension status to Allowed
  8. Click Ok
  9. In Web Service Extensions you should now see Http Compression and its status of Allowed
Step 2: Configuring the IIS Metabase xml file

The metabase.xml file is located at c:\windows\system32\inetsrv\MetaBase.xml and contains the compression configuration.

  1. Stop IIS
  2. Run below commands from the command prompt OR edit the metabase.xml to match the below modified version of the configuration.
  3. Start IIS

The original configuration without changes looks like this:

<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="FALSE"
HcDynamicCompressionLevel="0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe"
>
</IIsCompressionScheme>
<IIsCompressionSchemes Location ="/LM/W3SVC/Filters/Compression/Parameters"
HcCacheControlHeader="max-age=86400"
HcCompressionBufferSize="8192"
HcCompressionDirectory="%windir%\IIS Temporary Compressed Files"
HcDoDiskSpaceLimiting="FALSE"
HcDoDynamicCompression="FALSE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="FALSE"
HcExpiresHeader="Wed, 01 Jan 1997 12:00:00 GMT"
HcFilesDeletedPerDiskFree="256"
HcIoBufferSize="8192"
HcMaxDiskSpaceUsage="100000000"
HcMaxQueueLength="1000"
HcMinFileSizeForComp="1"
HcNoCompressionForHttp10="TRUE"
HcNoCompressionForProxies="TRUE"
HcNoCompressionForRange="FALSE"
HcSendCacheHeaders="FALSE"
>


The modified configuration to correctly configure compression looks like this:

<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt
ppt
xls
xml
pdf
xslt
doc
xsl
htc
js
css"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx
asmx"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt
ppt
xls
xml
pdf
xslt
doc
xsl
htc
js
css"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx
asmx
ashx"
>
</IIsCompressionScheme>
<IIsCompressionSchemes Location ="/LM/W3SVC/Filters/Compression/Parameters"
HcCacheControlHeader="max-age=86400"
HcCompressionBufferSize="8192"
HcCompressionDirectory="%windir%\IIS Temporary Compressed Files"
HcDoDiskSpaceLimiting="FALSE"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcExpiresHeader="Wed, 01 Jan 1997 12:00:00 GMT"
HcFilesDeletedPerDiskFree="256"
HcIoBufferSize="8192"
HcMaxDiskSpaceUsage="100000000"
HcMaxQueueLength="1000"
HcMinFileSizeForComp="1"
HcNoCompressionForHttp10="FALSE"
HcNoCompressionForProxies="FALSE"
HcNoCompressionForRange="FALSE"
HcSendCacheHeaders="FALSE"
>

Here is a couple of commands you can run to automatically update your compression configuration to get the above settings:

cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "ppt" "xls" "xml" "pdf" "xslt" "doc" "xsl" "htc" "js" "css"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoDynamicCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoOnDemandCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoStaticCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel "10"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "ppt" "xls" "xml" "pdf" "xslt" "doc" "xsl" "htc" "js" "css"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" "ashx"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoDynamicCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoOnDemandCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoStaticCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel "10"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcDoDynamicCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcDoOnDemandCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcDoStaticCompression "TRUE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForHttp10 "FALSE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForProxies "FALSE"
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs set W3Svc/Filters/Compression/Parameters/HcNoCompressionForRange "FALSE"


Note: I tried adding the .AXD extension for Web Resources and it works util I tried using AJAX.ASP.NET. The ScriptManager in AJAX library does its own Gzip compression of its .AXD files. This custom behavior causes the response to be double Gzip encoded resulting in a corrupted response. So far, I found no way to disable the ScriptManager from performing the compression of its own the resources. So sad. Seems like the ASP.NET team forgot to discuss with the IIS team what it was capable of doing.

Step 3: Check to make sure it works

I recommend using YSlow (FireFox Plug-in) and FireFox to check to see it your getting the compression for your web site and its components (css, js, etc.) You should now see that your page and its associations are now compressed. I did notice that small files (<3k) didn't seem to get compressed.

ASP.NET and Ajax

I found a third-party component (Ajaxium) which makes the entire page use Ajax for all post-backs.

ASP.NET and Gzip Compression

Found an interesting article discussing how to accomplish compression on JavaScript resources.

As it turns out, IIS 5.0 might be able to handle gzip compression natively for Aspx, which I found reading the ASP.NET: 10 tips for Writing High Performance Web Sites. For configuring IIS 6.0 I found this article and this other one helpful.

For some performance statistics on http compression check this out.

Saturday, August 25, 2007

Visual Studio 2005: Web Deployment Projects

I've got to read this sometime.

Massively GRANT permissions

The below little SQL Server 2005 script will generate GRANT T-Sql statements for all objects in the database. Fun stuff. There has to be a way to do this through the administration tools quickly... But, until I find it.

SELECT
CASE
WHEN type IN ('U','TF','FN','IF') THEN 'GRANT ALL ON ' + name + ' TO PUBLIC'
WHEN type IN ('P') THEN 'GRANT EXEC ON ' + name + ' TO PUBLIC'
END sql
FROM sys.all_objects WHERE schema_id = [change me] AND type IN ('U','TF','IF','FN','P')

Need to make sure you change the 'schema_id' to the schema_id of the database you want to run the script on. Oh, and the types are probably not complete, so BEWARE. All you have to do is then take the output and run it. Fun, fun and no hard type etc.

The script would also be handy for generating other broad categories of T-Sql for any objects in the database. Nothing though any DBA couldn't do in 5 minutes.

DISCLAIMER: Blah, blah, blah this is for development purposes only and you should do better than just granting ALL access to the PUBLIC. Done.

Friday, May 25, 2007

Info on Visual Studio .NET code name "Orcas"

Found some cool information on Visual Studio .NET code name "Orcas". Its a pretty detailed list of the feature improvements.
There was an error in this gadget