User Profile Service Application Error: "Unable to process Put message " - sharepoint-2010

When I try to save changes to an existing synchronization connection in the User Profile Service Application in SharePoint 2010 I get the following error:
"Unable to process Put message".
In the event log I get three error messages:
1. Forefront Identity Manager Event ID 3
Microsoft.ResourceManagement.Service: Microsoft.ResourceManagement.ResourceManagementException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at MIISRCW.IMMSManagementAgent.ModifyMAData(String pszMADataXML, String& ppszUpdatedXML)
at Microsoft.ResourceManagement.SyncConfig.SetMaData(Guid maGuid, String maData)
at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.Update(Guid objectId, CultureInfo locale, IList1 updateParameters, Guid cause)
--- End of inner exception stack trace ---
at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.Update(Guid objectId, CultureInfo locale, IList`1 updateParameters, Guid cause)
at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.ProcessInputRequest(RequestType request)
at Microsoft.ResourceManagement.ActionProcessor.ActionDispatcher.ProcessInputRequest(RequestType request)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction(RequestType request)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction[ResponseBodyType](RequestType request)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request, Guid requestIdentifier, Object redispatchSingleInstanceKey)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest(RequestType request)
at Microsoft.ResourceManagement.WebServices.ResourceManagementService.Put(Message request)
2. Forefront Identity Manager Event ID 3
Microsoft.ResourceManagement.ResourceManagementException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at MIISRCW.IMMSManagementAgent.ModifyMAData(String pszMADataXML, String& ppszUpdatedXML)
at Microsoft.ResourceManagement.SyncConfig.SetMaData(Guid maGuid, String maData)
at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.Update(Guid objectId, CultureInfo locale, IList`1 updateParameters, Guid cause)
--- End of inner exception stack trace ---
3. FIMSynchronization Service Event ID 6309
The server encountered an unexpected error while performing an operation for a management agent.
"BAIL: MMS(6196): mastate.cpp(10154): 0x80040154 (Class not registered)
BAIL: MMS(6196): mastate.cpp(6332): 0x80040154 (Class not registered)
BAIL: MMS(6196): ma.cpp(1334): 0x80040154 (Class not registered)
BAIL: MMS(6196): ma.cpp(1592): 0x80040154 (Class not registered)
Forefront Identity Manager 4.0.2450.11"
I had this instance of the User Profile Service Application set up and working for several months before this problem popped up. My guess is it's related to a Cumulative Update or something like that. Has anyone seen this problem or have any idea how to fix it? I've already tried everything in this link: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/8ee7a934-3336-4041-8993-7d55380b244f/.
Thanks in advance,
John P.

I am not sure why this happens but if you restart these Windows services it should start working
Forefront Identity Manager Service
Forefront Identity Manager Synchronization Service

Related

BizTalk Server 2016: WCF-SAP adapter

