14 comments

  1. Thanks a lot for your post!!! I’ve tried for 4 hours to find the problem. Giving to “Everyone” ‘modify’ right on the ‘c:windowstemp’ directory solved the issue!

    Matthieu Beantwoorden

  2. “…problem and fixed it voor Vista..” What’s a ‘voor’?! 😉

    josd Beantwoorden

  3. Typo fixed 🙂

    Raimondb Beantwoorden

  4. Thank you.
    Thank YOU.
    THANK YOU.
    THANK YOU!

    Life was good. My WCF service was running fine. Until I needed to make a tiny addition to the service. And I could no longer update the web reference in the client.
    Spent 5 hours at office to try to understand why. Went home and tried 3 hours to understand why. Googled, googled, tested, ran process explorer, nothing.
    Until I hit this page.

    Yep. I had changed the account of the app pool so that I could access another app from the service.
    After given the rights to the temp dir, all works again.
    I’ll grab a beer now, and would gladly offer you one too. Or two.

    Thanks. Saved me.

    Weston Beantwoorden

  5. Me too spent more than 10 hours for searching the solution for this problem. I tried same code on Vista IIS7 and getting different error and on IIS 6 on Win 2003 different. Given permission on temp folder and it got solved.
    Thanks a lot.

    Chandra P Singh Beantwoorden

  6. Thanks so much for this post, you just saved me from hours of frustration!

    Neil Beantwoorden

  7. Hi,
    I am preparing a [microsoft] service bus demo application using WCF application project, so that I can add this service ref. in my client using Add Service Ref. feature.
    But I am not able to run the client, as it gives error,
    “Transport security is required for this connection.The endpoint requires a secure channel to connect.”

    Here is my Service.config
    1
    2
    3
    4
    5

    6
    7
    8
    9
    10
    11
    12

    13

    14

    15
    16
    18
    25
    26

    27
    28
    29
    30
    31

    32

    33

    34

    35
    36
    37
    38
    39
    41
    42

    43

    44

    45

    46
    47
    48

    49

    50

    And Client.config 1
    2
    3
    4
    5
    6
    10
    12
    14
    15 16
    17

    18

    19

    20

    21
    22
    29
    30

    Any help will be greatly appreciated.

    Thanks,
    Prashant.

    prashant Beantwoorden

  8. Was the client side config autogenerated or handtweaked? Do you have code like this in your client?
    // create the credentials object for the endpoint
    TransportClientEndpointBehavior userNamePasswordServiceBusCredential = new TransportClientEndpointBehavior();
    userNamePasswordServiceBusCredential.CredentialType = TransportClientCredentialType.UserNamePassword;
    userNamePasswordServiceBusCredential.Credentials.UserName.UserName = solutionName;
    userNamePasswordServiceBusCredential.Credentials.UserName.Password = solutionPassword;

    // create the channel factory loading the configuration
    ChannelFactory channelFactory =
    new ChannelFactory
    (“RelayEndpoint”, new EndpointAddress(serviceUri));

    // apply the Service Bus credentials
    channelFactory.Endpoint.Behaviors.Add(userNamePasswordServiceBusCredential);

    The thing is that you need to explicitly authenticate in this style when going to the real servicebus. If you are not doing that, you’re likely to get the mentioned security message.

    See also for a complete sample: http://blogs.msdn.com/harishpa/archive/2008/11/07/my-first-azure-solution-myazureworldsolution-and-echo-sample-in-net-services-sdk.aspx

    Raimondb Beantwoorden

  9. Hi,
    Thanks a lot for reply.
    I added credentials in client code using TransportClientEndpointBehavior class.
    Now stuck at the weird exception,

    The server at sb://servicebus.windows.net/services/ppSolution/WOService/ rejected the session-establishment request.

    and inner exception —

    “Error while reading message framing format at position 0 of stream (state: ReadingUpgradeRecord)”

    Here is stack trace —

    “rnServer stack trace: rn at Microsoft.ServiceBus.Channels.ConnectionUpgradeHelper.ValidatePreambleResponse(Byte[] buffer, Int32 count, ClientFramingDecoder decoder, Uri via)rn at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)rn at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)rn at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)rn at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)rn at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)rn at Microsoft.ServiceBus.Channels.LayeredChannel`1.OnOpen(TimeSpan timeout)rn at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)rn at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)rn at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)rn at System.ServiceModel.Channels.CommunicationObject.Open()rnrnException rethrown at [0]: rn at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)rn at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)rn at System.ServiceModel.ICommunicationObject.Open()rn at GRSClient.Program.Main(String[] args) in C:\Program Files\Microsoft .NET Services (Dec 2008 CTP) SDK\Samples\ServiceBus\ExploringFeatures\RelayAuthentication\Username\MySample\GRSClient\Program.cs:line 39rn at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)rn at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)rn at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()rn at System.Threading.ThreadHelper.ThreadStart_Context(Object state)rn at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)rn at System.Threading.ThreadHelper.ThreadStart()”

    Thanks a lot in anticipation,
    Prashant.

    prashant Beantwoorden

  10. Thank you for posting this!!! Was scratching my temple on this for a while…

    Aleks Jones Beantwoorden

  11. THANK YOU!! I’ve spent the whole day trying to figure this out.

    Phillip Scott Givens Beantwoorden

  12. Thanks a lot….
    It helped me a lot … I was unable to resolve it for past some weeks…

    Hari Beantwoorden

  13. YOR ARE DA MANNNNN!!!

    Jassi Beantwoorden

  14. Thanks for the solution.

    But I gone through this problem in One machine only and not coming in other machines having the same Configuration (Windows 7).

    Uday Beantwoorden