Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Pass clientcredentials object in _serviceProxy method

$
0
0
Hello Guys,
I am creating a interface in .net wcf with dal i got 80 methods in my dal so everytime
i need to write this code in my method and pass this clientcredentials object to
_serviceProxy method its become a headache how do i define this globally and just make calls
please help



Uri organizationUri = new 
Uri("orgname.api.crm4.dynamics.com/.../Organization.svc"); AuthenticationCredentials authCredentials = new AuthenticationCredentials(); authCredentials.ClientCredentials.UserName.UserName = username; authCredentials.ClientCredentials.UserName.Password = password;

Using _serviceProxy = New OrganizationServiceProxy(organizationUri, Nothing, credentials, Nothing)

_service = DirectCast(_serviceProxy, IOrganizationService)

End using 






Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>