Scott Hanselman

XMLSpy for Free? Manna from Heaven I say.

June 6, '04 Comments [2] Posted in Web Services | XML
Sponsored By

What a fantastic idea.  It only took five years.  XMLSpy Home Edition - free

I'm guessing someone blogged it last week (I gave up on catching up on blogs since I was almost three weeks behind), but there's now a free home edition of xmlspy. Many of the cool features, including the schema editor, are available. However, the web services support, primarily the WSDL editor, remain only a part of the enterprise edition. [DevHawk]

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

Here's to Descriptive Error Messages - It's going to be one of those weekends...

June 6, '04 Comments [1] Posted in ASP.NET
Sponsored By

Ok...I know it's a File Not Found Exception...I wonder what file it was looking for? :)

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

Buy a Microsoft Mouse and Keyboard today, deprecated tommorow

June 3, '04 Comments [4] Posted in Musings
Sponsored By

Is it just me, or do you visit the Microsoft Hardware site every week or so, just to see if the $150 Wireless Keyboard/Mouse kit that you to see if it's been deprecated?

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

Web Services Theory - New Class

June 3, '04 Comments [0] Posted in Learning .NET | Web Services | XML
Sponsored By

My buddy and co-worker Patrick Cauldwell is teaching a new class on Web Services Theory at OIT Portland on 185th and Walker.  It'll be Monday and Wedsnesday night at 6pm.  Patrick and I worked together in conceiving this class, and we are hoping to make it a three-part series: Web Services Theory, Web Services Applied, and Web Services in the Enterprise.

This is a class that you could send folks from your company to, they just need to enroll in OIT.  It's usually very straightforward and the class is inexpensive.  Definitely a bargain and a great way to learn about Web Services from a Web Services Architect at Corillian. Patrick also co-wrote a book from Wrox on Web Services, and deisgned the XML and Web Services curriculum at STEP Technology back in the day.  (Disclaimer: This class is not affiliated with Corillian in any way, it's given at the Oregon Insititute of Technology, a university in the Oregon State System of Higher Education.)  Spread the word!

I'll be teaching CST 407 Web Services Theory at the Oregon Institute of Technology (OIT) this summer.  The class is Monday and Wednesday evenings for 4 weeks, June 21nd - July 14th.  Registration is open if you are interested.  I'll be focusing on the theorectical aspects of Web Services and Service Orientation, so if you're interested in getting a good grounding in that part of Web Services, come on down! [Patrick Cauldwell]

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

Important Note: Replacing the default ViewState Persistance Behavior

June 3, '04 Comments [2] Posted in ASP.NET | ViewState | Bugs
Sponsored By

Scott Mitchell also has a good article on ViewState up on MSDN.

I talked to him before I blogged this and he agreed it was worth mentioning.  I blogged about this issue before

In his article Scott shows how one can override SavePageStateToPersistenceMedium and LoadPageStateFromPersistenceMedium to put ViewState somewhere else.  A few snippets are below:

   protected override void
     SavePageStateToPersistenceMedium(object viewState)
   {
      LosFormatter los = new LosFormatter();
      StringWriter writer = new StringWriter();
      los.Serialize(writer, viewState);
      StreamWriter sw = File.CreateText(ViewStateFilePath);
      <snip> 
  
}
   public string ViewStateFilePath
   {
      get
      {
         string folderName =
           Path.Combine(Request.PhysicalApplicationPath,
           "PersistedViewState");
         string fileName = Session.SessionID + "-" +
           Path.GetFileNameWithoutExtension(Request.Path).Replace("/",
           "-") + ".vs";
         return Path.Combine(folderName, fileName);
      }
   }

In this example code (that you shouldn't copy/paste into production :) ) you see that he's redirecting ViewState to serialize to a file with a name like ASPNET23234094498230948320492834-myfile-default.aspx.vs. 

The problem (an edge case certainly, but still a problem) with this approach is that it doesn't support multiple browser windows on the same machine hitting the same page

Remember where ViewState is stored by default - it's stored with the requested page instance (in the HTML).  Using the ASP.NET SessionID in the filename scopes the state to the user and adding the file name reduces scope to the Page Declaration, but not the actual request instance.

Fortunately, Scott Mitchell wisely aludes to a solution in his article when he says:

Note   One workaround would be to use a globally unique identifier (GUID) as the file name for the persisted view state, saving this GUID in a hidden form field on the ASP.NET Web page. This approach, unfortunately, would take quite a bit more effort than using the SessionID / URL scheme, since it involves injecting a hidden form field into the Web Form. For that reason, I'll stick to illustrating the simpler approach for this article.

I spoke with Scott, and he agreed that for this solution to be more ideal one would have to implement a solution using a GUID.  Otherwise, be aware that you may run into flakey concurrence bugs where pages step on each other's ViewState.

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.