Dofactory.com
Dofactory.com
 Back to list
Views:   21.3K
Replies:  5
Archived

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
Dennis Tucker, Aug 11, 2011
Reply 1
Well, you need to add this in to get it work perfectly, otherwise it will not work.

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

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

Krutisha Chovatiya, Mar 10, 2015
Reply 2
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>
Matthew Carey, Oct 01, 2014
Reply 3
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>

 
Dan Bambling, Jan 11, 2012
Reply 4

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.

Daisy White, Jan 11, 2012
Reply 5
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";

Kalyan Kamesh, Aug 11, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.