locked
Upgrade to VS2013 Ultimate from VS201 Ultimate Unit Tests no longer Work RRS feed

  • Question

  • After upgrading to vs2013 non of my unit tests will run, first I found that there is now a new way to run them and now that I am able to get them to run, I am getting this error.  I have no problems at all running the exact same tests in vs2010, what changed in vs2013 that would cause this?

    System.ServiceModel.Security.SecurityNegotiationException was caught
      HResult=-2146233087
      Message=Could not establish secure channel for SSL/TLS with authority 'xxxx'.
      Source=mscorlib
      StackTrace:
        Server stack trace:
           at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
           at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
           at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
        Exception rethrown at [0]:
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
           at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
           at xx()
           at xx() in C:\xx\Reference.cs:line 335
           at xx() in C:\xx.cs:line 39
      InnerException: System.Net.WebException
           HResult=-2146233079
           Message=The request was aborted: Could not create SSL/TLS secure channel.
           Source=System
           StackTrace:
                at System.Net.HttpWebRequest.GetResponse()
                at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           InnerException:

    Wednesday, April 9, 2014 11:21 AM

Answers

  • Hi,

    If I turn off client certificate requirement, it will work.

    I think that that issue should be on the client certificate of the WCF service rather than unit test.

    And based on the error logs, they are more related on WCF services rather than unit test.

    I did some search about this issue: Could not establish secure channel for SSL/TLS with authority 'xxxx'.

    It seems that even though your WCF service is fine, sometimes it still does not work. Please see this thread:

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/8d9c74ef-5e75-4f97-8a22-a6ea42c049b6/wcf-proxy-client-could-not-establish-secure-channel-for-ssltls-with-authority-xyz?forum=wcf

    Please try the solution in that thread. If no help, I suggest opening another thread on WCF forum: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf to check whether experts there can provide you some useful information.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Amanda Zhu Monday, April 14, 2014 2:31 AM
    Friday, April 11, 2014 3:00 AM
  • Okay, I created a console application and it is getting the same error in 2013 (not in 2010) so it doesnt have anything to do with Unit Test.  I will ask my question in another group.


    • Edited by mbevins Friday, April 11, 2014 11:49 AM
    • Marked as answer by Amanda Zhu Monday, April 14, 2014 2:31 AM
    Friday, April 11, 2014 10:42 AM

All replies

  • Hi,

    What is the application under test? Web application? Could you describe it and your unit test?

    There are many differences in testing from VS2010 to VS2013. VS2013 has a Test explorer window which is used to run and manage tests. When you upgraded VS2010 test project to S2013, whether you get any errors? After you upgraded VS2010 test project to S2013, whether you built the projects successfully? If you got any errors during the updating and rebuilding processes, please post here.

    When we run unit test from Test Exploer and the test fails, we will get error messges in Test Explorer. Could you please provide us detailed error messages for the failed unit test? About checking test result in Text Explorer, please see:

    http://msdn.microsoft.com/en-us/library/hh270865.aspx#BKMK_View_test_results

    In order to check whether the issue is related to VS2013, please create a new and simple unit test in VS2013 and then run it from VS2013 to check whether it can run fine.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 10, 2014 5:32 AM
  • This test is for a WCF service that requires client certificates for authentication..  When I upgraded from 2010 I did not receive any errors,  if I run the exact test in 2010 it runs fine, when I run it in 2013 I get the below error (same as first post).  If I turn off client certificate requirement, it will work so it appears something in the tests dont like client certificate authentication?

    System.ServiceModel.Security.SecurityNegotiationException was caught
      HResult=-2146233087
      Message=Could not establish secure channel for SSL/TLS with authority 'xxxx'.
      Source=mscorlib
      StackTrace:
        Server stack trace:
           at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
           at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
           at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
        Exception rethrown at [0]:
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
           at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
           at xx()
           at xx() in C:\xx\Reference.cs:line 335
           at xx() in C:\xx.cs:line 39
      InnerException: System.Net.WebException
           HResult=-2146233079
           Message=The request was aborted: Could not create SSL/TLS secure channel.
           Source=System
           StackTrace:
                at System.Net.HttpWebRequest.GetResponse()
                at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           InnerException:

    Thursday, April 10, 2014 11:22 AM
  • Hi,

    If I turn off client certificate requirement, it will work.

    I think that that issue should be on the client certificate of the WCF service rather than unit test.

    And based on the error logs, they are more related on WCF services rather than unit test.

    I did some search about this issue: Could not establish secure channel for SSL/TLS with authority 'xxxx'.

    It seems that even though your WCF service is fine, sometimes it still does not work. Please see this thread:

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/8d9c74ef-5e75-4f97-8a22-a6ea42c049b6/wcf-proxy-client-could-not-establish-secure-channel-for-ssltls-with-authority-xyz?forum=wcf

    Please try the solution in that thread. If no help, I suggest opening another thread on WCF forum: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf to check whether experts there can provide you some useful information.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Amanda Zhu Monday, April 14, 2014 2:31 AM
    Friday, April 11, 2014 3:00 AM
  • Okay, I created a console application and it is getting the same error in 2013 (not in 2010) so it doesnt have anything to do with Unit Test.  I will ask my question in another group.


    • Edited by mbevins Friday, April 11, 2014 11:49 AM
    • Marked as answer by Amanda Zhu Monday, April 14, 2014 2:31 AM
    Friday, April 11, 2014 10:42 AM