【问题标题】:BizTalk Configuration.exe remote execution errorBizTalk Configuration.exe 远程执行错误
【发布时间】:2012-11-22 08:10:01
【问题描述】:

我正在编写一个脚本来自动安装 BizTalk Server,然后通过 BizTalk“configuration.exe”实用程序应用配置。 当我在本地运行 configuration.exe 实用程序并为其提供配置 xml 时,它工作正常,并且它在配置过程中显示一个对话框,无需任何用户交互即可显示进度。

我遇到的问题是当我尝试通过 Powershell 远程执行 configuration.exe 时。未应用配置,并且 configuration.exe 进程在进程资源管理器中显示几秒钟然后退出。

我检查了错误日志,似乎 configuration.exe 在尝试显示其进度窗口时崩溃,但它无法远程执行此操作。错误日志中出现的 3 个错误是:

Windows 错误报告:

            - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
            - <System>
              <Provider Name="Windows Error Reporting" /> 
              <EventID Qualifiers="0">1001</EventID> 
              <Level>4</Level> 
              <Task>0</Task> 
              <Keywords>0x80000000000000</Keywords> 
              <TimeCreated SystemTime="2012-12-03T13:24:10.000000000Z" /> 
              <EventRecordID>3956</EventRecordID> 
              <Channel>Application</Channel> 
              <Computer>HOSTNAME</Computer> 
              <Security /> 
              </System>
            - <EventData>
              <Data /> 
              <Data>0</Data> 
              <Data>CLR20r3</Data> 
              <Data>Not available</Data> 
              <Data>0</Data> 
              <Data>configuration.exe</Data> 
              <Data>3.0.1.0</Data> 
              <Data>4c5479ac</Data> 
              <Data>System.Windows.Forms</Data> 
              <Data>4.0.0.0</Data> 
              <Data>4f61a8cc</Data> 
              <Data>3e06</Data> 
              <Data>ee</Data> 
              <Data>System.InvalidOperationException</Data> 
              <Data /> 
              <Data /> 
            <Data>C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_configuration.ex_120852993cfe8d93d2aac7a1cea49f9a18b688_345a8b46</Data> 
              <Data /> 
              <Data>0</Data> 
              <Data>b823ff23-3d4c-11e2-ae6f-005056bc6ac0</Data> 
              <Data>4</Data> 
              </EventData>
              </Event>

应用程序错误:

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2012-12-03T13:24:10.000000000Z" /> 
  <EventRecordID>3955</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>HOSTNAME</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>Configuration.exe</Data> 
  <Data>3.9.469.0</Data> 
  <Data>4c5479ac</Data> 
  <Data>KERNELBASE.dll</Data> 
  <Data>6.1.7601.17651</Data> 
  <Data>4e211319</Data> 
  <Data>e0434352</Data> 
  <Data>0000b9bc</Data> 
  <Data>1be0</Data> 
  <Data>01cdd1597a111847</Data> 
  <Data>C:\Program Files (x86)\Microsoft BizTalk Server 2010\Configuration.exe</Data> 
  <Data>C:\Windows\syswow64\KERNELBASE.dll</Data> 
  <Data>b823ff23-3d4c-11e2-ae6f-005056bc6ac0</Data> 
  </EventData>
  </Event>

.NET 运行时错误:

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name=".NET Runtime" /> 
  <EventID Qualifiers="0">1026</EventID> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2012-12-03T13:24:10.000000000Z" /> 
  <EventRecordID>3954</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>HOSTNAME</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>Application: Configuration.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException Stack: at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window) at System.Windows.Forms.Form.ShowDialog() at Microsoft.BizTalk.Configuration.Program.RunConfigProgressUIThread() at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) 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.Threading.ThreadHelper.ThreadStart()</Data> 
  </EventData>
  </Event>

我已经检查了可以传递给 configuation.exe 的选项,因为我知道一些 MSI 和 EXE 安装程序确实有 /silent 选项,但这个 EXE 似乎没有。

