Getting Sporadic errors of Access denied for MSCRM 4.0 webservice access from SDK

Unanswered Getting Sporadic errors of Access denied for MSCRM 4.0 webservice access from SDK

  • Friday, September 05, 2008 2:43 AM
     
     

    Hi,

    I am getting Sporadic errors of "Access denied" for a custom page accessing CRM 4.0 using SDK.

    Custom page works fine for a while and later starts giving "Access denied" and then all users starts getting the same error on this page. Now if I restart IIS, page again starts working fine for a while  and  later on it again starts giving the same error.

     

     

    The CRM webservice connection details used -

     

    service = new CrmService();

    service.Url = CrmServerURL;

    service.Credentials = CredentialCache.DefaultCredentials;

    service.CrmAuthenticationTokenValue = new CrmAuthenticationToken();

    service.CrmAuthenticationTokenValue.AuthenticationType = 0;

    service.CrmAuthenticationTokenValue.OrganizationName = "XXX";

    //service.UnsafeAuthenticatedConnectionSharing = true;

    if (UserId != Guid.Empty)

    {

    service.CrmAuthenticationTokenValue.CallerId = UserId;

    }

     

    service.PreAuthenticate = true;

     

     

    *** The event viewer log shows following details- ***

     

    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533199
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204

    Help  appreciate

     

    Thanks,

    Vijayendra