Request not supported: RemoveMember/AddMember/SetStateDynamicEntity - dynamics-crm-2011

I was analyzing the trace logs from production server for my MS CRM 2011 deployment with UR18 and observed that there are multiple entries for the below exceptions -
Message: Request not supported: RemoveMember, ErrorCode: -2147220715
Message: Request not supported: AddMember, ErrorCode: -2147220715
Message: Request not supported: SetStateDynamicEntity, ErrorCode: -2147220715
The trace log for AddMember is something like below.
I did not get any clue from this log. I even searched for the supported messages for MS CRM 2011 which shows that these messages are supported.
Did anybody face such issue or have any clue around this? All inputs are appreciated. :)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) ilOffset = 0x86
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() ilOffset = 0x23
at ThreadPoolWorkQueue.Dispatch() ilOffset = 0x81
at _ThreadPoolWaitCallback.PerformWaitCallback() ilOffset = 0x51
Crm Exception: Message: Request not supported: AddMember, ErrorCode: -2147220715

Related

Migration to EWS API for sending emails

I have the following code to send a email through EWS API,
ExchangeService service = new ExchangeService();
service.setUrl(new URI(**MyExchangeURL**));
ExchangeCredentials credentials = new WebCredentials(**UserName**, **Password**);
service.setCredentials(credentials);
EmailMessage message = new EmailMessage(service);
message.setSubject("EWS Test Mail");
message.setBody(MessageBody.getMessageBodyFromText("This is a test mail from EWS"));
message.getToRecipients().add("Test#gmail.com");
message.send();
With the above code, I facing a null pointer exception when message.send() is called.
Log:
Exception in thread "main" microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. null
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:158)
at microsoft.exchange.webservices.data.core.ExchangeService.internalCreateItems(ExchangeService.java:598)
at microsoft.exchange.webservices.data.core.ExchangeService.createItem(ExchangeService.java:657)
at microsoft.exchange.webservices.data.core.service.item.Item.internalCreate(Item.java:245)
at microsoft.exchange.webservices.data.core.service.item.EmailMessage.internalSend(EmailMessage.java:147)
at microsoft.exchange.webservices.data.core.service.item.EmailMessage.send(EmailMessage.java:258)
at EWS.main(EWS.java:28)
Caused by: java.lang.NullPointerException
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.readResponse(ServiceRequestBase.java:369)
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:63)
... 7 more
When debugged further there is a mismatch in the attribute name.
In request, the attribute is contentType is setted in request. But while reading the response, we are getting Null as code used have Content-type. There is a mismatch in the attribute name being set and read.
Is anyone else facing this issue or any workaround?

Acumatica and System Crash related to Push Notification Dispatch Errors

Does anyone understand this error or how to further troubleshoot? I see it on the system monitor screen, and the site crashes seconds after this error.
Level: Error
Source: PushNotifications
Event: Push notification queue dispatcher failed
Link to Screen: ~/Main?ScreenId=SM302010
Message: Push notification queue dispatcher failed TenantID:null, TransactionID:null
TenantID =
ContextScreenId = SM302010
SourceContext = PushNotifications
EventID = PushNotifications_DispatcherFailedEventId
Exception = System.Messaging.MessageQueueException (0x80004005): Operation was cancelled before it could be completed.
at System.Messaging.MessageEnumerator.MoveNext(TimeSpan timeout)
at PX.Data.PushNotifications.MsmqExtensions.MoveNextWithCancellation(MessageEnumerator queueObserver, CancellationToken cancellationToken, Nullable`1 timeout, Action`1 heartBeatDelegate)
at PX.PushNotifications.PrimaryQueue.MsmqPrimaryNotificationQueue.TryDropUnmatchedCommitFromBeginOfQueue(MessageEnumerator queueObserver, CancellationToken cancellationToken)
at PX.PushNotifications.PrimaryQueue.MsmqPrimaryNotificationQueue.TryGetNextTransactionId(CancellationToken cancellationToken, Message& message)
at PX.PushNotifications.PrimaryQueue.MsmqPrimaryNotificationQueue.ReadNextMessageTransaction(CancellationToken cancellationToken, EventsTransaction& messages)
at PX.PushNotifications.NotificationQueueDispatcher.ReadNextTransaction(CancellationToken cancellationToken, EventsTransaction& transaction)
at PX.PushNotifications.NotificationQueueDispatcher.Dispatch(CancellationToken cancellationToken)
This can error arise when site is restarted by IIS. I suppose your site crashes and this error was logged as the result of crash.

