Monday, April 07, 2003

Managed Wrapper for BITS

Managed Wrapper for BITS

BITS is a pretty cool background transfer service that does the hard work of actually determining when your network connection is idle to transfer files. A managed wrapper for the API just became available on MSDN.

Monday, April 07, 2003 9:38:38 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 
Blast from the Past

Blast from the Past

Keith brings up writing certification exams for Microsoft.  We both did this for a while and became SMEs (Subject Matter Experts) in the terminology of the team at the time.  It was interesting to get some insight into the truly bizarre way that importance is assigned to topics in those tests.  The way correct answers were determined was sometimes even more bizarre.  One of the main reasons that I stopped the whole exam treadmill years ago. 

I still laugh when I remember back to arguing with Ken and Mike over whether or not Access questions should be on a Windows Architecture exam...

Sunday, April 06, 2003 11:49:56 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Wednesday, March 26, 2003

.NET 1.1 Breaks ChainStream

.NET 1.1 Breaks ChainStream

Well we have been working hard on converting our 1.0 code base to 1.1.  We keep running into little things that are breaking our code though.  The latest is a breaking change in ChainStream.  We had a compression stream that we were running on top of our web services. In .NET 1.1 some new code (SoapServerProtocolHelper) was introduced that attempts to seek the stream closest to .NET without checking the CanSeek property.  Essentially what this means is that whereas non-seekable streams were legal in 1.0 they are no longer legal in 1.1.  Kind of kills some of the utility of ChainStream since it means that you pretty much have to buffer the whole request or figure out how to just buffer some of the envelope so you can seek back when requested. Here is the disassembly courtesy of Anakrino:

internal static SoapServerProtocolHelper GetHelper(SoapServerProtocol protocol) {

SoapServerMessage local0;

long local1;

XmlTextReader local2;

string local3;

SoapServerProtocolHelper local4;

local0 = protocol.Message;

local1 = local0.Stream.Position;

local2 = SoapServerProtocolHelper.GetXmlTextReader(local0.ContentType, local0.Stream);

local2.MoveToContent();

local3 = local2.NamespaceURI;

local4 = SoapServerProtocolHelper.GetHelper(protocol, local3);

local0.Stream.Position = local1;

return local4;

}

The killers are the lines that attempt to set the position...

Wednesday, March 26, 2003 12:45:04 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Tuesday, March 25, 2003

Radio Fixed

Radio Fixed!

Radio is working again finally!  Thanks to Lawrence Lee.

Tuesday, March 25, 2003 8:31:15 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Wednesday, March 19, 2003

.NET Memory Profiler

.NET Memory Profiler

Great tool that I found that helped us find a pernicious "memory leak". http://www.scitech.se/memprofiler/ offers a memory profiler that doesn't slow down your application as much as the Borland memory profiler but still allows you to compare memory snapshots, find objects that aren't being disposed and potentially trace down the root references of those objects.

Wednesday, March 19, 2003 3:51:57 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 
WildGrape NewsDesk and DotNetWebLogs

WildGrape NewsDesk and DotNetWebLogs

I am reminded why I have yet to leave Radios aggregator.  As I am reading the blogs on http://dotnetweblogs NewsDesk continues to show blogs I have read as new every time I start it up!  Radio OTOH is smart enough to only show items that are truly new.  I have no idea how or why they differ but I certainly prefer the way Radio does it.

Wednesday, March 19, 2003 1:50:56 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Thursday, February 13, 2003

SourceGear Vault

SourceGear Vault

I don't mention products here very often but this one has me excited.  I have hated Visual SourceSafe for quite some time now.  I am sure that many of you share my frustrations with it.  SourceGear the makers of the popular SourceOffsite add-in for VSS shipped Vault at the VSLive show in San Francisco this week.  Vault is a complete replacement for VSS using SQL Server as a back end store and Web Services/ASP.NET as a transport mechanism!  It is a purely managed solution that replicates almost 100% of VSS functionality. I have no connection to the company but I have already ordered a copy.  They have a great starter pack at $599 for 5 developers.  I have just started using this product and I have high hopes for it.  Check it out.

Thursday, February 13, 2003 9:48:00 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Friday, January 10, 2003

FONT FaceVerdanaGenevaArialHelveticaSans

Read Only Application Object

Requirement:

Pre-Load the ASP.NET Application object and don’t allow other pages in your project to add/modify/delete. Basically, make Application read-only.

Solution:

         private void SetApplicationReadOnlyStatus( bool state ) {
                  Type type = Application.GetType().BaseType;
                  PropertyInfo readPropInfo = type.GetProperty("IsReadOnly",  BindingFlags.NonPublic | BindingFlags.Instance) ;
                  if( readPropInfo != null ) {
                        readPropInfo.SetValue( Application,Convert.ChangeType(state,readPropInfo.PropertyType ) ,null);
                  }
            }
            private void Page_Load(object sender, System.EventArgs e) {
                  Application["MyKey"] = "myValue";
                  // Set application to readonly so that we will not allow any changes.
                  SetApplicationReadOnlyStatus( true );
                  try
                  {
                        // Try setting a value 
                        Application["MyKey"] = "New value";
                        Response.Write("You won't see this");
                  }
                  catch(Exception ex) {
                        // You'll end up here
                        Response.Write(ex.Message);
                }
            }

Thanks to Sairama for the code!

Set the ASP.NET Application Object to Read-Only. [Scott Hanselman's Weblog] Friday, January 10, 2003 4:20:52 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Wednesday, November 20, 2002

PAG ASPNET Security Beef I Know That A Number Of Folks Out There In The Wild Ha

PAG ASP.NET Security Beef

I know that a number of folks out there in the wild have been reading this document.  I have been reading it in parts over the last couple of weeks.

I found it extremely strange how insistent they seem to be on encrypting the connection between the application server and the database server.  To the extent that they are talking about running it over IPSec or SSL.  They don't really address their reasoning for this insistence. I can see this being a valuable technique where the communication between your application server and database server must be done over a semi-trusted network. In the case where you totally control the network is this still necessary or just overkill?  I mean today how many non ASP.NET applications communicate with the DB server over internal networks using an encrypted connection?

My second beef is that they show you how to setup an IPSec connection between the application server and database server and then say the technique is only suitable for development servers.  They never address how it should be done in production with an actual example.

Wednesday, November 20, 2002 10:44:09 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Friday, November 08, 2002

ReadySetVisual StudioNET I Will Be Doing A Local Event For Developers Cons

Ready...Set..Visual Studio.NET

I will be doing a local event for developers considering the move to Visual Studio.NET in Seattle 12/4 and Portland 12/11 with Chris Sells, Scott Hanselman, Bill Vaughn and Jim Blizzard.  The PDF file of the invite is here.  If you haven't yet made the jump to Visual Studio.NET join us for a day of orientation!

Friday, November 08, 2002 9:55:06 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]   My Hobbies
 


Administration
Sign In