Framework error in some transactions and different users AX 2012 - axapta

In Dynamics AX 2012 R2 randomly in different modules of the system a .NET Framework error arises. AX aborts the transaction and errors remain because the transaction does not complete.
This happens with different users and not always in the same processes.
Error:
Uncontrolled exception in the application. If you click Continue the
application will ignore this error and try to continue. If you click
on Sair the application will be closed immediately.
An external component produced an exception.
The environment is made up of a server for databases, another for AOS and another with access for clients.
Any advice?

Related

BizTalk 2010 server returning error

All BizTalk 2010 applications on one server stopped working and creating same message:
Routing Failure Report for "Routing Failure Report for "[port-name-here]"
This service instance exists to help debug routing failures for instance "{B79F1529-4796-4CE3-A749-4FA8890A7601}". The context of the message associated with this instance contains all the promoted properties at the time of the routing failure.
They are working well on other servers.
What could cause this problem and what would be best way to fix it ?
UPDATE:There was some king of database cleaning script was executed on BizTalk database. Is there way to validate if there is issue into BizTalk database ?
One possible solution is to reinstall BizTalk application , but I want to make learning experience from it and figure out how to troubleshoot such problems.
It seems like no Subscribers are being found for the message.
Please make sure that the subscribing Send port or the Orchestration are enabled and their corresponding host instances are in enabled mode as well.
Also, if the Send ports are using any context property filters to subscribe to the message, make sure that the filter is correct and the context property values for the received message is correct.

Running VBA functions in a server side Access database from a WCF service

I've been researching for days and I've gotten to the point where my WCF service creates an Access object via com/interop. I've ran the OpenCurrentDatabase call for the Access object without an error but Application.CurrentDB is still nothing/null. If the CurrentDB is nothing then I surely can't call Application.Run "myFunction" I realize WCF services aren't meant to be user interactive, but it's a long story why I'm trying to go this route. Basically I need to have a proof of concept ready sooner rather than later and the alternative (correct) route involves the complete re-writing of a large complex access VBA application. It's not a permissions issue, I have the IIS user names added to the security tab. What I really need is a way to set Environment.UserInteractive to true so my WCF service can create an instance of Access on my server machine, run the VBA functions, close out, return true. I'm using VS 2010 for the WCF, IIS 7 for my server, Access 2010 for the VBA application. Please help!
The answer is to have the WCF service write the access macro name to a database and have a desktop application on the server machine monitor the database. The desktop application loads access, performs the actions, and writes back to the database upon completion. The WCF service monitors the database waiting for an "operation complete" status and returns the result.

Guidelines about handling sql exceptions in dot net application

consider there is n-tier architecture in asp.net 3.5 application with c# language and Database in the sql server 2008.
Suppose we called the stored procedure exist in database, in our data access layer. But while execution of the stored procedure ,It gets exception. (which may facilitate to throw out in stored procedure) then how application know what is the exception exactly?
Is ADO.NET have capability to understand and represent the thrown exceptions by sql sql server. I know there is SQLException namespace provided by CLR's exception handling module. but as per my experience, this module can not represent the validation exceptions as it is encountered in sql server. Can somebody correct me and guide properly in handling the sql server exceptions form the dot net application ? and how we can handle them ? are we need to wait for execution/ reach at catch block always in dataaccess layer?
May be this question repeats, but I want to share my experience.
You should be validating and/or sanitising all the data that has been input before it reaches the database, so unless the DB is not present or there is a bug in a SP you shouldn't really get SQL exceptions.
From my experience you would catch the SQL Exception log it, wrap it in an ApplicationException and return a user friendly error to the UI.

is there a relationship between an application pool and a windows service

I have a website in IIS 6 (on Windows 2003 Server) that has an application pool that keeps crashing because of too many unhandled exceptions being thrown by some processes. These exceptions are related to a windows service that executes every five minutes. Every time the service runs i get the below warning in the system log (in event viewer):
A process serving application pool
'AppPool1' suffered a fatal
communication error with the World
Wide Web Publishing Service. The
process id was '4172'. The data field
contains the error number.
(to note: I also get two errors in the application log, one which displays the stack trace and the second which displays the EventType)
I am trying to recreate this exact scenario in another website (on the same server) so that I can attempt to catch the exception in a development environment and then apply the working code to the live environment. I have created a second service, a second application pool, etc. My problem is that I cannot cause the same warning above for the second application pool (i.e. AppPool2). I have the theory that my second service is somehow connected to my first application pool (AppPool1) but have been unable to prove or confirm this.
My question is, am I right? Is there some sort of "connection/relationship" between the windows service and the application pool (i.e. can i configure a service to access a certain application pool)? If so, how would I configure this? If not, then I am wondering if is it possible that a process from my second service is accessing my first application pool?
Thanks.
Application pools are isolated processes. Your Windows Service process should not affect an application pool process unless it shares a vital resource to that process(like a file...etc), thus causes it to crash.
It sounds like your Windows Service is calling a Web Service in your application or maybe the same resource on the server as your application?

Previously working webservice stopped working

All of a sudden we started to get this error in our webapplication.
It's weird because it has been working for months and months and noone has ever touched the code.
Does anyone have any idea why this error could occur all of a sudden?
Server Error in '/' Application.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindOne()
at AuthTools.GetUserMemberShip(String login) in D:\IIS\WWW_reports_WebServices\App_Code\AuthTools.vb:line 35
You are using some unmanaged COM object from your managed code. Could it be that this object changed? I.e. it's not your application, it's the unmanaged library you are using. I might be wrong, but that's all I can think of when looking at the stack trace.
Heh, it's a bit embarrassing but our webservice queries our active directory to find user groups, and due to a missconfiguration where a group had a member it was also a member of, our application ended up in an endless loop.
The .Net Framework BCL uses a lot of wrapper objects around legacy COM code to interact with ActiveDirectory and other LDAP sources. This can be caused by changed settings at the AD server, or there are issues with connection management to AD (are you properly closing your connections, for example.)
I would start investigating from the server-end and determine issues from there. The diagnostics/error-messages within the .Net Framework classes, because they bubble up through COM, aren't that helpful.

Resources