如果您想了解ServerErrorin''/''ApplicationRuntimeError错误和servererrorin'/'application.runtimeerror的知识,那么本篇文章
如果您想了解Server Error in ''/'' Application Runtime Error 错误和server error in '/' application. runtime error的知识,那么本篇文章将是您的不二之选。我们将深入剖析Server Error in ''/'' Application Runtime Error 错误的各个方面,并为您解答server error in '/' application. runtime error的疑在这篇文章中,我们将为您介绍Server Error in ''/'' Application Runtime Error 错误的相关知识,同时也会详细的解释server error in '/' application. runtime error的运用方法,并给出实际的案例分析,希望能帮助到您!
本文目录一览:- Server Error in ''/'' Application Runtime Error 错误(server error in '/' application. runtime error)
- android.app.ApplicationErrorReport的实例源码
- Angular 应用的 browser Application 和 server Application bundle
- APP 链接ROS时出现pymongo.errors.ServerSelectionTimeoutError: localhost:27017 错误
- asp.net-mvc – ErrorAttribute vs OnException与Application_Error
Server Error in ''/'' Application Runtime Error 错误(server error in '/' application. runtime error)
项目发布后 在本地发布可以运行 在服务器就会出现这种错误
在网上也查找了各种资料 解决方案 都没有解决
因为我用的 C# 首先在 Webconfig 配置文件中的 system.web 中加入 <customErrors mode="Off"/>
当你在出错的时候再刷新一下页面 就会出现 具体的错误信息
在刷新一次就是这样的结果
在网上查找了相关的资料 也是没有一个具体的解决方案
但是看到一条 就是说
数据库的字段不一致或者表不存在 也会导致这种情况
因为我用的是 EF 中的 DBFrist 可能是在我更改数据库的时候 没有在项目中更新实体
因为我的第一次执行的时候就是查询语句 所以 这个问题是可能存在的
在更新一下 实体之后 错误终于解决了 找了几个小时 还是很着急的啊
记录项目中出现的问题
不一定大家的错误都是同样的解决方案 但是可能有 没有想到的问题
遇到问题,解决问题,记录问题!!!
原文出处:https://www.cnblogs.com/Hmd528/p/10582740.html
android.app.ApplicationErrorReport的实例源码
/** * Always process the violation on the UI thread. This ensures other crash reports are not * corrupted. Since each individual user has a very small chance of uploading each violation,* and we have a hard cap of 3 per session,this will not affect performance too much. * * @param violationInfo The violation info from the StrictMode violation in question. */ @UiThread private static void reportStrictModeViolation(Object violationInfo) { try { Field crashInfoField = violationInfo.getClass().getField("crashInfo"); ApplicationErrorReport.CrashInfo crashInfo = (ApplicationErrorReport.CrashInfo) crashInfoField.get(violationInfo); String stackTrace = crashInfo.stackTrace; if (stackTrace == null) { Log.d(TAG,"StrictMode violation stack trace was null."); } else { Log.d(TAG,"Upload stack trace: " + stackTrace); JavaExceptionReporter.reportStackTrace(stackTrace); } } catch (Exception e) { // Ignore all exceptions. Log.d(TAG,"Could not handle observed StrictMode violation.",e); } }
/** * Always process the violation on the UI thread. This ensures other crash reports are not * corrupted. Since each individual user has a very small chance of uploading each violation,e); } }
/** * Always process the violation on the UI thread. This ensures other crash reports are not * corrupted. Since each individual user has a very small chance of uploading each violation,e); } }
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public static void showDefaultReportActivity(Context context,Throwable th) { String packageName = context.getPackageName(); PackageManager pm = context.getPackageManager(); // Not perfect.. but it'll have to do. ApplicationErrorReport report = new ApplicationErrorReport(); report.installerPackageName = pm.getInstallerPackageName(packageName); report.packageName = packageName; report.processName = packageName; report.time = System.currentTimeMillis(); report.systemApp = false; report.type = ApplicationErrorReport.TYPE_CRASH; report.crashInfo = new ApplicationErrorReport.CrashInfo(th); sAppContext.startActivity(new Intent(Intent.ACTION_APP_ERROR) .setPackage("com.google.android.Feedback") .putExtra(Intent.EXTRA_BUG_REPORT,report) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); }
public static void sendCrashReport(Throwable ex,final Context context) { if (!isPlayStoreInstall(context) || Util.isDebuggable(context)) return; try { ApplicationErrorReport report = new ApplicationErrorReport(); report.packageName = report.processName = context.getPackageName(); report.time = System.currentTimeMillis(); report.type = ApplicationErrorReport.TYPE_CRASH; report.systemApp = false; ApplicationErrorReport.CrashInfo crash = new ApplicationErrorReport.CrashInfo(); crash.exceptionClassName = ex.getClass().getSimpleName(); crash.exceptionMessage = ex.getMessage(); StringWriter writer = new StringWriter(); PrintWriter printer = new PrintWriter(writer); ex.printstacktrace(printer); crash.stackTrace = writer.toString(); StackTraceElement stack = ex.getStackTrace()[0]; crash.throwClassName = stack.getClassName(); crash.throwFileName = stack.getFileName(); crash.throwLineNumber = stack.getLineNumber(); crash.throwMethodName = stack.getmethodName(); report.crashInfo = crash; final Intent bug = new Intent(Intent.ACTION_APP_ERROR); bug.putExtra(Intent.EXTRA_BUG_REPORT,report); bug.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (bug.resolveActivity(context.getPackageManager()) != null) context.startActivity(bug); } catch (Throwable exex) { Log.e(TAG,exex.toString() + "\n" + Log.getStackTraceString(exex)); } }
@Override protected List<Item> getItemList() { List<Item> items = new ArrayList<>(); if (BuildConfig.ENG) { items.add(new ActionItem(getString(R.string.dev_item_watch_history)) { @Override protected void onSelected() { getMainActivity().getoverlayManager().showRecentlyWatchedDialog(); } }); } items.add(new ActionItem(getString(R.string.dev_item_send_Feedback)) { @Override protected void onSelected() { Intent intent = new Intent(Intent.ACTION_APP_ERROR); ApplicationErrorReport report = new ApplicationErrorReport(); report.packageName = report.processName = getContext().getPackageName(); report.time = System.currentTimeMillis(); report.type = ApplicationErrorReport.TYPE_NONE; intent.putExtra(Intent.EXTRA_BUG_REPORT,report); startActivityForResult(intent,0); } }); items.add(new SwitchItem(getString(R.string.dev_item_store_ts_on),getString(R.string.dev_item_store_ts_off),getString(R.string.dev_item_store_ts_description)) { @Override protected void onUpdate() { super.onUpdate(); setChecked(TunerPreferences.getStoreTsstream(getContext())); } @Override protected void onSelected() { super.onSelected(); TunerPreferences.setStoreTsstream(getContext(),isChecked()); } }); return items; }
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex)); } }
public static void openFeedback(Activity activity) { try { throw new IOException(); } catch (IOException e) { ApplicationErrorReport report = new ApplicationErrorReport(); report.packageName = report.processName = activity.getApplication() .getPackageName(); report.time = System.currentTimeMillis(); report.type = ApplicationErrorReport.TYPE_CRASH; report.systemApp = false; ApplicationErrorReport.CrashInfo crash = new ApplicationErrorReport.CrashInfo(); crash.exceptionClassName = e.getClass().getSimpleName(); crash.exceptionMessage = e.getMessage(); StringWriter writer = new StringWriter(); PrintWriter printer = new PrintWriter(writer); e.printstacktrace(printer); crash.stackTrace = writer.toString(); StackTraceElement stack = e.getStackTrace()[0]; crash.throwClassName = stack.getClassName(); crash.throwFileName = stack.getFileName(); crash.throwLineNumber = stack.getLineNumber(); crash.throwMethodName = stack.getmethodName(); report.crashInfo = crash; Intent intent = new Intent(Intent.ACTION_APP_ERROR); intent.putExtra(Intent.EXTRA_BUG_REPORT,report); activity.startActivity(intent); } }
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex)); } }
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex)); } }
FeedbackOptions(int paramInt,String paramString1,Bundle paramBundle,String paramString2,ApplicationErrorReport paramApplicationErrorReport,String paramString3,BitmapTeleporter paramBitmapTeleporter,String paramString4,ArrayList<FileTeleporter> paramArrayList,boolean paramBoolean,ThemeSettings paramThemeSettings,logoptions paramlogoptions) { this.mVersionCode = paramInt; this.mAccountInUse = paramString1; this.mPsdBundle = paramBundle; this.mDescription = paramString2; this.mApplicationErrorReport = paramApplicationErrorReport; this.mCategoryTag = paramString3; this.mBitmapTeleporter = paramBitmapTeleporter; this.mPackageName = paramString4; this.mFileTeleporters = paramArrayList; this.mExcludePii = paramBoolean; this.mThemeSettings = paramThemeSettings; this.mlogoptions = paramlogoptions; }
public final ApplicationErrorReport.CrashInfo getCrashInfo() { if (this.mApplicationErrorReport == null) { return null; } return this.mApplicationErrorReport.crashInfo; }
public FeedbackOptions(int paramInt,logoptions paramlogoptions) { this.a = paramInt; this.b = paramString1; this.c = paramBundle; this.d = paramString2; this.e = paramApplicationErrorReport; this.f = paramString3; this.g = paramBitmapTeleporter; this.h = paramString4; this.i = paramArrayList; this.j = paramBoolean; this.k = paramThemeSettings; this.l = paramlogoptions; }
public final ApplicationErrorReport.CrashInfo a() { if (this.e == null) { return null; } return this.e.crashInfo; }
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex)); } }
private ApplicationErrorReport getReport() { return null; }
private FeedbackOptions() { this(3,null,new ApplicationErrorReport(),true,null); }
ErrorReport(int paramInt1,int paramInt2,String paramString5,String paramString6,String paramString7,String paramString8,int paramInt3,String paramString9,String paramString10,String paramString11,String paramString12,String paramString13,String[] paramarrayofstring1,String[] paramarrayofstring2,String[] paramarrayofstring3,String paramString14,String paramString15,byte[] paramArrayOfByte,int paramInt4,int paramInt5,int paramInt6,int paramInt7,String paramString16,String paramString17,String paramString18,Bundle paramBundle1,boolean paramBoolean1,int paramInt8,int paramInt9,boolean paramBoolean2,String paramString19,String paramString20,int paramInt10,String paramString21,String paramString22,String paramString23,String paramString24,String paramString25,String paramString26,String paramString27,String paramString28,FileTeleporter[] paramArrayOfFileTeleporter,String[] paramarrayofstring4,boolean paramBoolean3,String paramString29,logoptions paramlogoptions,String paramString30,boolean paramBoolean4,Bundle paramBundle2,List<RectF> paramList) { this.versionCode = paramInt1; this.applicationErrorReport = paramApplicationErrorReport; this.description = paramString1; this.packageVersion = paramInt2; this.packageVersionName = paramString2; this.device = paramString3; this.buildId = paramString4; this.buildType = paramString5; this.model = paramString6; this.product = paramString7; this.buildFingerprint = paramString8; this.sdk_int = paramInt3; this.release = paramString9; this.incremental = paramString10; this.codename = paramString11; this.board = paramString12; this.brand = paramString13; this.runningApplications = paramarrayofstring1; this.systemLog = paramarrayofstring2; this.eventLog = paramarrayofstring3; this.anrStackTraces = paramString14; this.screenshot = paramString15; this.screenshotBytes = paramArrayOfByte; this.screenshotHeight = paramInt4; this.screenshotWidth = paramInt5; this.phoneType = paramInt6; this.networkType = paramInt7; this.networkName = paramString16; this.account = paramString17; this.localeString = paramString18; this.psdBundle = paramBundle1; this.isSilentSend = paramBoolean1; this.networkMcc = paramInt8; this.networkMnc = paramInt9; this.isCtlAllowed = paramBoolean2; this.exceptionClassName = paramString19; this.throwFileName = paramString20; this.throwLineNumber = paramInt10; this.throwClassName = paramString21; this.throwMethodName = paramString22; this.stackTrace = paramString23; this.exceptionMessage = paramString24; this.categoryTag = paramString25; this.color = paramString26; this.submittingPackageName = paramString27; this.bitmapTeleporter = paramBitmapTeleporter; this.screenshotPath = paramString28; this.fileTeleporterList = paramArrayOfFileTeleporter; this.psdFilePaths = paramarrayofstring4; this.excludePii = paramBoolean3; this.launcher = paramString29; this.themeSettings = paramThemeSettings; this.logoptions = paramlogoptions; this.suggestionSessionId = paramString30; this.suggestionShown = paramBoolean4; this.classificationSignals = paramBundle2; this.highlightBounds = paramList; }
public FeedbackOptions() { this(3,null); }
public ErrorReport(int paramInt1,Bundle paramBundle2) { this.a = paramInt1; this.b = paramApplicationErrorReport; this.c = paramString1; this.d = paramInt2; this.e = paramString2; this.f = paramString3; this.g = paramString4; this.h = paramString5; this.i = paramString6; this.j = paramString7; this.k = paramString8; this.l = paramInt3; this.m = paramString9; this.n = paramString10; this.o = paramString11; this.p = paramString12; this.q = paramString13; this.r = paramarrayofstring1; this.s = paramarrayofstring2; this.t = paramarrayofstring3; this.u = paramString14; this.v = paramString15; this.w = paramArrayOfByte; this.x = paramInt4; this.y = paramInt5; this.z = paramInt6; this.A = paramInt7; this.B = paramString16; this.C = paramString17; this.D = paramString18; this.E = paramBundle1; this.F = paramBoolean1; this.G = paramInt8; this.H = paramInt9; this.I = paramBoolean2; this.J = paramString19; this.K = paramString20; this.L = paramInt10; this.M = paramString21; this.N = paramString22; this.O = paramString23; this.P = paramString24; this.Q = paramString25; this.R = paramString26; this.S = paramString27; this.T = paramBitmapTeleporter; this.U = paramString28; this.V = paramArrayOfFileTeleporter; this.W = paramarrayofstring4; this.X = paramBoolean3; this.Y = paramString29; this.Z = paramThemeSettings; this.aa = paramlogoptions; this.ab = paramString30; this.ac = paramBoolean4; this.ad = paramBundle2; }
public evk() { this.h.crashInfo = new ApplicationErrorReport.CrashInfo(); this.h.crashInfo.throwLineNumber = -1; }
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public void reportToPlayStore(Context c) { if (currentCrashInfo == null || currentException == null) { return; } ApplicationErrorReport applicationErrorReport = new ApplicationErrorReport(); applicationErrorReport.packageName = this.context.getPackageName(); applicationErrorReport.processName = this.context.getPackageName(); applicationErrorReport.time = System.currentTimeMillis(); applicationErrorReport.systemApp = false; /////////// // CRASH // /////////// applicationErrorReport.type = ApplicationErrorReport.TYPE_CRASH; ApplicationErrorReport.CrashInfo crashInfo = new ApplicationErrorReport.CrashInfo(); crashInfo.exceptionClassName = currentException.getClass().getSimpleName(); crashInfo.exceptionMessage = currentException.getMessage(); crashInfo.stackTrace = currentCrashInfo.toString() + " - " +Utils.getStackTrace(currentException); StackTraceElement stackTraceElement = currentException.getStackTrace()[0]; crashInfo.throwClassName = stackTraceElement.getClassName(); crashInfo.throwFileName = stackTraceElement.getFileName(); crashInfo.throwMethodName = stackTraceElement.getmethodName(); crashInfo.throwLineNumber = stackTraceElement.getLineNumber(); applicationErrorReport.crashInfo = crashInfo; Intent i = new Intent(Intent.ACTION_APP_ERROR); i.putExtra(Intent.EXTRA_BUG_REPORT,applicationErrorReport); if (!(c instanceof Activity)) { i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } // Force "Send Feedback choice",but still needs user ackNowledgement i.setClassName("com.google.android.Feedback","com.google.android.Feedback.FeedbackActivity"); c.startActivity(i); currentCrashInfo = null; currentException = null; }
Angular 应用的 browser Application 和 server Application bundle
我们在使用 yarn run 启动 Angular 应用时,注意到 browser Application 和 server Application bundle 的生成:
在 Angular 应用程序中,应用程序包含两个主要的部分:客户端应用程序和服务器应用程序。客户端应用程序是在 Web 浏览器中运行的 Angular 应用程序,而服务器应用程序是在服务器端运行的 Node.js 应用程序。
为了支持这两个应用程序,Angular 应用程序包括两种类型的应用程序包:浏览器应用程序包和服务器应用程序包。
Browser Application Bundles
浏览器应用程序包是客户端应用程序的一部分,它包含了 Angular 应用程序在浏览器中运行所需的所有代码和资产。浏览器应用程序包通常包含以下内容:
- 所有的 TypeScript 和 JavaScript 代码,包括 Angular 应用程序的组件、指令、管道、服务等等。
- 所有的模板文件,这些模板文件描述了 Angular 应用程序的用户界面。
- 所有的 CSS 和样式文件,这些文件定义了 Angular 应用程序的外观和样式。
- 所有的图像、字体和其他静态文件,这些文件用于提供 Angular 应用程序所需的所有资源。
- 所有的第三方库和依赖项,这些库和依赖项是 Angular 应用程序所需的所有扩展功能的基础。
浏览器应用程序包可以通过 Angular CLI 或其他打包工具(如 webpack 或 Rollup)生成。它通常包含一个或多个 JavaScript 文件,以及一些其他的资源文件,如 HTML、CSS 和图像文件。
Server Application Bundle
服务器应用程序包是服务器端应用程序的一部分,它包含了 Angular 应用程序在服务器端运行所需的所有代码和资产。服务器应用程序包通常包含以下内容:
- 所有的 TypeScript 和 JavaScript 代码,包括 Angular 应用程序的服务器端渲染代码。
- 所有的模板文件,这些模板文件用于在服务器端生成 Angular 应用程序的初始 HTML。
- 所有的第三方库和依赖项,这些库和依赖项是 Angular 应用程序所需的所有扩展功能的基础。
服务器应用程序包可以通过 Angular CLI 或其他打包工具(如 webpack 或 Rollup)生成。它通常包含一个或多个 JavaScript 文件,以及一些其他的资源文件,如 HTML、CSS 和图像文件。
需要注意的是,服务器应用程序包通常不包含 Angular 应用程序的所有客户端资产,如组件、指令、管道、服务等等。这些资产通常会被打包到浏览器应用程序包中,因为它们只需要在浏览器中运行。
APP 链接ROS时出现pymongo.errors.ServerSelectionTimeoutError: localhost:27017 错误
ROS版本上kinetic ,APP是官网开源的make a map,当app链接ROS进行建图时,会出现报错:pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
这是由于没有安装MongoDB或者MongoDB服务没有开启,解决办法:
安装mongodb
sudo apt-get install mongodb
安装完成后,在终端输入以下命令查看MongoDB版本:
mongo -version
动和关闭mongodb命令如下:
service mongodb start service mongodb stop
默认设置MongoDB是随Ubuntu启动自动启动的。
输入以下命令查看是否启动成功:
pgrep mongo -l #注意:-l是英文字母l,不是阿拉伯数字1
卸载MongoDB
sudo apt-get --purge remove mongodb mongodb-clients mongodb-server
这样就可以了
asp.net-mvc – ErrorAttribute vs OnException与Application_Error
有3种方法(或我知道).
1) ErrorAttribute in BaseController:Controller class. Can be used on individual Action/Controller/BaseController. 2) Override OnException() in the BaseController:Controller class. Will work on Controllers derived from BaseController 3) Application_Error in Global_aspx.
最好的做法是什么
这些方法中的哪一种应用于应用范围广泛的错误处理,或者我们应该使用多个或仅一个.
如果我们在BaseController上处理ErrorAttribute Or / And OnException()的错误,那么我们仍然在Application_Error()中处理它.
我们什么时候应用Application_Error()?
解决方法
> Controller.OnException是一种方法,如果您的任何操作最终导致错误,该方法将被调用.
>上述两者都是MVC概念和MVC管道的一部分,它位于ASP.NET流水线之上,如果使用上述处理异常,它将不会传播到Application_Error,而是像http错误404,500,如果我记得正确的话.
有什么用?
肯定地看看ELMAH的应用范围的错误记录和我的blog post关于ELMAH和ASP.NET MVC
关于显示错误页面,只要使用[HandleError]和HandleErrorAttribute即可,因为它已经处理了所有内容(可选过滤和每个异常类型的可选自定义错误页面).
关于Server Error in ''/'' Application Runtime Error 错误和server error in '/' application. runtime error的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于android.app.ApplicationErrorReport的实例源码、Angular 应用的 browser Application 和 server Application bundle、APP 链接ROS时出现pymongo.errors.ServerSelectionTimeoutError: localhost:27017 错误、asp.net-mvc – ErrorAttribute vs OnException与Application_Error的相关信息,请在本站寻找。
本文标签: