DCSIMG
May 2006 - Posts - Guy Burstein's Blog

Guy Burstein's Blog

Developer Evangelist @ Microsoft

News

Guy Burstein The Bu

Disclaimer
Postings are provided 'As Is' with no warranties and confer no rights.

Guy Burstein LinkedIn Profile

May 2006 - Posts

Identity check failed for outgoing message Exception

After a long time of building an application with WCF on my machine, I tried to test it with more than a single machine. Doing that, I ran into the following exception:

"Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was 'machine.bursteg.co.il' but the remote endpoint provided DNS clam 'localhost'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity 'localhost' in the EndpointAddress.Identity property when creating channel proxy."

It is a very long exception message indeed, but fortunately, very descriptive.
When I got this exception, the client configuration was:

<client>
   <
endpoint name="endpoint"
             address="net.tcp://machine.bursteg.co.il:8080/MyService"
             binding="netTcpBinding"
             contract="Bursteg.Samples.IMyService"
             behaviorConfiguration="config"
             bindingConfiguration="Binding1"/>
<
client>

The service configuration was:
<
service name="Bursteg.Samples.MyService"
          
behaviorConfiguration="Membership">
   <
endpoint name="endpoint"
             address="net.tcp://machine.bursteg.co.il:8080/MyService"
             
binding="netTcpBinding"
             
bindingConfiguration="SecureNetTcpBinding"
            
contract="Bursteg.Samples.IMyService">
   </
endpoint>
</
service>

The service used this binding:

<netTcpBinding>
   <
binding name="SecureNetTcpBinding" >
      <
security mode="Message">
         <
message clientCredentialType="UserName"/>
      </
security>
   </
binding>
</
netTcpBinding>

The service had this behavior:

<behavior name="Membership" returnUnknownExceptionsAsFaults="false">
   <
serviceCredentials type="System.ServiceModel.ServiceCredentials">
      <
userNameAuthentication
      
userNamePasswordValidationMode = "MembershipProvider"
       membershipProviderName="MyMembershipProvider" />
      <
serviceCertificate 
      
findValue="localhost" 
       
storeLocation="CurrentUser"
      
storeName="My"
      
x509FindType="FindBySubjectName" />
</
serviceCredentials>

