Ich habe eine Sicherheitsaushandlung Ausnahme in einem client mit WCF

Bekam ich eine Sicherheitsaushandlung Ausnahme in der client-Teil, wenn ich mich einloggen wollte in mein server auf einem anderen PC mit dem WCF-client und-server. Es funktioniert im lokalen Netzwerk, aber wenn ich den server online über das Internet mit der port-Weiterleitung und eine statische IP-Adresse habe ich diese exception im client.

Client-Konfiguration:

<?xml version="1.0"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
    <system.serviceModel>
      <bindings>
        <netTcpBinding>
          <binding name="TcpBinding" closeTimeout="00:03:00" openTimeout="00:03:00"
              receiveTimeout="00:10:00" sendTimeout="00:03:00" transactionFlow="false"
              transferMode="Buffered" transactionProtocol="OleTransactions"
              hostNameComparisonMode="StrongWildcard" listenBacklog="10"
              maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="30"
              maxReceivedMessageSize="65536">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
            <reliableSession ordered="true" inactivityTimeout="00:30:00"
                enabled="false" />
            <security mode="Transport">
              <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign">
                <extendedProtectionPolicy policyEnforcement="Never" />
              </transport>
              <message clientCredentialType="Windows" />
            </security>
          </binding>
        </netTcpBinding>
        <wsDualHttpBinding>
          <binding name="HttpBinding" closeTimeout="00:03:00" openTimeout="00:03:00"
              receiveTimeout="00:10:00" sendTimeout="00:03:00" bypassProxyOnLocal="false"
              transactionFlow="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
              messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
            <reliableSession ordered="true" inactivityTimeout="00:30:00" />
            <security mode="Message">
              <message clientCredentialType="Windows" negotiateServiceCredential="true"
                  algorithmSuite="Default" />
            </security>
          </binding>
        </wsDualHttpBinding>
      </bindings>
      <client>
        <endpoint address="net.tcp://41.205.115.225:8000/ChatRoom/service"
            binding="netTcpBinding" bindingConfiguration="TcpBinding"
            contract="ChatRoom" name="TcpBinding">
          <identity>
            <servicePrincipalName value="BalaGNisha\Balaji Nisha" />
          </identity>
        </endpoint>
        <endpoint address="http://41.205.115.225:8001/ChatRoom/service" binding="wsDualHttpBinding"
            bindingConfiguration="HttpBinding" contract="ChatRoom" name="HttpBinding">
          <identity>
            <servicePrincipalName value="BalaGNisha\Balaji Nisha" />
          </identity>
        </endpoint>
      </client>
    </system.serviceModel>
</configuration>

Dies ist die Ausnahme:

System.ServiceModel.Security.SecurityNegotiationException
was unhandled by user code   Message=A
remote side security requirement was
not fulfilled during authentication.
Try increasing the ProtectionLevel
and/or ImpersonationLevel.
Source=mscorlib   StackTrace:
    Server stack trace:
       at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty &remoteSecurity)
       at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
       at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    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 System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.ClientBase`1.Open()
       at lectemplete.ChatControl.ChatWindow_Load()
in D:\Links\Imagin Cup
2011\Client\lectemplete\Client\ClientControl.cs:line
50
       at lectemplete.ChatControl.Chat_Control()
in D:\Links\Imagin Cup
2011\Client\lectemplete\Client\ClientControl.cs:line
36
       at BitsOfStuff.InkPadWindow.Intialize_Connection()
in D:\Links\Imagin Cup
2011\Client\lectemplete\Windows\InkPadWindow.xaml.cs:line
326
       at BitsOfStuff.InkPadWindow.Window_Loaded(Object
sender, RoutedEventArgs e) in
D:\Links\Imagin Cup
2011\Client\lectemplete\Windows\InkPadWindow.xaml.cs:line
43
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
       at MS.Internal.LoadedOrUnloadedOperation.DoWork()
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Window.Show()
       at System.Windows.Window.ShowDialog()
InnerException:
System.Security.Authentication.AuthenticationException
       Message=A remote side security requirement was not fulfilled during
authentication. Try increasing the
ProtectionLevel and/or
ImpersonationLevel.
       Source=System
       StackTrace:
            at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.StartReceiveBlob(LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.CheckCompletionBeforeNextReceive(LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.StartReceiveBlob(LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.CheckCompletionBeforeNextReceive(LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
            at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
            at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
            at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
            at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
       InnerException: System.ComponentModel.Win32Exception
            Message=The network logon failed
            ErrorCode=-2147467259
            NativeErrorCode=1790
            InnerException:

Ist das problem in der server-oder client-Teil in diese Ausnahme?

InformationsquelleAutor kartal | 2011-06-12
Schreibe einen Kommentar