0

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
4

1 に答える 1

0

これは修正されました。以下は、言及された問題の解決策です。

ダウンロード後、起動前にアプリケーションがクラッシュしました。ポイントを特定するために、ハンドラーを同封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();

        }
于 2013-11-11T09:50:04.437 に答える