Dev Blog - Johan Danforth
I'm Johan Danforth and this is my dev blog - a mix of .NET, ASP.NET, Rest, Azure and some other random coding stuff.
-
[Books] The practice test for the web app MCAD exams really sucks
A year or so ago I got the MCAD/MCSD self-paced training kits from MS Press to do the test exams. I've been through 12-13 of the questions now and I've seen an embarrassing number of errors so far. Code snippets with obvious errors that would never compile etc. etc. Right now I'm looking at a question about settings in web.config with 4 answers, and all of them are wrong! Amazing...
This practice test cannot have gone through any review whatsoever by someone who really knows ASP.NET :(
-
Watched some of the Indigo presentations from PDC
I watched a few of the streamed Indigo presentations from the PDC the other day. I got a good grip of the basics of what Indigo brings now, even though I think the presentations I saw wasn't really up to the standards.
The best way to prepare for Indigo seems to be to use ASMX and ES (Enterprise Services) inside the ASMX methods if you really need ES features like automatic transactions. I got the feeling that Don and the Indigo guys recommeded to stay away from .NET Remoting and I don't have a problem with that :)
The peer-to-peer stuff in Indigo looks really nice, and I will sure test them out once I get my hands on the libraries needed.
First day at work after 2 weeks off... I need coffee!!
-
Some good XAML / Avalon overviews
I wanted to find out what XAML is good for so I've been hunting stuff about Avalon and XAML the last days. I found a couple of good ones here:
- The last MSDN Magazine got 2 good articles written by Dino and Charles Petzold - A First Look at Writing and Deploying Apps in the Next Generation of Windows and Create Real Apps Using New Code and Markup Model.
- A bunch of good presentations from the PDC 2003 are available, look for the CLI 3xx presentations. CLI200 and CLI300 are good overviews. I was really impressed with some of the stuff you can easily do with graphics thanks to Avalon.
- Rob Rylyea's Longhorn blog got a few interesting posts about XAML and Avalon.
I'm really impressed by the new graphics capabilities in Avalon, but XAML itself still gives me headache. I do hope for a good designer tool so I don't have to battle with the markup language myself more than adding an event or two. I wasn't sure what XAML was good for first, but separating the code and presentation is never a bad thing to do.
The only thing I don't like at the moment about XAML is the ability to put code in the markup. I wish they could get rid of that and make XAML cleaner.
-
Snow, snow, snow...
It's been snowing all day today, and it's still coming down. The kids love it - it will be a white Christmas for sure :)
-
How can XAML be of good use to me?
The work-day is almost over me, I'm off to a friend of mine for some sauna and cold beer. Just to "prepare" somewhat for the christmas party later this evening :)
I looked at and listened to Chris and Don and their MSDN TV holiday special. I'm no emacs fan, but it was quite fun to see Don type away like that. A few typing errors now and then, but Don doesn't really need IntelliSense :) XAML still looks scary to me... I still have to figure out how XAML can be of good use to me in my everday work as a programmer and systems architect doing ASP.NET applications.
If anyone can tell me or knows of a good URL with intro to XAML, please comment!
-
[RotK] WOW!
What a trip!
'nuf said
-
[Books] Just got "A First Look at ASP.NET v. 2.0"
Just got the book I'm going to read during the x-mas holidays. Now, if only the darn DVD with Longhorn and Whidbey I ordered from Microsoft could show up sometime! I got the book last night, so I have only read the first chapter yet. But the book looks promising and a good introduction to the new stuff in Whidbey for us poor bastards that didn't make it to the PDC.
The book has a comfortable size, almost 500 pages but still doesn't feel bulky, so it's no problem to bring it with you. Contains a lot of screenshots, code snippets and tables with properties and seems to cover some of the more cooler new parts of ASP.NET 2.0.
-
[RotK] 24 hours left...
Sorry for the off-topic, but I have to strut around a bit :) My brother in law surprised me today with a ticket for me for the opening of the Return of the King movie tomorrow. Yay! I thought all tickets were gone already and I had planned to go some day after x-mas. Yummy!!
-
How to see your GAC-assemblies in the "add reference" dialog
IMHO it's a pity that you don't see every GAC-installed assembly when you do "add reference" from Visual Studio, and I couldn't find much information in the VS documentation about this. So I Googled around a bit and found these ways (I haven't tried them yet):
- Put a copy of your assembly in C:\WINNT\Microsoft.NET\Framework\v1.0.3705 or C:\WINNT\Microsoft.NET\Framework\v1.1.4322 or wherever your framework is installed
- Add a new registry key under one of the following registry paths with a default value that points at the location of your assemblies.:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders (I found WSE, NUnit and the Primary Interop Assemblies here).
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders (this is for VS.NET 2003 I think)
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\AssemblyFolders (this is for VS.NET 2002 I think)
- Put a copy of the assembly in the directory C:\Program Files\Microsoft Visual Studio\Common7\IDE\PublicAssemblies or, if you got VS.NET 2003, in the C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\PublicAssemblies directory.
I'm not sure yet, what the best choice is. According to the readme-file in the PublicAssemblies-directory:
"The PublicAssemblies folder is designed to contain managed assemblies that run within the development environment and are typically called from macros, add-ins, and other user code. The assemblies in this directory are displayed in the Project Add References dialog box and the Object Browser's Component Selector dialog box. For example, COM interoperability wrappers for automation object models (e.g. vslangproj.dll) should be installed in the PublicAssemblies folder."
I'll try the different options and see what happens, but I think I prefer to put my assemblies into a directory of my own, like C:\MyGACFiles\ and then add a "MyGACFiles" key to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders section.
Anyone with good experience with this? Is it changed in Whidbey so that you get a list of GAC-ed assemblies in the "add reference" dialog?
-
[SoapExtension] I did it again :(
This is the second time I try to test a SoapExtension class by calling a web service method from a browser! *hit self*
I've written the tiniest SoapExtension that captures web service exceptions, then publish it through my modified variant of Microsoft's Exception Management Application Block. Without comments and stuff it looks like this:
public class SoapExceptionHandler : SoapExtension
{
public override object GetInitializer( LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute)
{
//not used
return null;
}
public override object GetInitializer(Type WebServiceType)
{
//not used
return null;
}
public override void Initialize(object initializer)
{
//not used
}
public override void ProcessMessage(SoapMessage message)
{
switch(message.Stage)
{
case SoapMessageStage.AfterSerialize:
if(message.Exception != null)
ExceptionManager.Publish(message.Exception.InnerException);
break;
}
}
}
That's all you need. Register the SoapExtension to "listen" to the entire virtual root like this:
...
<system.web><webServices>
<soapExtensionTypes>
<add type="ExceptionManagement.SoapExceptionHandler,ExceptionManagement" priority="1" group="0" />
soapExtensionTypes>
webServices>
...UPDATE: Got rid of some source, just to shorten the post somewhat.