在使用ClickOnce将WPF应用程序发布到中心位置之后,当用户尝试访问应用程序时,我将得到以下异常。还有其他的应用程序,它们可以正常工作,只有当它们访问特定的应用程序时才会发出问题。
我无法解决这一问题的原因,因此例外情况似乎没有多大帮助。
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: KG0SYKVDCXEI452K403RIQ4BNPUF3BQA
Problem Signature 02: 1.0.0.0
Problem Signature 03: 528094d2
Problem Signature 04: System.Data
Problem Signature 05: 4.0.0.0
Problem Signature 06: 4dd23ac7
Problem Signature 07: 24da
Problem Signature 08: 2c
Problem Signature 09: System.Windows.Markup.XamlParse
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 2057
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt发布于 2013-11-11 09:50:04
现在已经修好了。以下是解决上述问题的办法。
应用程序在下载和启动之前就崩溃了。为了说明问题,我附上了DispatcherUnhandedException处理程序,以了解更多有关它的信息。有了下面的步骤,我就能够从日志文件中找到确切的异常。在我的例子中,这与虚拟机配置文件权限有关。你的情况可能完全不同。然而,这种方法将帮助您过滤根本原因。
<Application x:Class="xxxxxxxx.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml" DispatcherUnhandledException="ApplicationDispatcherUnhandledException">和
void ApplicationDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
var theException = e.Exception;
var theErrorPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +"\\IntraDataCopyError.txt";
using (System.IO.TextWriter theWriter = new System.IO.StreamWriter(theErrorPath, true))
{
var theNow = DateTime.Now;
theWriter.WriteLine("Error log at : " + theNow.ToShortDateString() + " " + theNow.ToShortTimeString());
while (theException != null)
{
theWriter.WriteLine("Exception: " + theException);
theException = theException.InnerException;
}
}
MessageBox.Show("The program aborted due to following issue.\n" + theErrorPath);
e.Handled = true;
Application.Current.Shutdown();
}https://stackoverflow.com/questions/19902032
复制相似问题