Archive for January, 2012

Team Explorer: Save Codeplex Username and Password

A friend of mine emailed me few minutes ago saying that it is too annoying that TFS keeps asking him to enter his username and password and asked me if there is a way to save the username and password. The following are the steps to do so:


Using Windows 7:

Open Windows Explorer and go to Control Panel\User Accounts and Family Safety\Credential Manager

Click Add a Windows Credential



Enter in the “Internet or network address” textbox

Enter your username and password. To find out your username check this Post


Silverlight: Create Popup Dialog using ChildWindow Class

This post is a walkthrough to create a login screen popup dialog using the ChildWindow Class

  • Right click your solution or folder
  • Add a new item
  • Select Silverlight from the right list of the Add New Item dialog


  • Add a Silverlight Child Window


  • Add couple of labels, a Textbox and a Password box


In this scenario, I have the username and password hardcoded in the code. Ideally, you validate the username and password via a service

  • Add the following code to the OK and Cancel Click event handlers
private void OKButton_Click(object sender, RoutedEventArgs e)
   if (textBox1.Text == "Username" && textBox2.Password == "Password")
      this.DialogResult = true;
      MessageBox.Show("Incorrect username and/or password", "Error", MessageBoxButton.OK);

private void CancelButton_Click(object sender, RoutedEventArgs e)
   this.DialogResult = false;

In code, I had a login button on the MainView.

private void btnAdmin_Click(object sender, RoutedEventArgs e)
   var dialog = new LoginDlg();
   dialog.Closed += new EventHandler(dialog_Closed);
void dialog_Closed(object sender, EventArgs e)
   var dialog = (LoginDlg)sender;
   if (dialog.DialogResult == true)
   dialog.Closed -= new EventHandler(dialog_Closed);

Notice that the Show method doesn’t return a value. I have to listen/subscribe/handle the closed event.

Categories: .NET, Silverlight Tags:

Biztalk: WCF Adapter Transmission Failure (To be retried)

File receive location (*.txt filter)
WCF-net.tcp send port
Target system: Dynamics AX

I was getting a Transmission Failure event in the Tracked message events in the Biztalk Server Administration console. When the text file contains more than specific number of records.

In my case, the DAX service replies to the Biztalk message with message whose size is proportional to the sent message. To resolve this issue, in my case, I had to increase the Maximum received message size on the WCF-NetTcp send port.

Categories: Biztalk, Biztalk 2010