Calling EWS services through Managed API by using Oauth (ADAL azure active directory library) 401 Unauthorized

I am developing a Provider hosted app in sharepoint for calling EWS services. I am using managed api.
below is my code,
ClientCredential cc = new ClientCredential("********-****-****-****-********e042", "b/2i******n07QKJ********0uhVVvv*****BUs=");
AuthenticationContext authenticationContext = new AuthenticationContext("https://login.windows.net/mydomain.onmicrosoft.com/");
AuthenticationResult result = authenticationContext.AcquireToken("https://outlook.office365.com/", cc);
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
service.Credentials = new OAuthCredentials(result.AccessToken);
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
CalendarView calView = new CalendarView(DateTime.Today, DateTime.Today.AddHours(24));
Mailbox m = new Mailbox("xxxx#xxxxxxxx.onmicrosoft.com");
FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar, m);
FindItemsResults<Appointment> master = service.FindAppointments(CalendarFolderId, calView);
The error that i am getting is 401 unauthorized..
following is the stack trace,
The remote server returned an error: (401) Unauthorized.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned
an error: (401) Unauthorized.
Source Error: An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The remote server returned an error: (401) Unauthorized.]
System.Net.HttpWebRequest.GetResponse() +6540964
Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse() +29
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) +34
[ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized.]
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) +149
Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request) +407
Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() +36
Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems(IEnumerable`1 parentFolderIds, SearchFilter searchFilter, String queryString, ViewBase view, Grouping groupBy, ServiceErrorHandling errorHandlingMode) +263
Microsoft.Exchange.WebServices.Data.ExchangeService.FindAppointments(FolderId parentFolderId, CalendarView calendarView) +62
SharePointApp2Web.Pages.Default.Page_Load(Object sender, EventArgs e) +1004
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
Any thoughts on this will be helpful.
thanks in advance

Getting the Azure service properties errors on dev environment

I would like to set the DefaultServiceVersion for my azure storage instance, so I wrote the following code:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("CloudStorageConnectionString"));
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
var serviceProperties = blobClient.GetServiceProperties();
if (serviceProperties.DefaultServiceVersion != "2011-08-18")
{
serviceProperties.DefaultServiceVersion = "2011-08-18";
blobClient.SetServiceProperties(serviceProperties);
}
I then tried to run it with the development storage server, and got an exception (erroring in the dev server by the looks) from blobClient.GetServiceProperties()
Microsoft.WindowsAzure.StorageClient.StorageServerException was unhandled by user code
HResult=-2146233088
Message=Server encountered an internal error. Please try again after some time.
Source=Microsoft.WindowsAzure.StorageClient
StackTrace:
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImplWithRetry[T](Func`2 impl, RetryPolicy policy)
at Microsoft.WindowsAzure.StorageClient.CloudBlobClient.GetServiceProperties()
at ConsoleApp.GetContainer() in c:\app\Program.cs:line 90
at ConsoleApp.Main() in c:\app\Program.cs:line 47
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
InnerException: System.Net.WebException
HResult=-2146233079
Message=The remote server returned an error: (500) Internal Server Error.
Source=System
StackTrace:
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebRequest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender)
InnerException:
Is it possible to set the DefualtServiceVersion with a dev server? I haven't tried with the real thing as I really only want to test if this solves another issue I'm having.
Based on the documentation here: http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.windowsazure.storage.blob.cloudblobclient.getserviceproperties.aspx (scroll down to "Remarks" section), this operation is not currently supported on local storage. Also SetServiceProperties operation which enables/disables storage analytics is also not supported.

InvalidProgramException in System.ServiceModel.Dispatcher.ClientRuntime after KB2742595

When ever I install the security Patch KB2742595 on my web server I'm start getting the " Exception type: InvalidProgramException
Exception message: Common Language Runtime detected an invalid program.
at System.ServiceModel.Dispatcher.ClientRuntime..ctor(String contractName, String contractNamespace)"
Stack trace: at System.ServiceModel.Dispatcher.ClientRuntime..ctor(String contractName, String contractNamespace)
at System.ServiceModel.Description.DispatcherBuilder.BuildProxyBehavior(ServiceEndpoint serviceEndpoint, BindingParameterCollection& parameters)
at System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint, Boolean useActiveAutoClose)
at System.ServiceModel.ChannelFactory.CreateFactory()
at System.ServiceModel.ChannelFactory.OnOpening()
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
The configuration is W Server 2K8 SP1 and communicating the WCF service over nettcp.
Please help.

Resources