Benjamin Guinebertière

  • Changement de rôle en janvier

    Après 16 ans en SSII et à MCS (Microsoft Consulting Services), je change de fonction en janvier prochain. Je reste architecte et chez Microsoft, mais je change de division. J’intègre la Division Plateforme & Ecosystème (DPE) qui favorise l’adoption de la plateforme Microsoft pour des projets innovants. La division promeut par exemple la plateforme Windows Azure depuis la Professional Developer Conference 2008 (PDC) qui s’est tenue il y a un an.

    L’actualité prochaine sera autour de SharePoint 2010, Visual Studio 2010, la plateforme Windows Azure qui entre en production en ce début 2010, et plein d’autres technologies.

    Je garderai une affinité avec tout ce qui tourne autour de l’intégration (SOA, EAI, Interopérabilité, …) bien sûr, mais travaillerai également sur la plateforme Microsoft en général (à l’exception de produits à usage non professionnels tels que la Xbox, ce qui tombe bien car je ne me suis passionné que pour 2 jeux depuis Tétris !).

     

    Tout cela devrait me permettre de reprendre le clavier pour écrire sur ce blog plus souvent que je n’ai pu le faire récemment.

    A bientôt

     

    :-)

    Benjamin

  • Hardware and Windows Network Load Balancing

    I recorded this ~15 minutes sketchcast about Hardware load balancing and Windows Network Load Balancing

    You can download the WMV file at this location
  • BizTalk Server Roadmap

    A roadmap of BizTalk Server : BizTalk Server 2009 and beyond, relationship with « Oslo » is available at http://www.microsoft.com/biztalk/en/us/roadmap.aspx

  • WebCasts de la conférence SOA du 25 octobre dernier

    Les WebCasts de cette conférence sont disponibles à http://www.microsoft.com/france/vision/soa-conference/

    J'intervenais avec Unilog Management sur SOA et méthodologie: Comment démarrer sereinement un projet SOA

  • How to expand a VHD disk

    NB, MAR 2009: It was brought to my attention (thanks Fernando) that utilities like VHDResizer (http://vmtoolkit.com/files/default.aspx) may do the job in a simpler way. I did not check myself.

     

     I was working on a Virtual PC 2007 virtual machine with a dynamically expanding disk of a maximum of 16 Gb.

    This disk was the C: system drive on the virtual machine and I was running out of virtual space (I had enough space on the hardware host disk).

    A dynamically expanding disk can only grow to its predefined maximum size. The name comes from the fact that if you store 10Mb in a 16Gb dynamically expanding disk, vhd file size will only be ~10 Mb. You'll find much more at http://support.microsoft.com/kb/825092/en-us

    So the virtual guest machine had a 15.5 Gb system drive for a maximum of 16Gb.

    Here is what worked for me.

    Let's call C.vhd the file of the 15.5 Gb C: drive.

    1. shut down the guest virtual machine
    2. Create thru the Virtual Disk Wizard a new dynamically expanding disk with a max size of 100 Gb => this creates Cbis.vhd with an initial size of a few Kb.
    3. close Virtual PC 2007
    4. use VHDMount (installed it on my Vista machine from the Virtual Server 2005 SP1 installation) to issue the following commands
      (if prompted to format a disk, don't do it, if X: or Y: drives don't get created, don't worry)
      1. vhdmount /m /f C.vhd X
      2. vhdmount /m /f CBis.vhd Y
    5. go to Disk Management (Computer, Manage, Disk Management) on the real Vista machine
      1. assign X: to the disk corresponding to C.vhd if it's not already done
      2. format the disk corresponding to CBis.vhd. NTFS, quick formatting is OK
      3. assign Y: to the disk corresponding to Cbis.vhd if it's not already done
    6. Copy all the files from X: to Y:
      1. robocopy X:\ Y:\ /E /COPYALL /R:5
      2. Fix any remaining copy issues (for instance ACL not authorizing administrators group to read)
    7. go to Disk Management (Computer, Manage, Disk Management) on the real Vista machine
      1. Mark Y: partition as active
    8. Unmount X: and Y:
      1. vhdmount /u All
    9. Change the virtual machine .vmc file (with notepad) and replace C.vhd by Cbis.vhd
    10. Restart virtual machine

    Then you can delete C.vhd and keep CBis.vhd.

  • MSDTC transaction to a SQL cluster on a different domain

    http://support.microsoft.com/default.aspx/kb/827805/en-us explains how to test a distributed transaction scenario between 2 SQL Servers without the need to install DTCPing.

     

    Here is a scenario.

    BTS1 server initiates a distributed transaction on VSQL, a SQL instance hosted on a Windows Cluster having the following characteristics:

    • SQLN1 is the first node of the cluster
    • SQLN2 is the second node
    • The cluster has at least the following two cluster groups
      • SQL group
        • Network Name: VSQL
        • SQL Server instance resources (disks, SQL, etc.)
        • other resources like IP Address
      • Cluster group
        • Network Name: VCLUST
        • MSDTC resource
        • other resources like IP Address, quorum disk etc.

    BTS1 and the cluster are on two different domains. Among other things, they don't share the same DNS. For instance, BTS1 is BTS1.domain1.net and VSQL is VSQL.domain2.net

     

    In order to be able to ping VSQL, you can add an entry in BTS1, in its %windir%\system32\drivers\etc\hosts. file like

    <ip address>    VSQL

    If you only do that, you might end up with an error like

    The transaction has already been implicitly or explicitly committed or aborted

    In order to have the distributed transaction working, you need the following to be true (this can be done with the hosts. file):

    • BTS1 can ping VSQL
    • SQLN1 can ping BTS1
    • SQLN2 can ping BTS1
    • BTS1 can ping VCLUST

    NB: names must be the netbios names.

     

    Additional information:

  • ISA Server 2004/2006 would prevent local Windows Update

    From an ISA Server computer, when you try to check Microsoft or Windows Update from IE, you get the initial page, but when you want to check updates you get a 0x80072EFD error.

     

    To avoid that, configure Internet Explorer proxy to the local ISA Server on the Internal IP Address

     

    Exemple: your ISA Server has an internal address of 192.168.1.1, go to IE LAN Settings and use 192.168.1.1:8080 as web proxy.

  • Sample Behavior of BizTalk Server 2004 SP1 with .NET Framework 2.0 installed

    On a test environment, we had this exception on one of the two BizTalk Server 2004 SP1 nodes:

    Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks

    This was a BizTalk Server 2004 event in Application event log

    On the other node, they were .NET Framework 2.0 and BizTalk events (meaning that some code was not correctly written from a multithreading perspective).

     

    In fact, what happened was that BizTalk Server 2004 was running on top of .NET Framework 2.0 on one node and on top of .NET Framework 1.1 on the other node. So, an orchestration dehydrating on none node and rehydrating on the other node was just serialized with a Framework and deserialized with another Framework.

     

    Here are two KB articles related to that:

    Excerpt from KB841405:

    To run BizTalk Server 2004 on a computer that also has the .NET Framework 2.0 installed, upgrade the computer that is running BizTalk Server 2004 to BizTalk Server 2004 SP2. BizTalk Server 2004 is only supported on a computer that has the .NET Framework 2.0 installed if BizTalk Server 2004 SP2 is also installed.

  • How to HTTP POST a document to a BizTalk Receive Location

    I've been looking for this sample code on my hard drive again today.

    It will be easier to find it on my blog J

    Here it is:

            /// <summary>

            /// Sends a document via Http POST

            /// </summary>

            /// <param name="url">URL to send to</param>

            /// <param name="body">content to send</param>

            public static string SendViaHttpPost(string url, string body)

            {

                StringBuilder response = new StringBuilder();

                WebResponse result = null;

     

                try

                {

                    WebRequest req = WebRequest.Create(url);

                    req.Method = "POST";

                    req.ContentType = "text/xml; charset=utf-8";

                    req.Credentials = System.Net.CredentialCache.DefaultCredentials; // use current user credentials

                    byte[] someBytes = null;

     

                    someBytes = Encoding.UTF8.GetBytes(body);

                    

                    req.ContentLength = someBytes.Length;

                    Stream newStream = req.GetRequestStream();

                    newStream.Write(someBytes, 0, someBytes.Length);

                    newStream.Close();

     

                    result = req.GetResponse();

                    Stream ReceiveStream = result.GetResponseStream();

                    Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

                    StreamReader sr = new StreamReader( ReceiveStream, encode );

                    Char[] read = new Char[256];

                    int count = sr.Read( read, 0, 256 );

                    while (count > 0)

                    {

                        String str = new String(read, 0, count);

                        response.Append(str);

                        count = sr.Read(read, 0, 256);

                    }

                }

                finally

                {

                    if ( result != null )

                    {

                        result.Close();

                    }

                }

                return response.ToString();

            }

  • BizTalk explained in 2 slides

    slide 1

    Different services inside a company work with their own applications. They need to exchange information several times a day. For instance, sales people send orders to production once a day. All this correspond to non formal business processes.
    Services applications must continue to be able to live their lives independently.  For instance, marketing application will be upgraded to Version 2.3 next month while other applications won't move for at least 6 months.
    For these reasons, no integration between applications is done and the business processes are remain implemented at human and e-mail level.

    BizTalk Server enables implementing business processes at application level. In fact, applications send and receive messages (which can be seen as machine readable e-mails). When changing or upgrading one of the applications from v2.2 to v2.3, in order to keep automated business processes working, v2.3 must just be able to send and receive messages meaning the same thing as previous version v2.2 did (format can change) to and from BizTalk Server.
    People in each service just have to work with their application; they do not need to send e-mails to other services anymore. Sales people enter orders in sales application which will send a message to BizTalk. BizTalk will send the message to all applications which subscribed to new order messages. Production application is one of them.

  • BizTalk Server 2006 Documenter URL

    UK SDC BizTalk 2006 Documenter tool used to be on gotdotnet.

    It is now, as many gotdotnet projects on codeplex.

    Here is the updated URL:

    http://www.codeplex.com/BizTalkDocumenter

    The name became simpler too: BizTalk Server 2006 Documenter

  • Don't remember connection strings syntax? Use a .UDL file.

    Here is a tip I shared yesterday with a customer. 

    If you need to create a connection string and don't remember the syntax, here is a simple way of achieving your goal.

    • In a file folder or your Windows desktop, create a text file and rename it myCN.udl (only .udl extension is important)
    • double click the file
    • Enter the parameters in the UI
    • Close the UI
    • Open myCN.udl with notepad: you get your connection string

     

  • SAP .NET Connector must be installed for all users

    BizTalk Server 2004 and BizTalk Server 2006 SAP Adapter requires and uses the SAP .NET Connector which is distributed by SAP.

    For BizTalk Server 2006, you need SAP .NET Connecter 1.0.3 Runtime.

     

     

    It looks like only the user who installed the SAP .NET Connecter 1.0.3 Runtime can use it, and thus use SAP Adapter.


    If user X installs SAP .NET Connector (thru setupruntime.msi) and user Y tries to generate a schema from Visual Studio 2005, Y gets an error:


    Add Adapter Wizard
    ------------------------------------------------------
    Unable to display adapter user interface.
    SAP .Net connector is not installed
    ------------------------------------------------------
    OK

     

    In order to solve the problem, you have to install the SAP .NET Connector for all users. As option doesn’t show up in the GUI, you can do it that way :

     

    msiexec /i SetupRuntime.msi ALLUSERS=1

  • Delete Old Files script

    This sample script (WHICH IS PROVIDED AS IS) may help purging files older than n days in a folder

     Just copy the following code to a VBS file (DeleteOldFiles.vbs).

    Sample call:

    cscript DeleteOldFiles.vbs C:\Windows\Temp 90

    The code is:

     

    option explicit

    Call DoTheJob()
    WScript.Echo "--- end of script execution ---"

    Sub DoTheJob
        dim limitDate
        dim formattedLimitDate
        dim folder
        dim strComputer
        dim objWMIService
        dim colFileList
        dim objFile
        dim nbFiles
        dim totalFiles
        dim nbErrors
        dim result
        dim nbDays

        if WScript.Arguments.Count <> 2 then
            WScript.Echo "usage : DeleteOldFiles.vbs <folder> <nb of days ago>"
            WScript.Echo "sample: DeleteOldFiles.vbs C:\Windows\temp 90"
            Exit Sub
        end if

        folder = WScript.Arguments(0)
        nbDays = WScript.Arguments(1)

        'calculate and format limit date
        limitDate = DateAdd("d", -1 * nbDays , Date)

        formattedLimitDate = DatePart("yyyy", limitDate)

        if DatePart("m", limitDate) < 10 then
         formattedLimitDate = formattedLimitDate & "0"
        end if
        formattedLimitDate = formattedLimitDate & DatePart("m", limitDate)

        if DatePart("d", limitDate) < 10 then
         formattedLimitDate = formattedLimitDate & "0"
        end if
        formattedLimitDate = formattedLimitDate & DatePart("d", limitDate)

        'show what will be done
        WScript.Echo "Will remove files from " & folder & " with a date older than " & formattedLimitDate & " (" & nbDays & " days ago)"


        'Get the files and delete the old ones
        strComputer = "."

        Set objWMIService = GetObject("winmgmts:" _
            & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

        Set colFileList = objWMIService.ExecQuery _
            ("ASSOCIATORS OF {Win32_Directory.Name='" & folder & "'} Where " _
                & "ResultClass = CIM_DataFile")

        nbFiles = 0
        totalFiles = 0
        nbErrors = 0

        For Each objFile In colFileList
            totalFiles = totalFiles + 1
            if objFile.CreationDate < formattedLimitDate then
               
                result = objFile.Delete()
               
             WScript.Echo objFile.Name & " - " & objFile.CreationDate & ". Delete Result: " & result
             if result = 0 then
                 nbFiles = nbFiles + 1
             else
                 nbErrors = nbErrors + 1
             end if
            end if
        Next

        'Show the result
        Wscript.Echo "Total files in folder: " & totalFiles
        WScript.Echo "Deleted files:         " & nbFiles
        WScript.echo "Errors:                " & nbErrors
    End Sub

     

  • Application Pool with a domain user account identity

    Context

    Windows Server 2003 / IIS6
    - Virtual Directory running under an application pool with a domain user account identity
    - Virtual Directory security is set to Integrated authentication only
    - Trying to access this virtual directory from a domain user account (same domain as app pool identity account)

    Symptoms
    From web server, no pb.
    From another machine, domain user is challenged for user name and password and fail in 401. HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials

    Resolution
    Using NTLM only solves the issue
    This can be done with the following command (typically from C:\Inetpub\AdminScripts)
    cscript adsutil.vbs w3svc/NtAuthenticationProviders "NTLM"
More Posts Next page »

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker