asp.net-mvc-4 – 访问路径“/ etc/mono/registry”被拒绝
发布时间:2020-05-27 19:04:48 所属栏目:asp.Net 来源:互联网
导读:当我运行我的ASP.NET MVC 4网站在我的Fedora 20工作站与xsp4(从MonoDevelop或直接)我得到以下异常: System.Web.HttpRuntime.FinishWithException (wr={Mono.WebServer.XSPWorkerRequest}, e={System.Web.HttpException: --- System.Web.HttpE
|
当我运行我的ASP.NET MVC 4网站在我的Fedora 20工作站与xsp4(从MonoDevelop或直接)我得到以下异常: System.Web.HttpRuntime.FinishWithException (wr={Mono.WebServer.XSPWorkerRequest},e={System.Web.HttpException: ---> System.Web.HttpException: The pre-application start initialization method Start on type System.Web.WebPages.PreApplicationStartCode threw an exception with the following error message: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for <Module> ---> System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/etc/mono/registry" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00064] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:113
at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:80
at System.IO.DirectoryInfo.Create () [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/DirectoryInfo.cs:141
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00039] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:98
at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:80
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey,System.String basedir,Boolean is_volatile) [0x0004a] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:136
--- End of inner exception stack trace ---
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey,Boolean is_volatile) [0x00057] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:138
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey,System.String basedir) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:116
at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey,Boolean createNonExisting) [0x000cc] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:412
at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey,System.String keyname,Boolean writable) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:836
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name,Boolean writable) [0x0001e] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:278
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:262
at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
at Microsoft.Web.Infrastructure.RegistryKeyWrapper.OpenSubKey (System.String name) [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.KillBitHelper.GetKillBittedVersions () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.KillBitHelper.IsThisAssemblyKillBitted () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.KillBitHelper.ThrowIfKillBitIsSet () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.ModuleInitializer+CriticalInitializer.CheckKillBit () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.ModuleInitializer+CriticalInitializer.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.ModuleInitializer.Initialize () [0x00000] in <filename unknown>:0
at <Module>..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Web.WebPages.PreApplicationStartCode.Start () [0x0002b] in /builddir/build/BUILD/mono-3.4.0/external/aspnetwebstack/src/System.Web.WebPages/PreApplicationStartCode.cs:40
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj,BindingFlags invokeAttr,System.Reflection.Binder binder,System.Object[] parameters,System.Globalization.CultureInfo culture) [0x00054] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj,System.Globalization.CultureInfo culture) [0x00069] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:238
at System.Reflection.MethodBase.Invoke (System.Object obj,System.Object[] parameters) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x0004f] in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:561
--- End of inner exception stack trace ---
at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x0007e] in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:564
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00059] in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs:408
--- End of inner exception stack trace ---}) in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web/HttpRuntime.cs:674
我检查了它,在/ etc / mono /中没有注册表文件或文件夹。我也找不到它在任何子文件夹,我怎么能解决这个问题? 我使用最新的3.15.6内核运行Fedora 20 $ mono --version
Mono JIT compiler version 3.4.0 (tarball Fri Jun 27 17:26:36 UTC 2014)
Copyright (C) 2002-2014 Novell,Inc,Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported,not enabled.
GC: sgen
$ xsp4 --version
xsp4.exe 3.0.0.0
Copyright (C) 2002-2011 Novell,Inc.
Minimalistic web server for testing System.Web
我有另一个设置在Ubuntu 14.04 LTS和一个工作,所以它可能是单声道版本的东西,或者我可能缺少一些库? 解决方法结果只是创建文件夹使用mkdir
sudo mkdir / etc / mono / registry 并使用 sudo chmod uog rw / etc / mono / registry 做的伎俩。 但是我还是不明白这样的文件夹在Ubuntu中是什么,为什么不需要在那里创建,以及为什么它不是在安装过程中自动创建。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在ASP.NET MVC Web API服务和MVC客户端体系结构中实现身份验
- asp.net – IE在IIS7中打开脚本,打开静态压缩
- asp.net – 在将其上传到服务器之前,在客户端进行跨浏览器检
- asp.net-mvc-3 – Editor用于收集我的模型中的项目
- ASP.NET MVC 4软件包在mono v3下不工作
- asp.net-mvc – 通过NuGet升级到Microsoft.AspNet.Mvc 5.0.
- asp.net-mvc – 具有Fluent nHibernate和Ninject的多租户.每
- asp.net – 忽略在IIS中为代码400(错误请求)配置的自定义错
- 详解Asp.net Core 使用Redis存储Session
- 使用Asp.Net进行异步编程的最佳方法
推荐文章
站长推荐
- 如何在ASP.NET中自定义发布?
- asp.net-mvc – 使用jQuery ASP.NET MVC自动保存
- ASP.NET(AJAX+JSON)实现对象调用
- asp.net – 在jQuery中捕获异常
- asp.net – Combres的路线(combres.axd)不起作用
- asp.net-web-api – 使用swashbuckle api文档的h
- asp.net-mvc-2 – ASP.NET MVC数据注释客户端验证
- asp.net-mvc – Json返回时如何读取modelstate错
- asp.net – 哪个控件导致回发?
- asp.net – Microsoft重写模块 – 强制www url或
热点阅读
