Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

The server has rejected the client credentials.

 
 
Thread Tools Display Modes
Old 11-22-2007   #1 (permalink)
Laura
Guest


 

The server has rejected the client credentials.

I make a service in code behind like this

Uri tcp = new Uri("net.tcp://localhost:8000/TestService");
ServiceHost sh = new ServiceHost(typeof(DataStreamServices), tcp);
NetTcpBinding tcpBinding = new NetTcpBinding();
ServiceMetadataBehavior mBehave = new ServiceMetadataBehavior();
sh.Description.Behaviors.Add(mBehave);

sh.AddServiceEndpoint(typeof(IMetadataExchange),
MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
sh.AddServiceEndpoint(typeof(IDataStreamServices), tcpBinding, tcp);

sh.Open();

Console.WriteLine("Service is start");
Console.ReadLine();


And at client, I wrote app.config like this:

<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IDataStreamServices"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="524288" maxBufferSize="65536"
maxConnections="10"
maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows"
protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://PEGASUS:8000/Plasmedia.TassPusat.Service"
binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IDataStreamServices"
contract="Plasmedia.TassBranch.MainApp.TCP.IDataStreamServices"
name="NetTcpBinding_IDataStreamServices">
<identity>
<userPrincipalName value="PEGASUS\Administrator" />
</identity>
</endpoint>
</client>
</system.serviceModel>

Everything is running well when I tried to connect the server and client.
But when I tried to transfer file using filestream from client to server, I
got an exception message: "The server has rejected the client credentials."
I have already tried to change the security mode from "Transport" to "None"
but the exception still same. What I have to do to fix this error? Any help
would be appreciated. Thank you so much.


Best Regards,
Laura
Old 12-01-2007   #2 (permalink)
Tiago Halm
Guest


 

Re: The server has rejected the client credentials.

Haven't reviewed the all the code below, but do remember that the security
mode needs to be set on the server and on the client.

Tiago Halm

"Laura" <Laura@xxxxxx> wrote in message
news:5BDFE65F-A63C-409B-9619-FCA25C1C5BA1@xxxxxx
Quote:

>I make a service in code behind like this
>
> Uri tcp = new Uri("net.tcp://localhost:8000/TestService");
> ServiceHost sh = new ServiceHost(typeof(DataStreamServices), tcp);
> NetTcpBinding tcpBinding = new NetTcpBinding();
> ServiceMetadataBehavior mBehave = new ServiceMetadataBehavior();
> sh.Description.Behaviors.Add(mBehave);
>
> sh.AddServiceEndpoint(typeof(IMetadataExchange),
> MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
> sh.AddServiceEndpoint(typeof(IDataStreamServices), tcpBinding, tcp);
>
> sh.Open();
>
> Console.WriteLine("Service is start");
> Console.ReadLine();
>
>
> And at client, I wrote app.config like this:
>
> <system.serviceModel>
> <bindings>
> <netTcpBinding>
> <binding name="NetTcpBinding_IDataStreamServices"
> closeTimeout="00:01:00"
> openTimeout="00:01:00" receiveTimeout="00:10:00"
> sendTimeout="00:01:00"
> transactionFlow="false" transferMode="Buffered"
> transactionProtocol="OleTransactions"
> hostNameComparisonMode="StrongWildcard" listenBacklog="10"
> maxBufferPoolSize="524288" maxBufferSize="65536"
> maxConnections="10"
> maxReceivedMessageSize="65536">
> <readerQuotas maxDepth="32" maxStringContentLength="8192"
> maxArrayLength="16384"
> maxBytesPerRead="4096" maxNameTableCharCount="16384" />
> <reliableSession ordered="true" inactivityTimeout="00:10:00"
> enabled="false" />
> <security mode="Transport">
> <transport clientCredentialType="Windows"
> protectionLevel="EncryptAndSign" />
> <message clientCredentialType="Windows" />
> </security>
> </binding>
> </netTcpBinding>
> </bindings>
> <client>
> <endpoint
> address="net.tcp://PEGASUS:8000/Plasmedia.TassPusat.Service"
> binding="netTcpBinding"
> bindingConfiguration="NetTcpBinding_IDataStreamServices"
> contract="Plasmedia.TassBranch.MainApp.TCP.IDataStreamServices"
> name="NetTcpBinding_IDataStreamServices">
> <identity>
> <userPrincipalName value="PEGASUS\Administrator" />
> </identity>
> </endpoint>
> </client>
> </system.serviceModel>
>
> Everything is running well when I tried to connect the server and client.
> But when I tried to transfer file using filestream from client to server,
> I
> got an exception message: "The server has rejected the client
> credentials."
> I have already tried to change the security mode from "Transport" to
> "None"
> but the exception still same. What I have to do to fix this error? Any
> help
> would be appreciated. Thank you so much.
>
>
> Best Regards,
> Laura

Old 12-03-2007   #3 (permalink)
Laura
Guest


 

Re: The server has rejected the client credentials.

Thanks Mr. Tiago for your respond. I have solved my problems using
netHttpBinding. It makes my problems never come up again.

--
Best Regards,
Laura


"Tiago Halm" wrote:
Quote:

> Haven't reviewed the all the code below, but do remember that the security
> mode needs to be set on the server and on the client.
>
> Tiago Halm
>
> "Laura" <Laura@xxxxxx> wrote in message
> news:5BDFE65F-A63C-409B-9619-FCA25C1C5BA1@xxxxxx
Quote:

> >I make a service in code behind like this
> >
> > Uri tcp = new Uri("net.tcp://localhost:8000/TestService");
> > ServiceHost sh = new ServiceHost(typeof(DataStreamServices), tcp);
> > NetTcpBinding tcpBinding = new NetTcpBinding();
> > ServiceMetadataBehavior mBehave = new ServiceMetadataBehavior();
> > sh.Description.Behaviors.Add(mBehave);
> >
> > sh.AddServiceEndpoint(typeof(IMetadataExchange),
> > MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
> > sh.AddServiceEndpoint(typeof(IDataStreamServices), tcpBinding, tcp);
> >
> > sh.Open();
> >
> > Console.WriteLine("Service is start");
> > Console.ReadLine();
> >
> >
> > And at client, I wrote app.config like this:
> >
> > <system.serviceModel>
> > <bindings>
> > <netTcpBinding>
> > <binding name="NetTcpBinding_IDataStreamServices"
> > closeTimeout="00:01:00"
> > openTimeout="00:01:00" receiveTimeout="00:10:00"
> > sendTimeout="00:01:00"
> > transactionFlow="false" transferMode="Buffered"
> > transactionProtocol="OleTransactions"
> > hostNameComparisonMode="StrongWildcard" listenBacklog="10"
> > maxBufferPoolSize="524288" maxBufferSize="65536"
> > maxConnections="10"
> > maxReceivedMessageSize="65536">
> > <readerQuotas maxDepth="32" maxStringContentLength="8192"
> > maxArrayLength="16384"
> > maxBytesPerRead="4096" maxNameTableCharCount="16384" />
> > <reliableSession ordered="true" inactivityTimeout="00:10:00"
> > enabled="false" />
> > <security mode="Transport">
> > <transport clientCredentialType="Windows"
> > protectionLevel="EncryptAndSign" />
> > <message clientCredentialType="Windows" />
> > </security>
> > </binding>
> > </netTcpBinding>
> > </bindings>
> > <client>
> > <endpoint
> > address="net.tcp://PEGASUS:8000/Plasmedia.TassPusat.Service"
> > binding="netTcpBinding"
> > bindingConfiguration="NetTcpBinding_IDataStreamServices"
> > contract="Plasmedia.TassBranch.MainApp.TCP.IDataStreamServices"
> > name="NetTcpBinding_IDataStreamServices">
> > <identity>
> > <userPrincipalName value="PEGASUS\Administrator" />
> > </identity>
> > </endpoint>
> > </client>
> > </system.serviceModel>
> >
> > Everything is running well when I tried to connect the server and client.
> > But when I tried to transfer file using filestream from client to server,
> > I
> > got an exception message: "The server has rejected the client
> > credentials."
> > I have already tried to change the security mode from "Transport" to
> > "None"
> > but the exception still same. What I have to do to fix this error? Any
> > help
> > would be appreciated. Thank you so much.
> >
> >
> > Best Regards,
> > Laura
>
>
>
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
The server has rejected your login. Please verify that your userna frustr8edw/microsoft Vista mail 29 4 Weeks Ago 04:31 PM
the server has rejected your login dyan stephens Vista mail 1 07-25-2008 06:20 PM
Need HELP with REJECTED newsgroup POSTS - Error Message 441 Posting Failed (Rejected by POST filter) Charlie Vista mail 22 02-29-2008 07:10 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50