mikebelding

Help,

I set up WCF on our development server (Windows 2003 standard) running as a virtual machine that is not on our company domain.

We set up a service using WSHttpBinding and security mode set to off

When the service is run, the client trace log returns:

"Failed to open System.ServiceModel.Security.SpnegoTokenProvider" (and a truck load of stuff, but that is the first error message).

There are no logs generated on the server side.

Thanks in advance to anyone who can point me in the right direction.

Mike Belding



Re: Windows Communication Foundation (Indigo) Problem connecting to a non-domain Windows 2003 Server

Christian Weyer

As always, the best would be to see both configs and the calling code.






Re: Windows Communication Foundation (Indigo) Problem connecting to a non-domain Windows 2003 Server

mikebelding

<system.serviceModel>

<bindings>

<wsHttpBinding>

<binding name="securehttpbinding" maxReceivedMessageSize="10000">

<security mode="None"/>

</binding>

</wsHttpBinding>

</bindings>

<client>

<endpoint name="AppEndPoint" address="http://192.168.101.52:1433/IEM/Startup.svc"

binding="wsHttpBinding" contract="EP.ServiceContracts.Application.IStartup"

behaviorConfiguration="ObjectGraphBehavior" bindingConfiguration="securehttpbinding"/>

<endpoint name="IStandardOperationsEndPoint" address="http://192.168.101.52:1433/IEM/ServiceHandlerStandard.svc"

binding="wsHttpBinding" contract="EP.ServiceContracts.Standard.IStandardOperations"

behaviorConfiguration="ObjectGraphBehavior"

bindingConfiguration="securehttpbinding"/>

<endpoint name="IDirectoryOperationsEndPoint" address="http://192.168.101.52:1433/IEM/ServiceHandlerDirectory.svc"

binding="wsHttpBinding" contract="EP.ServiceContracts.Directory.IDirectoryServices"

behaviorConfiguration="ObjectGraphBehavior"

bindingConfiguration="securehttpbinding"/>

<!--http://localhost/AppServer/-->

<!--http://192.168.101.52:1433/IEM/-->

</client>

<behaviors>

<endpointBehaviors>

<behavior name="ObjectGraphBehavior">

<dataContractSerializer maxItemsInObjectGraph="100000"/>

</behavior>

</endpointBehaviors>

</behaviors>

<diagnostics>

<messageLogging maxMessagesToLog="30000"

logEntireMessage="true"

logMessagesAtServiceLevel="false"

logMalformedMessages="true"

logMessagesAtTransportLevel="true">

</messageLogging>

</diagnostics>

</system.serviceModel>

Message Contract:

/// <summary>

/// Accepts a client alias name value

/// </summary>

[MessageContract(ProtectionLevel=System.Net.Security.ProtectionLevel.None)]

public class ClientGetClientsForAliasRequest

{

[MessageHeader] public EP.DataContracts.Headers.RequestHeader RequestHeader;

[MessageBodyMember] public string clientname;

}

/// <summary>

/// Returns back a list of clients that contain the alias search value

/// </summary>

[MessageContract(ProtectionLevel=System.Net.Security.ProtectionLevel.None)]

public class ClientGetClientsForAliasResponse

{

[MessageHeader] public EP.DataContracts.Headers.ResponseHeader ResponseHeader;

[MessageBodyMember] public List<EP.DataContracts.Directory.Client> Clientlist;

}

Client Web Config:

<system.serviceModel>

<bindings>

<wsHttpBinding>

<binding name="securehttpbinding" maxReceivedMessageSize="10000">

<security mode="None"/>

</binding>

</wsHttpBinding>

</bindings>

<client>

<endpoint name="AppEndPoint" address="http://192.168.101.52:1433/IEM/Startup.svc"

binding="wsHttpBinding" contract="EP.ServiceContracts.Application.IStartup"

behaviorConfiguration="ObjectGraphBehavior" bindingConfiguration="securehttpbinding"/>

<endpoint name="IStandardOperationsEndPoint" address="http://192.168.101.52:1433/IEM/ServiceHandlerStandard.svc"

binding="wsHttpBinding" contract="EP.ServiceContracts.Standard.IStandardOperations"

behaviorConfiguration="ObjectGraphBehavior"

bindingConfiguration="securehttpbinding"/>

<endpoint name="IDirectoryOperationsEndPoint" address="http://192.168.101.52:1433/IEM/ServiceHandlerDirectory.svc"

binding="wsHttpBinding" contract="EP.ServiceContracts.Directory.IDirectoryServices"

behaviorConfiguration="ObjectGraphBehavior"

bindingConfiguration="securehttpbinding"/>

<!--http://localhost/AppServer/-->

<!--http://192.168.101.52:1433/IEM/-->

</client>

<behaviors>

<endpointBehaviors>

<behavior name="ObjectGraphBehavior">

<dataContractSerializer maxItemsInObjectGraph="100000"/>

</behavior>

</endpointBehaviors>

</behaviors>

<diagnostics>

<messageLogging maxMessagesToLog="30000"

logEntireMessage="true"

logMessagesAtServiceLevel="false"

logMalformedMessages="true"

logMessagesAtTransportLevel="true">

</messageLogging>

</diagnostics>

</system.serviceModel>

Code that calls the proxy:

private List<EP.DataContracts.Directory.Client> ProxyClientGetClientsForAlias(string ClientName)

{

EP.DataContracts.Directory.ClientGetClientsForAliasRequest Request = new EP.DataContracts.Directory.ClientGetClientsForAliasRequest();


Request.clientname = ClientName;

Request.RequestHeader = GenerateHeader(); //Header just generates dummy code that is not checked at this time


EP.DataContracts.Directory.ClientGetClientsForAliasResponse Response = Proxy.ClientGetClientsForAlias(Request);

if (Response.ResponseHeader.ResponseResult == EP.DataContracts.Headers.ResponseResult.Success)

{

return Response.Clientlist;

}

else

{

return new List<EP.DataContracts.Directory.Client>();

}

}

Proxy Code

public partial class DirectoryProxy : ClientBase<EP.ServiceContracts.Directory.IDirectoryServices>,EP.ServiceContracts.Directory.IDirectoryServices

{

public EP.DataContracts.Directory.ClientGetClientsForAliasResponse ClientGetClientsForAlias(EP.DataContracts.Directory.ClientGetClientsForAliasRequest Request)

{

return Channel.ClientGetClientsForAlias(Request);

}





Re: Windows Communication Foundation (Indigo) Problem connecting to a non-domain Windows 2003 Server

Christian Weyer

OK, it turns out each time that the forum is a bad place to discuss over code Wink

Please send your VS sln and a description of your problem to christian.weyer __ AT __ thinktecture.com.

Thx.






Re: Windows Communication Foundation (Indigo) Problem connecting to a non-domain Windows 2003 Server

mikebelding

After some further tests, the problem was isolated to the install order on the server. IIS had been installed after the .Net framework. When the install order was corrected the application functioned as expected.