可以以编程方式清除Silverlight缓存吗

可以以编程方式清除Silverlight缓存吗

本文介绍了如果应用程序崩溃,可以以编程方式清除Silverlight缓存吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,由于某些运行时异常应用程序崩溃,在某些情况下,如果我们再次导航到同一页面,它可能会再次崩溃。

有时一旦我们清除了 Silverlight缓存路径: - C:\ Users \ myusername \ AppData \ LocalLow \ Mysoftoft \ Silverlight )如果它与某些问题有关,它会更新缓存。



所以我的问题是:如果应用程序崩溃,是否需要清除缓存?这将确保最终用户不必等待支持团队解决此问题。



异常详细信息无论如何将在某处登录。

At times, Application crashes due to some Runtime exceptions and in some cases it may crash again if we navigate to the same page again.
Sometimes it starts working fine once we clear the Silverlight cache (Path:- C:\Users\myusername\AppData\LocalLow\Microsoft\Silverlight) if it is related to some issue, which updates the cache.

So my question is: does it required to clear the Cache if the Application crashes? This will ensure that the End user will not have to wait for the Support Team to resolve this.

The Exception details anyhow will be logging in somewhere.

推荐答案

try {
   /* Visual C# code, Java and other codes also resemble (not fully; but much)
    * Write your code statements here, if they execute, good!
    * if, due to some problem they don't. The code in the
    * catch block would execute, showing the error, instead of crashing
    */
} catch (Exception er) {
   // er is the Exception object, containing information about error
}





[]



您应该做什么,在IDE中,为模块(函数)设置几个断点,然后在调试模式下运行应用程序。由于您没有告诉错误是什么,意味着您正在运行应用程序的发行版本,该版本不会引发引发的异常,只是关闭应用程序,或者您错过了添加异常详细信息。



[]



你可以轻松地将断点添加到您的应用程序,并进行调试。运行后,它将让您轻松浏览应用程序中发生的不同进程,并且只有在抛出异常时,您才能看到应用程序缓存中的值以及抛出它的表达式或语句。知道这条线和价值,你可以很容易地理解问题是什么,如果你不知道,那么你可以尝试谷歌为它。有可能搜索异常名称会给你一个答案。执行此操作后,您将能够解决此问题并设置有效的条件块以检查有效的值,如果不是,则可以忽略它们或删除它们。



Exception Handling (Wikipedia)[^]

What you should do, is inside your IDE, set a few breakpoints to the modules (functions) and then run the application in debug mode. Since you're not telling what the error is, means either that you're running the Release version of the application which doesn't tell which exception was raised and just closes the application, or that you've missed adding the exception details.

Breakpoint (Wikipedia)[^]

You can easily add the breakpoints to your application, and debug it. Upon running, it will let you easily navigate through different processes that take place in your application, and just when it throws exception you can see the values inside the application's cache and which expression or statement threw it. Knowing that line and the value, you can easily understand what the problem is, if you don't know, then you can try to Google for it. Chances are that searching for the Exception name would give you an answer. Upon doing this, you will be able to fix this problem and set a valid conditional block to check against the values, which are valid and if they're not you can simply ignore them or delete them.


这篇关于如果应用程序崩溃,可以以编程方式清除Silverlight缓存吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 12:50