Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

Posted on by 529

Hi All,

I have in one server two(2) AOS, also in the same server I have the SQL server running with the business databases. I can open the Ax 2012 directly from the server without any problem and point to any of the AOS.

But I am trying to Install only the Ax clients into other client computers and then launching it, it just opens for around 10 seconds and then closes itself. On the Event Viewer I only have this info  

pastedimage1617277291336v1.pngpastedimage1617277322045v2.png

the funny part is that if I shut down the AX services and open the Client it automattically pop ups a warning that the Server is not running. So there is some communication going on.

Also I tryied creating two Shorcuts with direct link into servers configuration file, one for AOS-1(Original) and AOS-2.

If I louch the link for AOS-1 I get the same error it closes itself. but If I lounh the AOS-2 link then AX opens normally Like nothing has happened.

I already Tried by Compiling the whole application and CIL and deleting AUC and KTI files from %AppData% and restarting the services (including restarting the Server) but no success , it is still the same.

What Can I do? is really annoying 

thanks a lot for your time guys

  • Suggested answer
    CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    Fixed,

    Uninstalled and Installed AOS01 again but this time with a different TCP/IP number and WSDL. it happens we have a division in Denmark and they have already running a test enviroment with the same TCP/IP and WSDL as I was using in my old AOS01. (now make sense that the client was running directly from the server and not from external pc, I should have guessed that earlier....)

    actually this MS doc mention that two AOS with same ip makes one of the client to not start : docs.microsoft.com/.../change-aos-ports.

    about reinstalling the AOS with an Existing database; make sure that your databases(business,baseline,model) has the same logic and physical name and you previously delete the record where your old AOS is pointed at the tables SysServerSessions and SysServerConf

    thanks a lot guys for your time!

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    Hi Ergün,

    with every user. I already cleaned the usage data without but no effect.

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    Is it just a problem with certain users or are they all having the same problem?

    You can try to clean the Usagedata (SysLastValue)

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    I fixed that about reinstalling the AOS01 with the existing database. the problem was that the Database name was different from the database Logical name. at least when I changed the logical name to the physical name the AOS was installed correctly.

    but the problem still persists when opening the client from a different computer. :(

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    HI Martin,

    I have tried to install the AOS01 one more time and selecting the Database which I already have.

    Installation got failed: with this info in the log:

    -->DynamicsSetupLog

    2021-04-20 15:17:26Z ******************************************************************************************************

    2021-04-20 15:17:26Z Adding account 'Domain\admin' as a login in Microsoft SQL Server.

    2021-04-20 15:17:26Z Adding account 'Domain\admin' as a login in Microsoft SQL Server.

    2021-04-20 15:17:26Z Creating stored procedures for local sql server. LoginName: 'Domain\admin'.

    2021-04-20 15:17:27Z Creating stored procedure 'CREATETEMPDBPERMISSIONS_POL-AX_01'.

    2021-04-20 15:17:27Z Creating stored procedure '[dbo].[CREATESERVERSESSIONS]'.

    2021-04-20 15:17:27Z Creating stored procedure '[dbo].[CREATEUSERSESSIONS]'.

    2021-04-20 15:17:27Z Creating stored procedure '[dbo].[getNumInternal]'.

    2021-04-20 15:17:27Z Creating stored procedure '[dbo].[sp_GetNextRecId]'.

    2021-04-20 15:17:27Z isolation level = read committed

    2021-04-20 15:17:27Z ALTER DATABASE [AXDB13] SET READ_COMMITTED_SNAPSHOT ON

    2021-04-20 15:17:57Z Error executing command: ALTER DATABASE [AXDB13] SET READ_COMMITTED_SNAPSHOT ON

    2021-04-20 15:17:57Z Reason: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    2021-04-20 15:17:57Z ALTER DATABASE statement failed.

    2021-04-20 15:17:57Z ******************************************************************************************************


    2021-04-20 14:10:57Z at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    2021-04-20 14:10:57Z at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    2021-04-20 14:10:57Z at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    2021-04-20 14:10:57Z at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
    2021-04-20 14:10:57Z at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
    2021-04-20 14:10:57Z at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    2021-04-20 14:10:57Z at Microsoft.Dynamics.Setup.Components.DatabaseSqlBusiness.SetRcsiForSqlServer()

    <-- DynamicsSetupLog

    Is the same Admin user that I use for AX at the beginning. also I have installed a new AOS with a new database and it works (all the time using the same admin user).

    any clue?

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    What are the consequences of reinstalling AOS1?, should I make something before and after. something to be aware of.

    long time ago I don't install this. I don't want to have a big mess after that.

    but I am looking forward to fix it if that what is needed

    thanks beforehand

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    I understand that these AOS services are running on the same server; what I meant was if they're two separarate AX environment, with different code bases and databases.

    It may be time to reinstall AOS1.

    Regarding support, it's normally requested via LCS. Check out Cloud-powered support – logging support incident for AX 2012 for more information.

    I belive that the "No Device" message is related to telephony integration.

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    Hi Marcin.

    Thanks again for replying. AOS1 and AOS2 are running on same environment. Everything is running on the same Server. We are migrating our old ax3.0 into 2012.

    I have also many databases in two different instance of SQL server. from once in a while we switch our server configuration to point out to our databases to AOS1 or AOS2 and vice versa as is needed, as I repeat we are trying to test everything.

    as you say, should be something wrong with AOS1., because I have just inverted the databases and still the when connecting to AOS1 it crashes and when lauching to AOS2 is working fine. but I get some Infolog errors from AOS2. only when opening from a different computers. Couse when I launch the client directly from the server it opens normally.

    pastedimage1617438467326v1.png 

    about the support request. How can I do that. I think I haven't done it before.

    thanks beforehand for your help Marcin

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    All right, so it doesn't seem to be about the version, but there still might be something wrong about AOS1.

    I'm assuming that AOS1 and AOS2 are two separate environment, each with its own codebase and database. Is that correct?

    If I'm not mistaken, exception 0x00000721 means "A security package-specific error occurred". I'm not familiar with it and all I know is what I've just found on the internet. It suggests a problem with DNS or AD.

    By the way, I found two other threads about this exception in AX client, both without a solution. It might be worth to create a support request to Microsoft and get it answered from them - it will likely help other people as well.

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: The process was terminated due to an unhandled exception. System.Runtime.InteropServices.SEHException at <Module>._wWinMainCRTStartup() AX2012R3CU11

    Hi Martin,

    thanks for replying

    at least from here they both looks like have the same Version as the Client, I am using the Same installer for everything.

    pastedimage1617280511534v1.pngpastedimage1617280626788v2.png

    They Only think that I can think Of is that; I have many Business databases duplicates. I make a backup and restore them with a new for testing purposes. I dont know if that can mess with something

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans