asp.net – mod_mono asp MVC4错误:System.Security.SecurityEx
我在ASP.net MVC4中开发了一个小型webapp,框架版本为4.5.在使用Visual Studio 2015进行调试时,这一切都像是一个魅力.但是我没有
Windows服务器,而是
Linux(Ubuntu 14.04 VPS),我希望在那里部署.
我有最新的mono和mod_mono与apache2一起运行.它似乎应该执行,但我得到一些错误. 我通过添加< customError mode =“off”>解决了第一个问题.也看到错误,然后添加单声道/寄存器文件夹. 但我现在被这个错误困扰了: System.Security.SecurityException Couldn't impersonate token. Description: HTTP 500.Error processing request. Details: Non-web exception. Exception origin (name of application or object): mscorlib. Exception stack trace: at System.Security.Principal.WindowsImpersonationContext..ctor (IntPtr token) <0x41ef9dd0 + 0x0006f> in <filename unknown>:0 at System.Security.Principal.WindowsIdentity.Impersonate (IntPtr userToken) <0x41ef9d50 + 0x0003c> in <filename unknown>:0 at System.CodeDom.Compiler.Executor.ExecWaitWithCapture (IntPtr userToken,System.String cmd,System.String currentDir,System.CodeDom.Compiler.TempFileCollection tempFiles,System.String& outputName,System.String& errorName) <0x41ef9c90 + 0x00038> in <filename unknown>:0 at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile (System.CodeDom.Compiler.CompilerParameters options,System.String compilerFullPath,System.String arguments,System.String& outputFile,System.Int32& nativeReturnValue) <0x41ef9a10 + 0x0010b> in <filename unknown>:0 at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch (System.CodeDom.Compiler.CompilerParameters options,System.String[] fileNames) <0x41ef5c40 + 0x005fb> in <filename unknown>:0 at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options,System.String[] fileNames) <0x41ef5aa0 + 0x000c7> in <filename unknown>:0 at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options,System.String[] fileNames) <0x41ef58f0 + 0x0004d> in <filename unknown>:0 at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath,System.CodeDom.Compiler.CompilerParameters options) <0x41ee0a70 + 0x00991> in <filename unknown>:0 at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) <0x41ee0a30 + 0x00023> in <filename unknown>:0 at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder,System.Web.Compilation.BuildProviderGroup group,System.Web.VirtualPath vp,Boolean debug) <0x41ed6b10 + 0x009b7> in <filename unknown>:0 at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp,Boolean debug) <0x41eac440 + 0x00523> in <filename unknown>:0 at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) <0x41eabbc0 + 0x0011b> in <filename unknown>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) <0x41eaaa70 + 0x00093> in <filename unknown>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) <0x41eaa690 + 0x00017> in <filename unknown>:0 at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) <0x41e9c4a0 + 0x0041b> in <filename unknown>:0 我无法修复该错误.我尝试了以下步骤: >将项目发布到本地文件夹并将其复制到我的Linux 这都给出了相同的运行时错误. 我使用Travis CI来检查我的代码并通过了以下配置: language: CSharp solution: BannedFromHighsec.sln script: - nuget restore BannedFromHighsec.sln - xbuild /p:Configuration=Release /target:BannedFromHighsec BannedFromHighsec.sln /p:TargetFrameworkVersion="v4.5" /p:DebugSymbols=False Travis CI日志的粘贴素:http://pastebin.com/5s6p97i3 所以我有点想到这是我的代码有问题.但我不确定它是什么,因为它是一个简单的应用程序.使用SQlite进行基本的CRUD操作,并从API和第二个数据库中提取数据.我没有使用登录或任何东西. 我希望有人可以帮助我,我开始掌握asp.net MVC,并且想知道如果可能的话,如何在linux上部署它. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net – 自定义编辑删除选择GridView中的链接
- asp.net – Response.Redirect()不起作用
- asp.net-mvc – 为什么我的视图模型中的内部成员无法在视图
- asp.net-mvc – ASP.NET MVC – 与使用模型注释相比,使用自
- asp.net – 根据网页中的隐藏字段编辑数据库记录有哪些安全
- asp.net-mvc-2 – 实体框架4 CTP 4/CTP 5通用存储库模式和单
- Asp.net mvc3剃刀具有多个提交按钮
- 如何将asp.net的后台cs代码移动到页面上
- asp.net-mvc – 授权查看或配置视图为授权?
- asp.net-mvc-5 – ASP.net身份禁用用户
- Asp.net对Php性能
- asp.net-mvc – 使用cookie在ASP MVC中存储会话
- asp.net-mvc – 朋友列表与chatjs.net SignalR M
- asp.net-mvc – 跟踪登录用户
- asp.net-mvc – ServiceStack.Factor模块列表中有
- asp.net – System.Web.Security.MembershipProv
- asp.net-mvc – CKEditor和ASP.Net MVC 3 Requir
- asp.net-core – 使用ASP.NET Core从`project.js
- 将下拉列表绑定到详细信息视图的下载列表ASP.NET
- .NET 下基于动态代理的 AOP 框架实现揭秘