Mohammed Atef’s Technical blog

Change Team Foundation Server

Did you try to change Team foundation server for before?
I will give you very clear and easy steps to do this. First I will tell you how to change the server name for your Team Foundation server , I know this is very simple steps but this to any one first time try to do this process.
So you can connect Visual Studio team explorer to the new TFS server.  Use the following procedure:

  1. Open Visual Studio Team Explorer (VS2005 or VS2008)
  2. Open the ‘Connect to Team Foundation Server’ dialog (Tools -> Connect to Team Foundation Server…)
  3. Click on ‘Servers…’ button to open the ‘Add/Remove Team Foundation Server’ dialog
  4. Click on ‘Add…’ button to open the ‘Add Team Foundation Server’ dialog
  5. Type <New Server name> in the ‘Team Foundation Server name:’ text box
  6. Click ‘OK’
  7. Verify that an entry for devprosrv05 appear in the server list
  8. Click ‘Close’
  9. Select <New Server name> from the drop down list
  10. Select Team projects that you want Click ‘OK’

Now if you try to open any solution bonded to TFS you will see this message box cannot   connect to server. This issue because you didn’t refresh you TFS .so you need to do the following step to finalize changing your TFS server name.

  1. Close all instance of VS 2003, VS 2005 & VS 2008
  2. Delete Team Foundation Cache:
    a- C:\Documents and Settings\<Your User Id>\Local Settings\Application Data\Microsoft\Team Foundation\1.0
    Delete the Cache directory
    b- C:\Documents and Settings\<Your User Id>\Local Settings\Application Data\Microsoft\Team Foundation\2.0
    Delete the Cache directory
  3. Refresh your workspaces using VS 2005 & VS 2008 command prompts.
    a- From the VS 2005 command prompt run the following command:
    tf workspaces /s:http://<New Server Name>:<Port>
    b- From the VS 2008 command prompt run the following command:
    tf workspaces /s:http:// <New Server Name>:<Port>
  4. For Visual Studio .Net 2003, make sure you delete the solutions .suo file 
    I  hope this help
Advertisements

May 31, 2009 Posted by | Developement | Leave a comment

BizTalk Server POP3 adapter

Introduction

We have a many business scenario for using emails with BizTalk, in this article I will begin with creating simple application for receiving Email using POP3 adapter then I will continue with receiving emails with attachment files.

Configures a BizTalk receive location

Suppose you need to receive email using Post Office Protocol 3 (POP3) Internet email server so you can follow the following steps

1-     Open the BizTalk Server 2006 Administration Console, and expand the BizTalk Application1 application or create new application and use the your application in the next steps.

2-     Under the BizTalk Application 1 application, right-click the Receive Ports folder, and
select New ➤ One-Way Receive Port.

3-     Add a receive location to the new receive port, and specify the POP3 transport type.

4-     Click the Configure button to open the POP3 Transport Properties dialog box.

5-     In the POP3 Server configuration section, enter the name of the POP3 Internet mail
server where BizTalk will receive messages, as shown in the below Figure.

BTSPOP3

BTSPOP3

6-     Under the security configuration section, select the appropriate value for the authentication scheme setting for the POP3 mail server.you can select the authentication schema based on this knowledge.
Basic: BizTalk passes the username and password to the POP3 mail server in clear text.
Digest: BizTalk computes a hash value of the username and password to send to the POP3 mail server
SPA: Secure Password Authentication (SPA) uses Windows credentials to authenticate with the POP3 mail server. Specify the username in the format <domain>\<username>, or <machine name>\<username> if using a local account.

7-     Specify the User Name property value. Some POP3 mail servers require the domain information, shown as matef@bts.com.

8-     Select the Password property, and click the ellipsis to expose the password control.
Enter the password for the username specified.
BizTalk will now detect and receive messages sent to the matef@bts.com email address.

Receiving of mail with attachment

Now we are going to learn how to receive the e-mail with data contained in the attachment.so you can follow this steps
1- create new orchestration contains one receive port, one receive shape, one construct message shape, one send shape and one send port. This orchestration should receive the e-mail, extract the data contained in attached file and save it on the disk.