This exception only occurred when I tried to work across machines and changed the url of the service endpoint to point to another machine. (i.e. I changed net.tcp://localhost:8080... to net.tcp://machine.bursteg.co.il:8080...).

As written in the exception message, the client was looking for a certificate called machine.bursteg.co.il as DNS name, but the server had a certificate called localhost. In order to solve this, I added the identity element to each endpoint in the client side, like the following example:

<client>
   <
endpoint name="endpoint"
             address="net.tcp://machine.bursteg.co.il:8080/MyService"
             binding="netTcpBinding"
             contract="Bursteg.Samples.IMyService"
             behaviorConfiguration="config"
             bindingConfiguration="Binding1">
      <
identity>
         <
dns value="localhost"/>
      </
identity>
   <
endpoint>
<
client>

Finally, It worked. I am not sure that this is the best way to solve this, but currently I can keep on working...

Can you think about another solution? 

Hosting a service in IIS? Better not under My Documents...

I am building a new service to test some new features of WCF, and today I chose to host my service in IIS and not in Console Application as usual. This is a very common thing to do, and I though I will take me just a couple of minutes.

Surprisingly, after creating the service, and the .svc file, I got this error message:

Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Not such descriptive message... ah???

Trying to compare with a basic HTTP sample taken from the SDK Samples, I actually built the samples from scratch. And still - Nothing!

After spending over an hour trying to figure out what went wrong, I copied the project directory to another location on my machine, and thing started to get going.

So, as a conclusion, If you're hosting a WCF service on IIS, set the virtual directory to a folder which is not under your My Documents folder, or another folder with security settings.

Enjoy!

Posted: May 24 2006, 03:59 PM by Guy Burstein | with 6 comment(s) |
תגים:,

4th top Answerer this month!

Lately I visit the MSDN WCF Forum quite a lot! I  do my best to share knowledge and answer developers questions about WCF issues.

Today I noticed that they have a list of the guys who tend to answer occasionally, And found my name there, right after the MSFT guys.

If you've been using WCF and haven't visited in that forum, I advise to do come.

WCF Hot Fix after Beta 2 installation

Install this update to add support for the WS-AtomicTransaction protocol to MSDTC, and support for the Windows Communication Foundation (WCF) COM+ Integration feature.
When this package is installed WCF applications will be able to use the WS-AtomicTransaction protocol. Additionally, COM+ applications can be exposed as services using the WCF COM+ Integration feature. After you install this item, you may have to restart your computer.

Download it here.

Enjoy!

 

WCF Known Issues in Beta 2

Read all about it - here.

Enjoy!

Posted: May 24 2006, 07:34 AM by Guy Burstein | with 1 comment(s)
תגים:

Installing WinFX Runtime components Beta 2

If you're about to install the Beta 2 of WinFX, It is important to go through these links:

How to install WinFX Runtime Components:
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605077.aspx

Breaking Changes between Feb CTP and Vista Beta2
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605194.aspx

Detailed WCF API changes between FEB CTP and Vista beta 2(RC0)
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605256.aspx

Go-Live License for WinFX Runtime Components V3.0 Beta 2
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605322.aspx

Enjoy!

Posted: May 24 2006, 07:22 AM by Guy Burstein | with 1 comment(s)
תגים:, ,

Get the Beta 2 !

The following downloads will enable you to develop WinFX applications for the latest version of Windows Vista, Windows XP Service Pack 2 or Windows Server 2003:

  1. Windows SDK - The Windows SDK includes the documentation, samples, tools and build environments to develop Windows applications - either native or WinFX.
  2. WinFX Runtime Components - The WinFX Runtime Components enable you to run the WinFX applications that you develop.  
  3. "Orcas" WinFX Development Tools - Development tools that work with Visual Studio 2005 and provide functionality such as XAML Intellisense support through schema extensions for the editor, project templates for the Windows Presentation Foundation and Windows Communication Foundation namespaces and WinFX SDK documentation integration.
  4. [Optional] Visual Studio 2005 Extensions for Windows Workflow Foundation - Windows Workflow Foundation is the programming model, engine, and tools for building workflow-enabled applications on Windows. These extensions to Visual Studio 2005 include project templates, intellisense support for the Workflow namespace (System.Workflow) and integrated documentation.

Enjoy!

Posted: May 24 2006, 06:04 AM by Guy Burstein | with 1 comment(s) |
תגים:, ,

Next Generation Exception Message Box

Next Generation Exception Message Box

If you've developed a Windows Forms application, you probably developed some kind of Exception Message Box to display exceptions, instead of using the default one supplied in System.Windows.Form namespace.

Exception Message Box

Microsoft has been using a nice ExceptionMessageBox in SQL Server 2005, and as a part of Feature Pack for Microsoft SQL Server 2005 - April 2006, released the ExceptionMessageBox as a component for applications to use.

Exception Message Box

"The exception message box is a programmatic interface that you can use in your applications for any tasks for which MessageBox may be used. The exception message box is a supported managed assembly designed to elegantly handle managed code exceptions. It provides significantly more control over the messaging experience and gives your users the options to save error message content for later reference and to get help on messages.'"

Exception Message Box

To learn more about integrating the ExceptionMessageBox into your application, refer to this page in MSDN.
You can download and install the ExceptionMessageBox from
here.

Enjoy!

Posted: May 23 2006, 02:46 PM by Guy Burstein | with 4 comment(s) |
תגים:

New Webcast: WCF and WF in Retail and Hospitality

This webcast explores multiple real-world scenarios where applications based on the Windows Communication Foundation and Windows Workflow Foundation.

Watch it here...

Enjoy!

Posted: May 23 2006, 07:03 AM by Guy Burstein | with 1 comment(s)
תגים:

WCF Documentation Update

The WCF team released the second update of the documentation. Get it here.

Enjoy!

Posted: May 20 2006, 04:55 PM by Guy Burstein | with 1 comment(s)
תגים:

.NET Rocks! - Michele Leroux Bustamante on WCF

Carl and Richard talk to Michele Leroux Bustamante about the state of Windows Communication Foundation. Michele also talks about SOA reality, and of course ends the show with a signature joke...
Download it here.
 
Enjoy!
Posted: May 18 2006, 09:30 AM by Guy Burstein | with 1 comment(s)
תגים:

WCF InstanceContextMode & ConcurrencyMode

This post follows the previous post about WCF Instance Management.

Justin Smith has just posted a great post about the usage of InstanceContextMode & ConcurrencyMode for scalable applications.

Very useful.

Enjoy!

Posted: May 16 2006, 10:30 AM by Guy Burstein | with 1 comment(s)
תגים:

Bullshit Bingo - How to stay awake in meetings

Bullshit Bingo - How to stay awake in meetings

Do you keep falling asleep in meetings and seminars? What about those long and boring conference calls? Here's a way to change all of that.

1. Before (or during) your next meeting, seminar, or conference call, prepare yourself by drawing a square. I find that 5" x 5" is a good size. Divide the card into columns - five across and five down. That will give you 25 one-inch blocks.

Bullshit Bingo 2. Write one of the following words/phrases in each block:
* synergy
* strategic fit
* core competences
* best practice
* bottom line
* revisit
* expeditious
* to tell you the truth (or "the truth is")
* 24/7
* out of the loop
* benchmark
* value-added
* proactive
* win-win
* think outside the box
* fast track
* result-driven
* empower (or empowerment)
* knowledge base
* at the end of the day
* touch base
* mindset
* client focus(ed)
* paradigm
* game plan
* leverage

3. Check off the appropriate block when you hear one of those
words/phrases.
4. When you get five blocks horizontally, vertically, or diagonally,
stand up and shout "BULLSHIT!"

Testimonials from satisfied "Bullshit Bingo" players:
"I had been in the meeting for only five minutes when I won." - Adam, Atlanta

"My attention span at meetings has improved dramatically." - David, Florida

"What a gas! Meetings will never be the same for me after my first win." - Dan, New York City

"The atmosphere was tense in the last process meeting as 14 of us waited for the fifth box." - Ben, Denver

"The speaker was stunned as eight of us screamed 'BULLSHIT!' for the third time in two hours." - Paul, Cleveland

Enjoy your meetings - Bullshit Bingo!

[Update September 29th, 2006] There is a downloadable version of this document with an already made 5x5 square here.

Posted: May 16 2006, 08:16 AM by Guy Burstein | with 23 comment(s) |
תגים:

Team Leaders Training - What would you say about SOA?

I am a senior consultant at Advantech - Microsoft Division, which specializes in Microsoft technology based project implementation and services. As a part of my job, I give talks in front of many customers / groups ect.
These days, Advantech along with Ness IT Business College offers a
Team Leaders Training Course.

I will have the privilege to give some talks in this course 3 weeks from today. I will talk about SO principles, Architecting and Modeling SO Applications, and how WCF makes SOA. I will start to prepare the presentations in the next couple of day and post my drafts in this blog. But first, I want to ask all readers of this blog – What would you guys want to hear in an instruction to SOA presentation? What wouldn’t you want to hear?

Your feedback is very helpful! Please comment.

Thanks,
Guy

2 new WCF Virtual Labs

Try out 2 new Virtual Labs that will walk you through the latest functionality of Windows Communication Foundation.
These labs will guide you through the fundamentals of building powerful WCF services. You don’t even need to install the bits. just use the Virtual Labs to see what WCF can do for you.

The Fundamentals of Programming the Windows Communication Foundation

Reliable and Transacted Messaging with the Windows Communication Foundation

Enjoy!

More Posts Next page »