We have updated our environment to BizTalk 2016 and we are using WCF-SAP Send Port to invoke a SAP RFC.
We are receiving this error with NCo connection type. In BizTalk 2009 the same RFC with a Send Port WCF-SAP works perfect:
Error Description: Microsoft.ServiceModel.Channels.Common.MetadataException: RFC could not be resolved against SAP system because its metadata could not be obtained. ---> SAP.Middleware.Connector.RfcInvalidStateException: Lookup of function metadata failed for destination NCoConnection ---> SAP.Middleware.Connector.RfcCommunicationException: The only destination NCoConnection62.87.2.23P47PRUEBA002ESono_bztk available failed when retrieving metadata from -- see log for details
at SAP.Middleware.Connector.RfcRepository.findAlternateDestination(Int32& destIndex, Int32& alternativeDestinationsCount, Exception ex)
at SAP.Middleware.Connector.RfcRepository.Execute(RfcFunction function)
at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)
--- End of inner exception stack trace ---
at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)
at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadata(String name)
at SAP.Middleware.Connector.RfcRepository.GetFunctionMetadata(String name)
at Microsoft.Adapters.SAP.NCo.RfcClientConnection.GetRfcFunctionInterface(String rfcName)
at Microsoft.Adapters.SAP.InternalRfcMetadata.InitializeRfcFieldsNCo(String originalRfcName, SAPConnection sapConnection)
at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveOperationMetadata(String operationId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)
at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetOperationMetadata(String uniqueId, Guid clientId, TimeSpan timeout)
at Microsoft.Adapters.SAP.SapFunctionMetadataNCo.ResolveOperationMetadataUsingSdkNCo(String absoluteName, String displayName, String funcName, String operationNamespace, SAPConnection sapConnection, Boolean isTrfc, MetadataLookup metadataLookup, TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
Any idea?
Verify that the SAP system is set to unicode for this RFC, as stated here, where the similar problem is solved.
It also doesn't hurt to generate the SAP schema again in Visual Studio, maybe there are some changes.

UIAComWrapper API related Methods throwing Element Not Available Exception on Windows 10

I am using UIAComWrapper.dll related methods in our code FindFirst(),FindALL() and GetParent().
Randomly each Method is throwing ElementNotAvailableException.
Exceptions as follows:
System.Windows.Automation.ElementNotAvailableException was caught
HResult=-2147220991
Message=Element not available
Source=UiaComWrapper
InnerException: System.Runtime.InteropServices.COMException
ErrorCode=-2146233083
HResult=-2146233083
Message=Operation timed out.
(Exception from HRESULT: 0x80131505)
Source=Interop.UIAutomationClient
StackTrace:
at UIAutomationClient.IUIAutomationTreeWalker.GetParentElementBuildCache(IUIAutomationElement element, IUIAutomationCacheRequest cacheRequest)
at System.Windows.Automation.TreeWalker.GetParent(AutomationElement element, CacheRequest request)"
Regards,
Nagasree.

Nservice bus queue not found exception

I have a connector( which receives messages from different connectors. While receiving the message my connector gives the following message:
[Worker.11] WARN NServiceBus.Unicast.Transport.Transact
ional.TransactionalTransport [(null)] <(null)> - Failed raising 'transport messa
ge received' event for message with ID=fd970068-55ad-49c0-8abc-4133b7f7fe12\2138
47
NServiceBus.Unicast.Queuing.QueueNotFoundException ---> System.Messaging.Message
QueueException: Cannot enlist the transaction.
at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransac
tion internalTransaction, MessageQueueTransactionType transactionType)
at NServiceBus.Unicast.Queuing.Msmq.MsmqMessageSender.NServiceBus.Unicast.Que
uing.ISendMessages.Send(TransportMessage message, Address address)
--- End of inner exception stack trace ---
at NServiceBus.Unicast.UnicastBus.HandleTransportMessage(IBuilder childBuilde
r, TransportMessage msg)
at NServiceBus.Unicast.UnicastBus.TransportMessageReceived(Object sender, Tra
nsportMessageReceivedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.OnTrans
portMessageReceived(TransportMessage msg)
The weird thing is when i was doing the internal testing it was working all fine as soon as this has been now hosted on to amazon server it has started blowing up.
The following is how i have configured my nservice bus with
NServiceBus.Configure.With(
AllAssemblies.Except("libBL.dll").And("libCommon.dll").And("libExtra.dll")).StructureMapBuilder()
.JsonSerializer()
.UnicastBus()
.DoNotAutoSubscribe()
.TransactionTimeout(TimeSpan.FromMinutes(5));
Any help would be much appreciated. If any more information is needed please let me know
Thanks
On searching through the code found out that if a message coming in was failing then i was not rolling back the transaction in which the whole operation began and hence the nservicebus was not able to query the database as it was locked. After putting in the logic for transaction roll back got my connector to work.

Access Denied Error for a method in web service

I have a webservice that works perfectly from localhost but when I hosted it on the testing server I get an error on one of the methods. I am using wsHttp Binding. everything else works fine on the client side except for this method. This is the error that I am getting
client error:
System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Server error:
namespace.Service Error: 10001 : Error occurred in methodname().
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
at System.Diagnostics.EventLog.SourceExists(String source, String machineName)
at System.Diagnostics.EventLog.VerifyAndCreateSource(String sourceName, String currentMachineName)
at System.Diagnostics.EventLog.WriteEvent(EventInstance instance, Byte[] data, Object[] values)
at System.Diagnostics.EventLog.WriteEvent(EventInstance instance, Object[] values)
at System.Diagnostics.EventLogTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType severity, Int32 id, String format, Object[] args)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
at AutoWatch.Entity.WcfService.TrackingService.UpdateIncidentStatusHistory(Int64 incidentId, String status, String username, String comment, Boolean SuspectFaultyUnit) in C:\..servicename.cs:line 566
at AutoWatch.Entity.WcfService.TrackingService.GetNewIncidentMessage(String username) in C:\..servicename.cs:line 444
The Zone of the assembly that failed was:
MyComputer
I added in the error I am getting on the server.
Is it possible I am getting this error because the service cannot write to the event log?
Please help.
Ensure that account running your process where the service is hosted has access rights to the database. For example in case of IIS the account running the application pool where the service is hosted must have login to database server and it must have permissions to do all necessary operations in your database.
Edit:
The server stack trace looks quite straightforward. You have a problem with writing to Windows Event Log! It cannot find source you requested and it doesn't have permission to create it.
I got the same error when I tried to use the following statement in a Web Method of a WCF Service:
string myTypeName = typeof(ErrorHandlerBehavior).AssemblyQualifiedName;
where ErrorHandlerBehavior derives from BehaviorExtensionElement.
The line works well when I test the service on my localhost. On the web, the call of the containing method raises the Exception "Access is denied".
In this case, I guess that the cause was that my IP does not allow the creation of a BehaviourExtensionElement in a Partially Trusted environment (my service is in a shared hosting environment).
Finally, I succeded following the first mechanism described at https://learn.microsoft.com/en-us/dotnet/framework/wcf/extending/configuring-and-extending-the-runtime-with-behaviors about Service Behaviors:
"Using an attribute on the service class. When a ServiceHost is constructed, the ServiceHost implementation uses reflection to discover the set of attributes on the type of the service. If any of those attributes are implementations of IServiceBehavior, they are added to the behaviors collection on ServiceDescription. This allows those behaviors to participate in the construction of the service run time."
I just modified the derivation (no other modification required):
public class ErrorServiceBehavior : Attribute, IServiceBehavior
{ ... }
and use the class as Attribute of my service:
[ErrorServiceBehavior()]
public partial class MyService : IMyService
{...}
No other modification required. Check the original sample at How do I create a global exception handler for a WCF Services?.

w3wp.exe crash - ThreadAbortException

we have a problem that we can't reproduce, it happens randomly on our web server (Windows Server 2008 Datacenter 64-bit, hosted on Amazon EC2) running ASP.NET 4.
It starts with a ASP.NET warning in the error log (a strange GET request with a really long URL):
Exception information:
Exception type: HttpException
Exception message: The length of the URL for this request exceeds the configured maxUrlLength value.
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
Then an error:
Application ID: /LM/W3SVC/2/ROOT
Process ID: 4604
Exception: System.Threading.ThreadAbortException
Message: Thread was being aborted.
StackTrace: at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
Then another error:
Application ID: DefaultDomain
Process ID: 4604
Exception: System.Threading.ThreadAbortException
Message: Thread was being aborted.
StackTrace:
And then the application error:
Faulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e03238, faulting module kernel32.dll, version 6.0.6002.18005, time stamp 0x49e041d1, exception code 0xe0434352, fault offset 0x00000000000176fd, process id 0x%9, application start time 0x%10.
Windbg
I managed to get a dump for a crash with adplus, but I really don't know what to look for. I've troubleshooted some stackoverflows with Windbg before, but I don't know which approach to use for this error.
!pe on the thread with the error:
Exception object: 00000001c323d948
Exception type: System.Threading.ThreadAbortException
Message: Thread was being aborted.
InnerException:
StackTrace (generated):
StackTraceString:
HResult: 80131530
!clrstack
Child SP IP Call Site
0000000015f7f078 0000000076c176fd [GCFrame: 0000000015f7f078]
0000000015f7f258 0000000076c176fd [GCFrame: 0000000015f7f258]
k
Child-SP RetAddr Call Site
0000000015f7edf0 000007fef2826e39 kernel32!RaiseException+0x39
0000000015f7eec0 000007fef2bbbfb4 clr!RaiseTheExceptionInternalOnly+0x363
0000000015f7eff0 000007fef2bbc906 clr!RaiseTheException+0xa4
0000000015f7f020 000007fef2c3b99b clr!BStrFromString+0x66
0000000015f7f050 000007fef2c3b9a9 clr!RealCOMPlusThrow+0x3b
0000000015f7f0c0 000007fef2c93156 clr!RealCOMPlusThrow+0x9
0000000015f7f0f0 000007fef2b229f3 clr!Thread::RaiseCrossContextException+0x2a7
0000000015f7f310 000007fef2830886 clr! ?? ::FNODOBFM::string'+0xafb03
0000000015f7f4c0 000007fef27fcce3 clr!UM2MDoADCallBack+0x9e
0000000015f7f530 000007fef845ba59 clr!UMThunkStubAMD64+0x273
0000000015f7f5c0 000007fef8458f02 webengine4!W3_MGD_HANDLER::ProcessNotification+0x79
0000000015f7f5f0 000007fef27d4595 webengine4!ProcessNotificationCallback+0x43
0000000015f7f620 000007fef27d3ac8 clr!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x181
0000000015f7f6d0 000007fef294658f clr!ThreadpoolMgr::NewWorkerThreadStart+0x2e5
0000000015f7f770 000007fef29447c6 clr!ThreadpoolMgr::WorkerThreadStart+0x3b
0000000015f7f810 0000000076c1be3d clr!Thread::intermediateThreadProc+0x7d
0000000015f7fbd0 0000000076d56a51 kernel32!BaseThreadInitThunk+0xd
0000000015f7fc00 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
Anybody have a clue what this could be? Or can point me in the right direction for analyzing it with Windbg?
Edit:
The incoming urls usually looks like this:
foo.bar.com/wEPDwULLTE1MTk5MzIzMTFkGAMFFmN0bDAwJGRiMSRkZGxEYXRhYmFzZXMPFCsAAmRkZAU7Y3RsMDAkU2VhcmNoQ2xvdWQxJF9SaWdodENvbHVtbiRfU2VhcmNoQ2xvdWQkbHN2U2VhcmNoVGVybXMPFCsADmRkZGRkZGQ8KwAUAAIUZGRkZgL/D2QFK2N0bDAwJHN1cnZleTEkX1JpZ2h0Q29sdW1uJF9JUiR1c2VyQ29tbWVudHMPFCsAA2VnZGQeuUcvQDsShDIp1k7YjJw70Ry 9/Q1B9Sd1egrovYgkw==/
but I found in the event log that this happen for this urls like this aswell:
foo.bar.com/&
("dangerous request" in .NET 4)
You should at least load symbols and then see the correct strings displayed in call stack.
If you are not capable of handling such analysis, I think opening a support case via http://support.microsoft.com is good for you.
I have been trying to work out a similar issue.
I found this article which purports a process for determining the cause, I think it actually makes sense:
http://blogs.msdn.com/b/asiatech/archive/2012/06/21/how-to-troubleshoot-httpexception-request-timed-out-asp-net-4-0-64-bit.aspx
Caveat: I have not been able to sucessfully complete the steps described. I will be posting here asking for help.