2- Now create one Mulipart Message AttachmentIn which contains two nodes: Attachment and Body.
Note:It is important that both nodes have to be of type XmlDocument. This is an interesting point, because the attachment can be a ZIP file, which contains only binary data.

3- When the POP3 adapter receives the message, the mail is parsed into multiple message parts. For example, if one e-mail has only body text, it is stored in message with one message part, called body message part. However, if the message has two attachments, then the message contains three message parts: One for body and one for each attachment.

4- After multipart message is prepared create two messages as shown at the next picture: MessageIn and MessageOut. The MessageIn is of type AttachmentIn, and MessageOut is of type XmlDocument.

5- Configure now the receive side to receive the MessageIn, which is of type AttachmentIn, configure the send port to send the message MessageOut, which is of type XmlDocument.

6- Now use the construct shape of type “MessageAssignemt” to create the message of type MessageOut (XmlDocument). In the expression editor type following:

MessageOut = MessageIn.Attachment;

 7- Now build and deploy the project. Open BTS Console and create the corresponding receive port and location as we mention in the beginning of the article, which will receive the mail with attachment. Remember that the used pipeline is PassThruReceive.

Hope this help.

May 28, 2009 Posted by | Biztalk | , , | 8 Comments

VS 2008 setup Error 1406

 Did you face the below error before? while you are trying to install visual studio .net 2008 or .net framework 3.5.

Product: Microsoft .NET Framework 3.5 — Error 1406.Could not write value Description to key \SOFTWARE\MozillaPlugins\@microsoft.com/WPF,version=3.5.  System error .  Verify that you have sufficient access to that key, or contact your support personnel.

If you face it before, I have simple and quick fix fotr this.

Just disable Mcafee scaner anti virus

I hope this help.

May 19, 2009 Posted by | .Net 2010 | , | Leave a comment

WCF Binding:BasicHttpBinding vs WsHttpBinding

Introduction

The first thing developers starting to implement Windows Communication Foundation (WCF) should know the difference between the BasicHttpBinding and the WSHttpBinding.
This is very important as the BasicHttpBinding has some major drawbacks compared to the WSHttpBinding. From the functional view it makes no difference, it’s just a client invoking an operation on a service, but there is a world of difference concerning the low level exchange of SOAP packets to achieve this.

BasicHttpBinding

BasicHttpBinding is there only to support the old .ASMX style of working and aimed for clients which do not have .NET 3.0 installed. As lots of Windows 2000, which cannot run .NET 3.0, are still out there this is the only way to work with WCF. So the BasicHttpBinding it’s there mainly for compatibility reasons.
ASMX (without the WS enhancements) does not support secure messaging. When a client calls an operation on a service, all data in the payload is send as a plain XML, human readable, SOAP packet.
It also does not support reliability and ordered delivery.
When a call is lost somewhere, the client is not informed and just waits for a timeout and cannot know for sure if the call has arrived at the server and if the logic behind it got executed.
Also lacking in the basic profile is ordered delivery. This means when a client fires multiple calls to the service it’s not guaranteed that they arrive in the same order. Maybe somewhere a router could drop a packet allowing the second call to arrive earlier than the retransmission of the first. This can lead to disasters, which cannot be allowed in enterprise solutions.

WSHttpBinding
The WSHttpBinding fully supports these requirements on security, reliability and ordered delivery. Some of them as default, others have to be configured.
WSHttpBinding uses (as the name implies) the WS-* protocols. This results in having some additional handshake messaging and This means that not only SOAP requests are sent for the operation calls but also to have the client and service agree on some context and to inform each other on the success of the calls.

WCF Code
I have created new WCF service for clarifying the difference between them. My WCF example is very simple it just one class contain one method which calculate the age by taking birthday as string parameter. You can find it in the below list of codes  
    [ServiceContract]
    interface ITestServiceContract
    {
        [OperationContract]
        int GetAge(string aString);
    }

    class TheService : ITestServiceContract
    {
        public int GetAge(string aString)
        {            Return “25”;        }  

 }

