Thursday, June 23, 2011

CRM 2011 Error - the caller not authenticate by service(System.ServiceModel Access Denid)

To Resolve : Change Code for connectivity will be :



public
static IOrganizationService
Service()
{

ClientCredentials Credentials = new ClientCredentials
();
Credentials.Windows.ClientCredential.UserName =
""
;
Credentials.Windows.ClientCredential.Password =
""
;



//This URL needs to be updated to match the servername and Organization for the environment.

Uri OrganizationUri = new Uri("http:////XRMServices/2011/Organization.svc"
);

Uri HomeRealmUri = null
;



//OrganizationServiceProxy serviceProxy;

using (OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(OrganizationUri, HomeRealmUri, Credentials, null
))
{

IOrganizationService service = (IOrganizationService
)serviceProxy;

return
service;
}
}


No comments:

Post a Comment