Home  /  Questions  /  Question



108   96.7
Aug 11, 2011


Changed to basicHttpBinding and now I have an Error

I created a web service and put it out on a server. It is just a basic service that does a call to a database to get a list of document properties. The problem is that this is going to be a web service that can be used in multiple projects but when I reference it and do the call it gives the error: "the caller was not authenticated by the service.". Any idea? I know it probably has to do with the web.config in the service layer but I'm not sure what. I changed it to "basicHttpBinding" but when I do that it can't see the service and throws an error.

Thanks
dennis



50   50
Aug 11, 2011
If you want to use wshttpbinding, u need to add windows credentials as below.

svc.ClientCredentials.Windows.ClientCredential.UserName = "abc";
svc.ClientCredentials.Windows.ClientCredential.Password = "xxx";


50   50
Jan 11, 2012

Maybe you just need to calm down and take it easy. It's socommon that these devices do not support work. Or you may download a freebarcode scanner by yourself and have fun instead of worring about that. "http://www.keepautomation.com/"KEEPAUTOMATIONfree online bar Code ReaderJust and it is really convenient anduseful. You may have a try someday and enjoy the life to the fullest.


50   50
Jan 11, 2012
Take a look at the security settings under the binding section of the web.config. Also check that IIS is using anonymous access.

If connecting to a database you will need to make sure that the database can accept connections from the webserver. This can be done by creating user credentials and then either stating the username and password as part of the connection method or by impersonation.

Hope it helps
<bindings>
    <basicHttpBinding>
        <binding name="MyBasicHttpBinding">
            <security mode="None">
                <transport clientCredentialType="None" />
            </security>
        </binding>
    </basicHttpBinding>
</bindings>

 

50   50
24 days ago
Thanks for that Dan.

The below code worked perfectly on my website - Inversion Table Reviews
<bindings> <basicHttpBinding> <binding name="MyBasicHttpBinding"> <security mode="None"> <transport clientCredentialType="None" /> </security> </binding> </basicHttpBinding></bindings>