in

mscommunity.net

Interactive mscommunity.net online activities

DamirDobric

travanj 2009 - Posts

  • Windows 7 Release Candidate

    How can I get access to the build?

    Few hours before RC will appear for download, I would like to post short summary in a form of Q&A.

    A:  TechNet and MSDN subscribers will have access to the build on those websites close to April 30th.   MVP can also download the build from Connect on April 30th.  All others can download the RC on the Microsoft Download Center on May 5th.

    Q:  How big is the Window 7 RC download?

    A: The x86 version of Windows 7 RC is approximately 2.47 gigs. The x64 version is approximately 3.2 gigs.

    Q:  Will the RC code be download-only, or can I have physical media mailed to me? 

    A:  The Windows 7 RC code will only be available for download. 

     

    Q:  Will my product key from Beta work for the RC, or do I have to register to get a new one?

    A:  No – you will need to register for a new PID in order to run RC.

     

    Q:  Is there a cap to the total number of downloads for Windows 7 RC?

    A:  There is no limit to the total number of downloads for Windows 7 RC.

    Q:  Will Windows 7 RC be available in both 32-bit and 64-bit?

    A:  Yes.

     

    Q:  Is there a choice of SKUs for Windows 7 RC, or is it only available in Ultimate like the beta?

    A:  There is one release candidate release, with all the capabilities of the Windows 7 Ultimate SKU. 

     

    Q:  When does this build expire?

    A:  Windows 7 RC will expire on March 1, 2010 – at this time the system will reboot every two hours. The license of windows 7 RC will expire June 1, 2010.

    Q:  Where should I submit feedback on Windows 7 RC?

    A:  The Beta testing has completed, and the release candidate is the time for customers and IT professionals to really start kicking the tires in terms of application compatibility, drivers and devices.  We will of course continue error monitoring, but application compatibility issues should be reported to the ISV.

     

    Q:  What tools and resources are there available for IT pros to begin testing and deploying Windows 7?

    A:  There are many tools available for IT Pros to begin their testing and deployments, including the Windows Automated Installation Kit, the Application Compatibility Toolkit and the Deployment Toolkit.  More information about these tools can be found at www.microsoft.com/springboard

     

    Upgrade Experience

    Q:  How does Microsoft recommend I install RC?  

    A:  To install the Windows 7 RC, users will be required to either upgrade from a Windows Vista image, or do a custom (clean) installation.  Windows 7 Beta users will need to do a custom (clean) installation. 

     

    Q:  Why isn’t there an easy way for me to upgrade from beta to RC?

    A:  Upgrading from one pre-release build to another is not a scenario a real-world customer will experience.  We want our testers to experience real-world setup to provide us with real-world telemetry as we work on finalizing the product.

     

    Q:  Is there a smooth upgrade from Windows XP to Windows 7?  

    A:  As a result of the many changes we’ve made to the operating system, users who wish to upgrade from Windows XP to Windows 7 on the same computer will need to perform a custom (clean) installation.

    Q:  Does Microsoft provide any guidance on how to transfer files and settings from a previous operating system to Windows 7 when a clean installation is required?

    A:  Tools, guidance and other resources are available on windows.microsoft.com to assist in the upgrade process.  Microsoft also provides a special utility on the release candidate CD to assist users with identifying, backing up and transferring files and settings to Windows 7.  For more information on the Windows Easy Transfer utility please visit http://technet.microsoft.com/en-us/library/dd446674.aspx.

  • .NET40: Workflow-, Activity- and Instance-States of Workflow Service

    This post shortly describes all different states of one workflow, activity and instance of .NET 40 Workflow Service. In general these states are produced as tracking records of so called WF and WCF tracking subsystems.

    States of Workflow Foundation Tracking Subsystem

    Workflow tracking records. Workflow tracking records describe the life cycle of the workflow instance. The following list has important workflow events that correspond to different states of a workflow:

    • Started
    • Idle
    • Resumed
    • Completed
    • Persisted
    • Unloaded
    • Deleted
    • Unhandled Exception
    • Aborted

    Activity tracking records. Activity tracking records include activity status events. The following list has important activity level events that correspond to different states of an activity within the workflow:

    • Closed
    • Canceled
    • Faulted

     

    Workflow Service Instance states:

    • Running
      Currently processing.
    • ReadyToRun.
      Ready to start processing. May be in this status during throttling or as a result of the Instance Restart Service unlocking orphaned instances
    • Blocked
      Waiting for external messages or events (such as Timer)
    • Suspended
      Paused due to manual user action or exception, requires manual resume Terminated/Completed. Not an actual store status as instance that terminate (user action) or complete (graceful completion of WF instance) will be removed from store.

    States of Windows Communication Foundation Tracking Subsystem

    WCF types of tracking records are: message track records and service track records.

    Message track records:

    • Receive
    • Send
    • Faulted

    Service track records:

    • Started
    • Stopped
  • Configuring WCF with Membership Provider

    Create Certificate

    Firs of all you have to create a certificate, because credentials have to protected. This example shows how to create selfsigned certificate:

    Create in local machine if you want to host a service under system account:

    makecert.exe -sr LocalMachine -ss My -n CN=localhost -sky exchange -sk –pe

    Create it in local store of the current user if the service will be hosted in context of the currently logged user:

    makecert.exe -sr CurrentUser -ss My -n CN=localhost -sky exchange -sk –pe

    This is the result if certificate has been created in localmachine.

    image

    Now, you can drag or export this certificate to the store of user who will run the client. The certificate has to be imported in Trusted People:

    image

    and the root CA (issuer of self signed certificate) should be dragged/imported in trusted authorities:

    image

    Service Configuration

    Now, you have to configure service properly. Here is the sample configuration, which shows all you need:

    image  

    IIS Authentication Settings

    image 


    Client Configuration:

    Following picture shows all you need in the client configuration:

    image

    Client Code:

    HelloWorldServiceClient serviceClient = new HelloWorldServiceClient();
    serviceClient.ClientCredentials.UserName.UserName = "username";
    serviceClient.ClientCredentials.UserName.Password = "password!";
    serviceClient.QueryProcessObjects(…);

    Message Sequence
    Last but not least, here is the sequence of messages exchanged between client and service. As you see, before the action is invoked (QueryProcessObjects) there are few negotiation messages, which establish the new session.

    image

  • Tracing PEX condition paths

    If you want to now how exactly PEX is solving conditions (dynamic symbol execution) in different braches of your code, then you should take a look on following example. The method SomeMethod has differnet branches. For each branch there is one condition, which internally locks slightly different.

    [PexMethod]
    public int SomeMethod(int x, int y)
    {
                if (x + y == 7)
                {
                    PexStore.Value<string>("Condition", PexSymbolicValue.GetPathConditionString());
                    PexStore.Value<string>("Raw Condition",
    PexSymbolicValue.GetRawPathConditionString());
                    return 1;
                }
                else if (x == 4)
                {
                    PexStore.Value<string>("Condition",
    PexSymbolicValue.GetPathConditionString());
                    PexStore.Value<string>("Raw Condition",
    PexSymbolicValue.GetRawPathConditionString());
                    return 2;
                }
                else if (y == 3)
                {
                    PexStore.Value<string>("Condition",
    PexSymbolicValue.GetPathConditionString());
                    PexStore.Value<string>("Raw Condition",
    PexSymbolicValue.GetRawPathConditionString());
                    return 3;
                }
                else if (y == 5)
                {
                    PexStore.Value<string>("Condition",
    PexSymbolicValue.GetPathConditionString());
                    PexStore.Value<string>("Raw Condition",
    PexSymbolicValue.GetRawPathConditionString());
                    return 3;
                }
                else
                {
                    PexStore.Value<string>("Condition",
    PexSymbolicValue.GetPathConditionString());
                    PexStore.Value<string>("Raw Condition",
    PexSymbolicValue.GetRawPathConditionString());
                    return 4;
                }
            }

     

    When you explore this method with PEX following result appears:


    image

    Note that statements PexAssume and PexStore are added by me to explore condition paths. They are not consistent part of the program.

  • Using of Factory in Pex

    Pex (program exploration tool)  a great capability to create factory helper classes, when PEX itself is not able to guess how to do that automatically.
    To make this explicitly useful, you have to now in which case PEX can do it for you.
    Here is one example. Assume there is an interface and concrete implementation of it.

    image

    Assume now, there is a testing/exploring class which looks like:

    image

    Only important thing in this class is that constructor receive an argument of interface type. When exploring methods in the class PEX first has to guess how to create the instance of the class. This is important, because PEX doe not traverse all assemblies and look for implementation of the class. Such kind of searchin in assemblies would take too long. Additionally,, what should PEX do if more concrete implementation are found?

    So, PEX will in this case explore  all regularly, but with a little warning, which indicates, that PEX is going to create a factory for you.

    image

    Click on text marked  above and following appears:

    image

    Right mouse click on selected text, then accept create factory and PEX is done:

    image

    The method ClassFactory.Create() is the place where to implement your factory:

    When you now repeat the sample exploration as shown above all will work fine, because PEX has already factory created and it will be used.

    image

    Here is the test method, which makes usage of the factory:

    image

  • Declarative Workflow Services 4.0: Error - A Location cannot be generated..

    Problem Description

    When working with declarative workflow services 4.0 you may get this message in the workflow service which receive an asynchronous the message.

    System.WorkflowModel 4.0.10924.1: Throwing exception: System.InvalidOperationException: A Location cannot be generated from an Expression of type Call.

    Solution

    This exception is thrown by Workflow Model when the sender sends the message with invalid action. That culd mean that the action is not known by the receiver. For example ReceiveAction is bount to operation IMyService.Operation1, butservice sends the message with action=Ooperation1

  • Declarative Workflow Services 4.0: Error - InstanceKeyNotFoundException

    Problem Description

    When working with declarative workflow services, you may get following error:

    System.ServiceModel.Core: Throwing exception: System.ServiceModel.Persistence.InstanceKeyNotFoundException: The requested operation could not complete because instance key '3019110b-9313-ab7a-db1e-25e00cae4f5e' could not be found.
       at System.ServiceModel.Persistence.PersistenceProviderDirectory.LoadOrCreate(InstanceKey key, Guid suggestedIdOrId, Boolean canCreateInstance, ICollection`1 associatedKeys, Boolean throwOnThrottleExceeded, TimeSpan timeout)
       at System.ServiceModel.Persistence.PersistenceProviderDirectory.LoadOrCreateAsyncResult.OnLoadOrCreate()
    System.ServiceModel.Core: Throwing exception: System.ServiceModel.Persistence.InstanceKeyNotFoundException: The requested operation could not complete because instance key '3019110b-9313-ab7a-db1e-25e00cae4f5e' could not be found.

    Workaround

    This exception is mostly thrown by receiving of messages, for example in ReceiveMessageAction which uses content based correlation. The error is handled internally by workflow service model, and it does not indicate any error in your workflow which expect to receive the message.
    In opposite, the problem is caused by the sender of the message. Sender sends a valid message, but your receiver expects to reeive the message which can be correlated with one or running workflow instances.
    For example you send two messages to service with Order=1 and Order=2 within two workflow instance. They both purchase orders separately. After a while, service may send notification about ordering status. If the service sends Order=1 and Order=2 (which are bound to correlation token) all will work fine. However, if the service sends valid message,but with Order=3 (which is not known by your receiver activity), the exception shown above will be created.

  • Declarative Workflow Services 4.0: error XC1008

    Problem Description

    When working with declarative workflow services you may get following error on build:

    error XC1008: The XAML MSBuild task only processes files that either contain an '{http://schemas.microsoft.com/winfx/2006/xaml}Directive.Class' directive or a '{http://schemas.microsoft.com/netfx/2008/xaml/schema}SchemaType' definition. Please refer to documentation for usage of ‘{http://schemas.microsoft.com/winfx/2006/xaml}Directive.Class’ and '{http://schemas.microsoft.com/netfx/2008/xaml/schema}SchemaType'.

    Workaround

    To solve this problem set “Build Action” to none. The default build action is mostly for some reason set on XamlAppDef.

    image

  • Declarative Workflow Services 4.0: Error - A binding instance has already been associated ..

    Problem Description

    When trying to start declarative workflow service within Console Application of similar you may get following error:

    A binding instance has already been associated to listen URI 'http://localhost:88/TestService.xamlx'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.

    Workaround

    The problem occurs, when Workflow Designer corrupts the XAMLX file , which describes your declarative workflow service. When working with send an dreceive activities (means adding new and deleting existing, changing of configuration, adding and deleting contracts etc), XAMLX file may contain multiple endpoints.

    To solve the problem first forget designer. Second, open XAMLX file with XML editor and look for endpoints. Before you do that close file opened in designer. Otherwise VS will cache designer state and your changes in XML editor will be thrown away. Then delete the endpoint which you do not need. This is mostly the first one, which has been automatically created. It is always named “GetDataEndpoint”.

    image

    After that save XAMLX file an open workflow. You will gen another error now, which indicates that some reference is missing (For example __ Reference ID 0 – See picture above). Then open XAMLX again find refernce and delete it.

    Following picture shows what I have deleted in my case:

    image

    Save XAMLX again and open it now in designer.

    Hope this helps…

    Damir

  • Content based correlation in Workflow Services 4.0

    One of powerful features in upcoming Workflow Services 4.0 is definitely correlation between asynchronous messages. When using workflow services at all, you may notice that typical web service scenario Request-Replay is mostly nit very useful. Because workflows are mostly used to perform long running actions, participants in the distributed workflow will need to communicate asynchronously. Such scenarios are very common in BizTalk solutions.

    Imagine we have following workflow:

    image

    The SendMessageActivity sends the message M1 and ReceiveMessageActivity receive the message M2 asynchronously. Because multiple workkflow instances can run the same workflow, the underlying execution engine needs to known which message of type M2 belongs to which workflow instance. This process
    is known as correlation. Because workflow can correlate messages based on their content (for example one can decide “all message with the same order id belongs to same workflow instance”) this feature is called “Content Based Correlation”.

    Before you proceed, be sure that the contract has a property (attribute) with name OrderId.

    image

    How to make it working?

    Select the top level Sequence or other activity in the workflow.  Click the “Variables” button at the bottom left of the designer.  Click the “Add variable” button in the “Variables created by me” section.  In the “Variable name” column type “OrderCorrelation” (Assuming the correlation will be based on Order Identifier).  In the “Type” column expand the drop down and select “Browse for Types…” . Following window appears:

    image

    Now, select the SendMessageActivity and set correlation handle as shown below:

    image

    First select the proper endpoint “SendMessageEndpoint”. OrderIdQuery is the name of “correlated content” and //temp:OrderId is the XPath to the OrderId XML (message) property. Temp stands for tempuri namespace as shown in the snapshot of the correlation represented in XAML:

    image

    Now, do the same for receive message shape:

    image

    Note that correlation handle “CorrelationToken”, Name “OrderIdQuery” and XPath “//temp:OrderId” by send and receive activities have to match exactly!
    If this is not the case you may get following two errors:

    If correlation content query (OrderIdQuery) is not set at all:

    System.WorkflowServiceModel 4.0.10924.1: Throwing exception: System.ServiceModel.ProtocolException: A correlation query yielded an empty result set. Please ensure correlation queries for the endpoint are correctly configured.

    If correlation content query is set, but with differnet names (e.g. OrderIdQuery vs. OrderIDQuery):

    System.WorkflowServiceModel 4.0.10924.1: Throwing exception: System.InvalidOperationException: The CorrelationHandle is already in use with SubInstance 'ae9179ac-e7cd-908b-8a1b-fb0760c7f8a2', so it cannot be used with SubInstance '50ab78c7-e00e-2800-05ba-a81a3d160830'.

    Posted tra 08 2009, 08:40 by anonymous
    Filed under: ,
  • .NET Services March09 - CTP

     

    Microsoft .NET Services Software Development Kit (March 2009 Community Technology Preview)

    Microsoft .NET Services is part of the Azure Services Platform and includes: the Access Control Service, the Service Bus, and the Workflow Service.

  • Flicker Vortrag an der FH in Frankfurt (German Version)

    Die Daenet GmbH hat gemeinsam mit der Fachhochschule Frankfurt am Main im Wintersemester 2008/09 ein Studienprojekt durchgeführt mit dem Ziel neue innovative Anwendungen auf Basis der Flicker Plattform zu implementieren. Diese Anwendungen sollten primär mit Microsoft Silverlight 2.0 bzw.  Silverlight for Windows Mobile realisiert werden.

    Flicker ist ein innovatives Gerät (http://alifepass.daenet.eu), welches eine zuverlässige Identifizierung mittels Fingerabdruck im Internet sowie anderen Informationssystemen ermöglicht. Es hat ungefähr die Maße einer Kreditkarte und besteht aus einem optischen Sensor, einem Display, einem Fingerabdruck Sensor sowie einem Mikroprozessor. Durch den eingebauten optischen Sensor ist Flicker in der Lage, den von einem Bildschirm ausgestrahlten Flicker-Code zu empfangen, und die darin enthaltenen Informationen mit Hilfe des Fingerabdrucks des Benutzers zu entschlüsseln. Die entschlüsselten Informationen können z.B. Passwörter, PINs, TANs oder Meldungen anderer Arten sein.

     

    Damir

  • Scripts for SQL Server Snapshots

    Just for the sake of simplicity, I’m posting all three required scripts which create, drop and restore SQL Server Snapshot Databases.

    -- Create snapshot

    CREATE DATABASE TestDb_Snap1 ON( NAME = TestDb, FILENAME = 'C:\Temp\\TestDbSnap.ss' )

    AS SNAPSHOT OF TestDb;

    GO

     

    -- Drop Snapshot

    DROP DATABASE TestDb_Snap1

     

    -- Restore Snapshot

    RESTORE DATABASE TestDb from

    DATABASE_SNAPSHOT = 'TestDb_Snap1'

  • How to send feedback to WCF team?

    This link can be used by any MS-Connect user: https://connect.microsoft.com/wcf/Feedback

Powered by Community Server (Commercial Edition), by Telligent Systems