blog community

Welcome to blog community Sign in | Join | Help
in Search

Raimond Brookman

Architecture and .NET Development

  • Host clipboard not working when running Virtual PC?

    Sometimes, pasting stuff from your clipboard suddenly stops working when running Virtual PC. 

    I found a tip on a blog and it "solved" the problem (actually it is a workaround :-))

    http://wpfwonderland.wordpress.com/2007/05/29/fix-virtual-pc-clipboard-stops-working-on-host-pc/

     

  • Adding sets of items to arbitrary collections using extensions methods

    Don't you just hate the fact that only some collection classes provide a possibility too add more than one item at once (such as List<T> does offer via AddRange).

    This means that often I'm writing this kind of code:

    var q = <some cool linq query>;
    foreach(var i in q)
    {
       someCollection.Add(i);
    }

    So I decided to write a little extension method to solve this problem; see below:

     

    public static class CollectionExtension
    {
        public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> source)
        {
            foreach (T item in source)
            {
                 target.Add(item);
            }
        }
    }

    This allows you to write code like:

    var q = <some cool linq query>;
    someCollection.AddRange(q);

    Seems like just a bit of saving, but when you apply this throughout the code, you will find it to save quite a bit. And I think it makes the code more readable...
    Not the most advanced extension method ever :-) , but hey, if it helps...

    Tags van Technorati: ,
  • Unable to generate a WCF proxy using svcutil but retrieving the wsdl works?

    Tags van Technorati: ,

    The other day at a client project, we wanted to generate a proxy using svcutil as we'd done many times before.

    However, the svcutil kept throwing strange error messages. Amongst them were:

    • Other mime type expected, expected application/soap+msbin1 but got application/soap+xml (HTTP error 415)
    • Could not import namespace <xyz>

    As it turned out, the problem was the following: Everything seemed to work because going to the .svc URL and adding ?wsdl produced the desired output.

    However, this wsdl does some schema imports, by referencing the svc URL, but this time using ?xsd=xsd0 , ?xsd=xsd1 etc. The strange thing was that these references produced errors (also when referenced by URL via Internet Explorer). This was also the reason that svcutil started throwing errors...

    After some more investigation, the culprit became clear. In order to generated the xsd output, the WCF service executes some code generation and dynamically compiles this. (Discovered using the procesmon sysinternals tool). In order to be able to do that, the current Identity (in this case the AppPool Identity of our virtual directory) needs to have the "List Folder / Read Data" permission, which it does not normally have.

    All these problems do not occur if you are running your website under the Network Service account, because account in fact does have these rights.

    So in the end the trick is to add the additional right on the c:\windows\temp folder for your App Pool Identity to solve the problem.

    Interestingly, if you look at the default rights using IIS7 and Vista, there is a default right assigned to the IIS_IUSERS group on the c:\windows\temp directory. Can you guess the additional permission :-) ? Probably MS has run into the same problem and fixed it in Vista and hopefully also in Windows Server 2008. In this case, making your App Pool Identity a member of the IIS_IUSERS group should be sufficient.

    [15-2-2008: Fixed typo]

  • How to know if anything is checked out in a directory subtree in Team Foundation Server Source Control

    Just a tip: to teg a list of checkout for all users, navigate to the root folder of the directory tree you want to check in your workspace using a Visual Studio command prompt.

    Then use the TF tool with the following command line:

    "tf status /user:* .\* /recursive"

    When the ".\* /recursive" is left out, it will provide you with a list of all check-outs in all workspaces. But mostly this is too much information. This syntax provides an easy way to check for checkout within a Team Project for instance.

  • Getting Remote Desktop connections working to Vista boxes

    After some searching I found the "old" dialog that enables the possibility of remote desktop (RDP) connections.

    Goto Start > Control Panel > System and Maintenance > System

    On the left side in this dialog choose "Remote Settings" (needs admin rights)

    A new dialog pops up; Choose the "remote" tab and choose the appropriate remote desktop configuration.

    Choosing "Allow any version" also enables XP and W2K systems to connect...

  • Persuading Visual Studio 2003 to use the correct login ID for Source Safe

    I had an interesting issue where somewhere in the past I had used the guest account inside Visual Studio to connect to Visual Source Safe. However, since then, Visual Studio remembered this login ID.

    It is visible using Tools->Options->Source Control->SCC Provider and it showed "guest" and was disabled.

    Today I wanted to access this database using my own account, only Visual Studio stubbornly kept using the guest id.

    I already had used the SSUSER environment variable to set the correct user; but although this makes the VSS explorer use the correct user, in this case it did not help to select the correct user for VS 2003.

    In the end I performed this trick to make it work:

    1. Temporarely rename the "wrong" ID (in this case 'guest') to something else.

    2. Restart Visual Studio and open te source controlled project

    3. Visual Studio will ask for an ID and Password because the one it knows does not work

    4. Fill in the correct ID and password.

    5. Close Visual Studio

    6. Rename the "wrong" id back to its orgininal name.

    This is the way it has worked for me; although I'd rather see a better solution for this problem....

  • Tag. I'm it.. it seems : the 5 things

    Well, let's not be the partypooper..I was tagged bij Wouter and now have the hard job to find people who've not already been tagimized..

    First, let's come up with five things you don't know about me (and I add: "when you know me through my blog" otherwise the first one's obvious :-). As everybody seems to brag about how young they started progamming and using computers, I'm trying not to do that :-) Especially since kids today start using computers at three or so, so in that respect there's nothing to brag about anymore...

    1. I'm almost two meters tall (1.98 m) which is something like 6"4 (I'm never sure how to calculate this). Being tall has its advantages and disadvantages. For instance, you always stand out in a crowd, which can be either good or bad. Another "nice" thing is that shopping for clothes is always done pretty quickly as not a lot of stuff fits :-(

    2. My sporting activities in the past year have mainly been squash and wall climbing. Especially the latter is a real challenge and it's quite a lot of fun.

    3. I recently decided it was time to go and buy an XBOX 360 and the first game I aquired is Project Gotham Racing 3, which is actually more fun than is good for me :-) (If you look at the amount of sleep I'm getting...) I've always been a race games fan, and that's also what I play mostly at the Info Support game day we have once a year with a bunch of collegues. Some favrotie games include the Colin Mc Rae Rally and Need for Speed series.

    4. To stay in the gaming arena: what I used to play a lot were adventures, but not just any old adventure such as larry; no I played the cool ones, created by LucasArts. Some of you might remember Maniac Mansion, Zak McCracken, Day Of The Tentacle, Sam and Max and the Monkey Island series. I thought they were hilarious. One problem though; at a certain point you start to think in the same twisted way as the game designers, which led to the newer adventures being completely finished within a week.... Pitty that these types of adventures do not really get made anymore :-(

     5. I like meat... and when possible large chunks of it :-) . People who know me now this. The biggest steak I ever had (and finished) was 1000 grams (35 oz) without a bone. The best restaurants I have had large steaks at I think are Daniels in Seattle and Morton's in LA.

    Now to select my next tagging victims :-)

     

     

  • Version 1.2 of the Team Foundation Server MSSCCI Provider

    A new version of this provider has been released, which enables you to connect a variety op IDE's to TFS Source Control. This list now includes:

  • Visual Studio 2003
  • Visual Basic 6.0, SP6
  • Visual C++ 6.0, SP6
  • Visual FoxPro 9, SP1
  • Visual Studio .NET 2002
  • Microsoft Access 2003, SP2
  • SQL Server Management Studio 2005
  • Sparx Enterprise Architect 6.1
  • Sybase PowerBuilder 10.5
  • TOAD for SQL Server 2.0
  • Unofortunately I don't see that they have improved the check-in mechanism. What we've seen is that checking in 10 files becomes 10 changesets instead of just one changeset containing all files. This is especially nasty when you have check-in policies like linking to a work-item, and then having to do this ten times. So now we are checking-out using VS2003; and checking in using the TFS explorer... this can't be what was meant when this thing was designed...

    Read more info or download it directly.

  • Vista licensing already circumvented

    With Vista, Volume licensing now works in another way, requireing a local activation server for companies each 180 days, or single activation using Microsoft servers..

    As this news story states, apparently all security can be broken, as some people seem to already have found a way to circumvent the official channels and register Vista without having an official key...

    Maybe things like licensing should be dealt with in an entirely different way.. so that actually buying the stuff becomes more interesting for people than trying to get around it. Compare it to iTunes, which became popular because people could obtain things easily and for a relatively low price. Maybe such a system can be thought up for other kinds of software too...

  • Solving System.Reflection.ReflectionTypeLoadException with VSTS Unit Testing

    Recently VSTS kept throwing the following exception at me

    Unit Test Adapter threw exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..

    The weird thing was that debugging a test would work, but simply running it would not. 

    After some searching it turned out that a drive containing the external assembly which it complained about was not available, although compilation did just work.. probably because of copy-local.

    I experimented some more and found that the easiest way to detect the assembly is to first perform a "Clean solution" in Visual Studio and then perform a "Rebuild All". This way, all dependencies wil be re-checked with compilation, and the compiler will simply complain about the missing assembly. Of course you could also use fuslogvw.exe, but I think this solution is often easier.

    [Update 11-04-2008]: I found that when the above does not works, switching to Debug mode, Running tests and switching back to relase mode can help

  • Greetings from Redmond

    Currently I am staying in the US with Marcel to participate in an Advisory Board for the definition of a new series of certifications.

    Read this post from Marcel for some more of the details.

    As Marcel said, when you have any ideas on how to do better certifications, please let me know and I can use this as input beside my own thoughts and experiences with selecting people to participate in projects and having done quite some software projects myself.

    One of the things I want to get across is that matching the business needs from doing IT-projects is what counts, and not merely knowledge of features. You need to know how to apply and use those features in a customer context..

    Btw, I must say that flying to the US is becoming more difficult each time... because of security restrictions we had to throw away all liquids and pastes from are handluggage. This effectively meant that I only could keep my razor blades (yes really :-)) and my toothbrush and that I had to toss out shaving cream, toothpaste etc. So on the first night we needed to do some shopping right away to replace those items... :-(

    Hopefully I can keep the stuff on the way back....

  • First Visual Studio Team System SP1 Docs are available

    With the new service pack, some interesting features have become available.

    Until recently we did not have documentation on those things yet. But now Brian Harry has made some of these documents and links available.

    I found especially the feature interesting that allows you to define custom controls in Work Item Tracking forms.

    At these links it is explained how to use this feature:

  • DSL Tools V1 have officially shipped!!

    As announced at stuart kent's blog DSL Tools have now officialy shipped as part of the Visual Studio 2005 SDK V3.

    This means we can now start major DSL developments using VS2005, without having to worry that we can start all over again at the next version.

    Now this is good news! They also have some documentation out on MSDN.

    You can download the SDK here.

  • Atlas by Fresh Logic Studios

    I ran into this Microsoft "Atlas" based application called "Atlas" :-)

    It integrates several other services (by mashup) such as Virtual Earth.

    Really cool application, and it shows wat the capabilities of the Atlas framework are ( when you add some good UI designing skills :-) )

    This channel 9 video show how to create such mashups

  • Rob Caron expands his horizon

    As most of you will know Rob Caron (and his blog) have been one of the major news sources for communicating about Team System developments.

    Rob has now announced that he will be switching jobs. His next job will still be at Microsoft though.

    As he writes:

    "Come Monday, I begin my new job as Lead Product Manager for Developer Tools Content Strategy. In my new role, I get to lead a team (a first for me at Microsoft) and work on a much larger content challenge, including chunks of MSDN Online."

    He also states that his blogging will continue, but with a wider scope, covering all Edtions of Visual Studio and not just Team System.

    I certainly will keep reading and wish him all the best for his new job.

More Posts Next page »

This Blog

Syndication

News

Subscribe in NewsGator Online

Subscribe in Bloglines

Add to Google


 Visitors since June 2005




Powered by Community Server, by Telligent Systems