Here you can find the request and response xml message using BasicHttpBinding
Request sample

<s:Envelope xmlns=”http://schemas.xmlsoap.org/soap/envelope/”&gt;
  <s:Body>
    <GetAge xmlns=”http://tempuri.org/”><aDateTime>01/01/1983</aDateTime></GetAge&gt;
  </s:Body>
</s:Envelope>

Response sample

<s:Envelope xmlns=”http://schemas.xmlsoap.org/soap/envelope/”&gt;
  <s:Body>
    <GetAgeResponse xmlns=”http://tempuri.org/”&gt; <GetAgeResult>25</GetAgeResult></GetAgeResponse>
</s:Body>
</s:Envelope>

Now you can notice that this xml messages is very simple no security no encryption also it does not has acknowledge of the arriaval.
Also you can see the request and response using WSHttpBinding in the below image

WCF Binding: BasicHttpBinding vs WsHttpBinding

WCF Binding: BasicHttpBinding vs WsHttpBinding

As said, this behavior comes for free by using WCF, the developer does not have to know how this is done. Compared the ASMX this is a huge step forward. It would be hard to develop this yourself without WCF and if you would succeed in this is, it would be influencing the functional code.
Now you can see the difference between them for reliability and ordering from the below image

WCF Binding: BasicHttpBinding vs WsHttpBinding order

WCF Binding: BasicHttpBinding vs WsHttpBinding order

For BasicHttpBinding you can notice that the request and response done without any acknowledge or ordering.
But for  WSHttpBinding you will find hand check context for acknowledge and ordered responses for each request.

I hope this help.

May 19, 2009 Posted by | WCF | , , | 10 Comments

EDI BizTalk 2009

Introduction
Electronic Data Interchange (EDI) is the single most commonly used means by which business trading partners exchange data electronically. EDI is largely messaging-oriented. Documents are implemented as flat files that can include batched transaction sets. Batched interchanges can contain multiple groups, each of which can contain multiple transaction sets or messages.

How EDI Is Implemented in BizTalk Server 2009

BizTalk Server 2009 includes native functionality providing support for EDI. It is not an add-in to the product, such as an adapter or an accelerator. It is built into the product.

Interchange Processing

The EDI feature performs the following receive-side and send-side processing in pipelines that enforce the rules dictated by the EDI standards.

  • Processes incoming EDI messages, including validating the interchanges and generating acknowledgments
  • Generates and sends outgoing EDI messages, including validating the interchanges and depending upon the configuration, processing received ACKs.

Batch Processing

Batch processing is handled by the receive pipeline and orchestrations:

  • If a received batched interchange is to be split, splits it into its constituent transaction sets, generating an XML file for each transaction set and promoting properties required for send-side batch generation.
  • If a received batched interchange is to be preserved, processes the batch such that it retains the transaction sets and groups that it contained when it was received.
  • If configured, batches received EDI transaction sets and groups into an outgoing interchange.
  • If multiple parties subscribe to a batched interchange, sends a copy of the batch to each party.

Trading Partner Agreements

Trading partners mutually set the properties for their agreement in the BizTalk Administration Console. These party properties, plus send and receive port/location properties, determine receive- and send-side EDI processing.

Interchange Status

BizTalk Server provides EDI-specific status reporting. These status reports provide comprehensive status of an EDI document exchange transaction, including acknowledgments correlated

EDI Components in BizTalk Server 2009

Microsoft BizTalk Server 2009 components used for EDI processing include the following

1-    The BizTalk EDI Application contains artifacts (including pipelines, orchestrations, and schemas) that are needed to process EDI documents.

2-    The BizTalk EDI Receive Pipeline (EdiReceive pipeline) parses EDI-encoded documents, splits EDI batches, converts the EDI-encoded documents into XML encoding, performs EDI and XSD validation, and performs HIPAA X12 sub-document splitting.

3-    The BizTalk EDI Send Pipeline (EdiSend pipeline) converts XML documents into X12 or EDIFACT encoding, serializes EDI-encoded documents, and performs EDI and XSD validation

