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