我也尝试通过 PSExec 运行它,但遇到了类似的错误。

如果有任何远程运行的方法,请告诉我。谢谢。

【问题讨论】:

  • 您是否尝试通过登录从服务器运行它?如果它运行良好,那么它可能与远程运行时的 Windows 凭据有关。
  • 当我在本地运行它时它确实有效,当我远程运行它时我使用相同的凭据,所以我认为用户身份验证没有问题。此外,事件日志不会显示任何用户身份验证错误。
  • 尝试远程运行一些其他脚本,以确保您有正确的设置并缩小问题范围。
  • 我已经远程运行了各种其他命令,它们都成功执行了。
  • 要明确一点,因为我是通过 Powershell 远程运行命令,所以我是这样运行它的: $Command = "& 'c:\Program Files (x86)\Microsoft BizTalk服务器 2010\Configuration.exe' /s C:\Temp\BiztalkConfig.xml /l C:\Temp\BiztalkConfig$(Get-Date -f ddMMyyyy_HHmmss).log" $PSSession = New-PSSession -ComputerName BizTalkServer Invoke-Command -会话 $PSSession -ArgumentList $Command -ScriptBlock { Invoke-Expression $args[0] }

标签: powershell biztalk unhandled-exception showdialog remote-execution


【解决方案1】:

我知道这是一个非常古老的帖子,但只是一个更新.. 如果有人尝试远程配置 BizTalk 2013 .. 请安装 BizTalk 的最新更新(当前 CUW3 BizTalk2013CU3-KB3088676-ENU)。这将提供 /noprogressbar 选项。这将解决问题

【讨论】:

  • 谢谢。我在 Biztalk 2013 R2 中仍然存在问题。安装 CU3 并使用 /noprogressbar 有效。
【解决方案2】:

我不知道对你来说是否为时已晚,但我面临同样的问题。这是因为 Configuration.exe 使用了实现一些 MessageBox.Show() 的表单组件,这与非交互模式不兼容。如果您查看事件查看器中的信息消息,您将看到带有以下 Waston 报告的转储文件:

<?xml version="1.0" encoding="utf-16"?>
<WatsonInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <osVersion>Microsoft Windows NT 6.2.9200.0</osVersion>
  <AppName>Microsoft ® BizTalk ® Server 2013</AppName>
  <AppVersion>3.10.229.0</AppVersion>
  <exceptionString>System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at Microsoft.BizTalk.Configuration.Program.RunConfigProgressUIThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()</exceptionString>
  <exceptionMessage>Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.</exceptionMessage>
  <exceptionStackTrace>   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at Microsoft.BizTalk.Configuration.Program.RunConfigProgressUIThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()</exceptionStackTrace>
  <targetSite>System.Windows.Forms.DialogResult ShowDialog(System.Windows.Forms.IWin32Window)</targetSite>
  <HResult>80131509</HResult>
</WatsonInfo>

你会看到这个错误异常:

System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

如果你一直对这个过程感兴趣(在命令行中远程配置 biztalk),我刚刚在Azure BizTalk One Touch Configuration 写了一篇关于这个的帖子。

我编写了一个扩展配置.exe 组件以不使用模式对话框并启用远程 powershell 的配置。我在绕过双跳问题后使用计划任务,但如果您在本地网络中,我认为您可以在您的计算机之间配置受信任的连接,并在创建 pssession 时使用 -Authentication CredSSP 应该可以工作。

希望有帮助

杰雷米 MVP Integration

【讨论】:

  • 嗨,杰瑞米,非常感谢。因为我已经从我需要它的地方搬走了,所以为时已晚,但非常感谢你的帮助,我一定会保留这个作为参考,以防我需要再次做这样的事情。干杯
猜你喜欢
  • 2012-04-05
  • 2020-11-12
  • 1970-01-01
  • 2017-04-11
  • 2018-11-30
  • 1970-01-01
  • 2016-05-04
  • 2018-08-31
  • 2012-07-05
相关资源
最近更新 更多