4-    The Partner Agreement Management (PAM) user interface enables you to set processing properties for parties engaging in EDI document exchange and AS2 document transport, and global properties to be used in the absence of a party

5-    The batching orchestration batches EDI interchanges and sets context properties for sending of the batched interchange. The routing orchestration handles the instances in which multiple parties subscribe to a message to be batched, creating as many copies of the message as required

6-    The status reporting user interface provides comprehensive status of EDI interchanges and correlated acknowledgments

7-    Design time tools in Visual Studio enable you to generate an instance, validate an instance, validate a schema, test a map, and validating a map.

8-    A schema repository includes X12, EDIFACT, HIPAA X12N 4010A XSD, EANCOM, and control schemas

9-    A migration wizard enables you to migrate schema, schema modifications, and party properties from BizTalk Server 2006 to BizTalk Server 2009

Next post will describe EDI processing.

I hope this help

May 18, 2009 Posted by | Biztalk | | Leave a comment

BizTalk Enterprise Single Sign-On

Introduction

A business process that relies on several different applications may have to cross several different security domains. Accessing an application on a Microsoft Windows system may require one set of security credentials, while accessing an application on an IBM mainframe may require different credentials, such as an RACF username and password. Dealing with this profusion of credentials is difficult for users, and it can be even harder for automated processes. To address this problem, BizTalk Server includes Enterprise Single Sign-On.
To use Enterprise Single Sign-On, an administrator defines affiliate applications, each of which represents a non-Windows system or application. For example, an affiliate application might be a CICS application running on an IBM mainframe, an SAP ERP system running on Unix, or any other kind of software. Each of these applications has its own mechanism for authentication, and so each requires its own unique credentials.
How it Works?

Enterprise Single Sign-On stores an encrypted mapping between a user’s Windows user ID and his credentials for one or more affiliate applications in an SSO database. When this user needs to access an affiliate application, the credentials for that application can be looked up in the SSO database by a Single Sign-On (SSO) Server. The diagram below shows how this works.

 

Enterprise Single Sign-On

Enterprise Single Sign-On

In this example, a message sent by some application to BizTalk Server is processed by an orchestration, and then sent to an affiliate application running on an IBM mainframe. The job of Enterprise Single Sign-On is to make sure that the correct credentials (that is., the right username and password) are sent with the message when it is passed to the affiliate application.

SSO Components

The sub services of the Enterprise Single Sign-On (SSO) service are as follows:

Mapping: – Maps the user account in the Windows system to the user accounts in the back-end systems (affiliate applications).
Lookup: – Looks up the user credentials in the Credential database in the back-end system. This is the SSO runtime component.
Administration: – Manages the affiliate applications and the mappings for each affiliate application.
Secret: – Generates the master secret and distributes it to the other SSO servers in the system. It is only active on the Single Sign-On server that is acting as the master secret server.

Password Synchronization: – Simplifies administration of the SSO credential database, and keeps passwords in sync across user directories.
Benefits

The right Enterprise Single Sign-On solution can provide numerous benefits for your organization, including:

·         Increased employee satisfaction and productivity through login automation

·         Reduced password-related help desk costs by eliminating the user’s requirement to track multiple passwords and login processes

·         Elevated protection for sensitive application data through deployment of complementary strong authentication

·         Application access auditing to help meet regulatory compliance

Top Single Sign-On Considerations

·         Application Coverage

Do not assume a solution will support define sign-on to every application.
This seems to be an obvious consideration, but the complex of unique login processes from application to application is commonly overlooked. It is critical to ensure that an ESSO solution can accommodate the entire range of applications that your employees currently use or foresee using in the future.
As an example, mainframe applications often require users to login first to the mainframe security package (e.g. CA ACF2T, CA Top Secret), then into the application itself. Selecting a solution that can define the standard, single screen login but not multistage logins to mainframe or many other remote applications is a short-sighted approach that can limit the effectiveness of your overall deployment.

I Hope this help.

May 3, 2009 Posted by | Biztalk | , , | Leave a comment