none
BizTalk Server 2016 Microsoft Configuration Framework has stopped working on BAM Portal Step

    Question

  • I am currently setting up a standalone BizTalk Server 2016 Dev VM as per Sandro's excellent guide.

    In the BizTalk Configuration Tool the configuration process reaches the BAM Portal step and then crashes with a warning dialog displaying the message: "Microsoft Configuration Framework has stopped working".

    All other steps succeed, including the setup of BAM itself. The EDI setup step also succeeds when I subsequently repeated it on its own. The BAM Portal setup step blows up every time.

    The BizTalk Configuration App has been run as a regular user and as Administrator - blows up either way.

    Looking in the Event Log I can see a .NET Runtime error with an Event ID of 1026:

    Application: Configuration.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.AccessViolationException
       at Microsoft.BizTalk.Configuration.IConfig2.ConfigureFeature(System.String, System.String, System.String ByRef)
       at Microsoft.BizTalk.Configuration.ConfigMapper.ConfigureFeature(Microsoft.BizTalk.Configuration.ConfigMap)
       at Microsoft.BizTalk.Configuration.ConfigMapper.ConfigureFeatures()
       at Microsoft.BizTalk.Configuration.ConfigForm.ConfigWizard_ConfigStarted()
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
       at Microsoft.BizTalk.Configuration.ConfigForm.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
       at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
       at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
       at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
       at Microsoft.BizTalk.Configuration.Program.Main(System.String[])

    Followed by an Application Error with an Event Id of 1000:

    Faulting application name: Configuration.exe, version: 3.12.774.0, time stamp: 0x57ef10e9
    Faulting module name: ConfigFrameworkHelper.dll, version: 3.12.774.0, time stamp: 0x57ef1d85
    Exception code: 0xc0000005
    Fault offset: 0x0002607f
    Faulting process id: 0x1e8c
    Faulting application start time: 0x01d25791215177b0
    Faulting application path: C:\Program Files (x86)\Microsoft BizTalk Server 2016\Configuration.exe
    Faulting module path: C:\Program Files (x86)\Microsoft BizTalk Server 2016\ConfigFrameworkHelper.dll
    Report Id: 0fc98793-d1b2-471b-b956-e956681ce7da
    Faulting package full name: 

    None of which really throws any light on what the root problem is or what the resolution might be.

    Is anyone else seeing this? Does anyone know what the problem is and how to resolve it?

    Friday, December 16, 2016 12:07 PM

