Click here to Skip to main content
15,849,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


i have a wcf web service,when i am trying to consume wcf service,i create object of service and call function then, its gives error:
The caller was not authenticated by the service.

when i use BasicHttpSecurityMode mode it gives error:
Content Type text/xml; charset=utf-8 was not supported by service.


thanks in advance
Prateek
Posted
Updated 3-Feb-12 11:04am
v2
Comments
[no name] 3-Feb-12 6:34am    
Please provide the endpoint tag from config file
prateekfgiet 3-Feb-12 6:35am    
<endpoint address="http://173.192.138.18/SCVMMService/VirtualMachineManagementService.svc"
="" binding="wsHttpBinding" bindingconfiguration="WSHttpBinding_IVirtualMachineManagementService" contract="ServiceReference1.IVirtualMachineManagementService" name="WSHttpBinding_IVirtualMachineManagementService">
prateekfgiet 3-Feb-12 6:38am    
Sorry
this is the complete tag

<endpoint address="http://173.192.138.18/SCVMMService/VirtualMachineManagementService.svc"
="" binding="wsHttpBinding" bindingconfiguration="WSHttpBinding_IVirtualMachineManagementService" contract="ServiceReference1.IVirtualMachineManagementService" name="WSHttpBinding_IVirtualMachineManagementService">
<identity>
<serviceprincipalname value="host/win48.scvmmrc.ourcp.com">

[no name] 3-Feb-12 6:42am    
can you please post the tags
prateekfgiet 3-Feb-12 6:46am    
i am posting tags as new solution becoz have some error here to post

try adding identity tag in the endpoint
HTML
<client>
            <endpoint address="net.tcp://localhost:5678/projects/Generic/">
                binding="netTcpBinding" bindingConfiguration="Generic" contract="XYZ.IOP"
                name="Generic" >
<identity>
                    <serviceprincipalname value="host/username.doaminame" />
                </identity>
</endpoint>
</client>
 
Share this answer
 
v2
<endpoint address="http://173.192.138.18/SCVMMService/VirtualMachineManagementService.svc">
   binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IVirtualMachineManagementService"
   contract="ServiceReference1.IVirtualMachineManagementService"
   name="WSHttpBinding_IVirtualMachineManagementService">
   <identity>
    <serviceprincipalname value="host/win48.scvmmrc.ourcp.com" />
   </identity>
  </endpoint>
 
Share this answer
 
Hi,

One of the reasons for your error message "Content Type text/xml; charset=utf-8 was not supported by service." can be mismatch in bindings between server and client. So check bindings....

If that is not a problem, I suggest you to enable service tracing and copy exact error from trace here, so we'll try to diagnose problem...
Info about how to enable service trace can be found here[^] and here[^].
When trace is collected you can open it with Service Trace Viewer[^] tool.
 
Share this answer
 
Comments
prateekfgiet 4-Feb-12 2:52am    
hi Martin,WCF web Service is provided by Microsft, and for tracing i putted Piece of code in web config.
but it dint create any log file.
Martin Arapovic 4-Feb-12 3:54am    
Hi! If the service is provided by the microsoft then you can tell us what and where we can find that service so we can try to run it! Trace must work if you done all steps written on given sites.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900