首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ClickOnce相关

ClickOnce相关
EN

Stack Overflow用户
提问于 2013-11-11 08:39:36
回答 1查看 198关注 0票数 0

在使用ClickOnce将WPF应用程序发布到中心位置之后,当用户尝试访问应用程序时,我将得到以下异常。还有其他的应用程序,它们可以正常工作,只有当它们访问特定的应用程序时才会发出问题。

我无法解决这一问题的原因,因此例外情况似乎没有多大帮助。

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-11-11 09:50:04

现在已经修好了。以下是解决上述问题的办法。

应用程序在下载和启动之前就崩溃了。为了说明问题,我附上了DispatcherUnhandedException处理程序,以了解更多有关它的信息。有了下面的步骤,我就能够从日志文件中找到确切的异常。在我的例子中,这与虚拟机配置文件权限有关。你的情况可能完全不同。然而,这种方法将帮助您过滤根本原因。

代码语言:javascript
复制
<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">

代码语言:javascript
复制
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();

        }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19902032

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档