Answers

  • Here is the resolution for this problem in case it helps someone else.

    The resolution was made more difficult because Configuration.exe blows up with an unhandled exception and so doesn't inform you of the log file location, and so you cannot see the real underlying issue. The logfile location I discovered by letting the configuration process run and fail and then ran it again, just to setup the EDI portion, which succeeds and gives you the location of the logfile:

     - C:\Users\{User}\AppData\Local\Temp
     - logfilename format of ConfigLog(MM-DD-YYYY hhhmmmsss).txt

    If you review the end of the logfile you will see the following series of errors:

    [2016-12-18 13:00:51:0577  Error ConfigHelper] Cannot alter the role 'NSSubscriberAdmin', because it does not exist or you do not have permission.
    [2016-12-18 13:00:51:0595  Error ConfigHelper] SQL error: 42000 Native error code: 15151
    [2016-12-18 13:00:51:0611  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(1806): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0627  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(2014): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0643  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(1424): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0659  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(779): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0671  Error ConfigHelper] Failed to execute SQL statement on database: BAMAlertsApplication on computer: BTS2016DEV01
    [2016-12-18 13:00:51:0687  Error ConfigHelper] Cannot alter the role 'NSSubscriberAdmin', because it does not exist or you do not have permission.

    So the root problem is that the NSSubscriberAdmin DB Role does not exist in the BAMAlertsApplication database. Clearly this should have been setup somewhere earlier in the BizTalk configuration process. The resolution is to create the missing role in the database with a script such as this:

    USE BAMAlertsApplication
    CREATE ROLE NSSubscriberAdmin AUTHORIZATION dbo
    GO

    Now repeat the configuration process and this time the BAM Portal step will pass.

    Unfortunately you can't fix this before you run the configuration process because the BAMAlertsApplication database doesn't exist until the configuration process creates it. So you have to run it once and let it fail, then execute the script to add the role, then run the configuration process to a successful completion.

    This is a problem that has been in BizTalk Server since BizTalk Server 2013, as this blog post from Sandro Pereira shows  (https://sandroaspbiztalkblog.wordpress.com/2014/02/05/bam-portal-configuration-error-attempted-to-read-or-write-protected-memory-this-is-often-an-indication-that-other-memory-is-corrupt-configuration/). Although this article refers to a multi-server setup, it also applies in a completely self-contained development server as well.

    Unfortunately fixing it clearly hasn't been a priority for Microsoft - which is disappointing, so some BizTalk users may still be facing this problem with BizTalk Server 2016.
    • Marked as answer by RedDwarf62 Sunday, December 18, 2016 2:26 PM
    Sunday, December 18, 2016 2:25 PM

All replies

  • Here is the resolution for this problem in case it helps someone else.

    The resolution was made more difficult because Configuration.exe blows up with an unhandled exception and so doesn't inform you of the log file location, and so you cannot see the real underlying issue. The logfile location I discovered by letting the configuration process run and fail and then ran it again, just to setup the EDI portion, which succeeds and gives you the location of the logfile:

     - C:\Users\{User}\AppData\Local\Temp
     - logfilename format of ConfigLog(MM-DD-YYYY hhhmmmsss).txt

    If you review the end of the logfile you will see the following series of errors:

    [2016-12-18 13:00:51:0577  Error ConfigHelper] Cannot alter the role 'NSSubscriberAdmin', because it does not exist or you do not have permission.
    [2016-12-18 13:00:51:0595  Error ConfigHelper] SQL error: 42000 Native error code: 15151
    [2016-12-18 13:00:51:0611  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(1806): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0627  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(2014): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0643  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(1424): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0659  Error ConfigHelper] d:\bt\52584\private\source\common\configwizard\confighelper\sqlhelper.cpp(779): FAILED hr = 80040e14

    [2016-12-18 13:00:51:0671  Error ConfigHelper] Failed to execute SQL statement on database: BAMAlertsApplication on computer: BTS2016DEV01
    [2016-12-18 13:00:51:0687  Error ConfigHelper] Cannot alter the role 'NSSubscriberAdmin', because it does not exist or you do not have permission.

    So the root problem is that the NSSubscriberAdmin DB Role does not exist in the BAMAlertsApplication database. Clearly this should have been setup somewhere earlier in the BizTalk configuration process. The resolution is to create the missing role in the database with a script such as this:

    USE BAMAlertsApplication
    CREATE ROLE NSSubscriberAdmin AUTHORIZATION dbo
    GO

    Now repeat the configuration process and this time the BAM Portal step will pass.

    Unfortunately you can't fix this before you run the configuration process because the BAMAlertsApplication database doesn't exist until the configuration process creates it. So you have to run it once and let it fail, then execute the script to add the role, then run the configuration process to a successful completion.

    This is a problem that has been in BizTalk Server since BizTalk Server 2013, as this blog post from Sandro Pereira shows  (https://sandroaspbiztalkblog.wordpress.com/2014/02/05/bam-portal-configuration-error-attempted-to-read-or-write-protected-memory-this-is-often-an-indication-that-other-memory-is-corrupt-configuration/). Although this article refers to a multi-server setup, it also applies in a completely self-contained development server as well.

    Unfortunately fixing it clearly hasn't been a priority for Microsoft - which is disappointing, so some BizTalk users may still be facing this problem with BizTalk Server 2016.
    • Marked as answer by RedDwarf62 Sunday, December 18, 2016 2:26 PM
    Sunday, December 18, 2016 2:25 PM
  • To avoid the the BizTalk Configuration wizard faulting:

    1. Configure all the BizTalk components except BAM Portal
    2. Add the NSSubscriberAdmin role to the BAMAlertsApplication database
    3. Then configure BAM portal

    Tuesday, October 24, 2017 2:56 AM