草庐IT

global-assembly-cache

全部标签

c# - global.asax 中的 Application_Error 未捕获 WebAPI 中的错误

对于我正在从事的项目,我们正在实现的其中一件事是我们在我的团队中的一些较旧的ASP.NET和MVC项目中拥有代码-Application_Error异常捕获器向开发团队发送一封电子邮件,其中包含异常体验和最相关的详细信息。这是它的样子:Global.asax:protectedvoidApplication_Error(objectsender,EventArgse){Exceptionex=Server.GetLastError();stringpath="N/A";if(senderisHttpApplication)path=((HttpApplication)sender).R

c# - 单声道 : Could not load file or assembly 'System.Web.Entity' or one of its dependencies 上的 MVC 5

目标:通过XamarainStudio在Mono上启动ASP.NETMVC5项目。启动服务器后出错:无法加载文件或程序集“System.Web.Entity”或其依赖项之一。XamarinStudio中的错误:背景:该项目是在VisualStudio2013中作为默认Web项目创建的。大多数配置都是开箱即用的。它的代码可以是viewedhereonGitHub.在撰写本文时,我拥有最新最好的Mono和XamarinStudio。.NETEntityFramework是一个已解决的依赖项,在XamarinStudio中没有注意到构建问题。如何启动并运行该项目?我该如何解决这种依赖关系?

c# - 单声道 : Could not load file or assembly 'System.Web.Entity' or one of its dependencies 上的 MVC 5

目标:通过XamarainStudio在Mono上启动ASP.NETMVC5项目。启动服务器后出错:无法加载文件或程序集“System.Web.Entity”或其依赖项之一。XamarinStudio中的错误:背景:该项目是在VisualStudio2013中作为默认Web项目创建的。大多数配置都是开箱即用的。它的代码可以是viewedhereonGitHub.在撰写本文时,我拥有最新最好的Mono和XamarinStudio。.NETEntityFramework是一个已解决的依赖项,在XamarinStudio中没有注意到构建问题。如何启动并运行该项目?我该如何解决这种依赖关系?

c# - MVC4 中 Global.asax.cs 页面中的问题

我的ASP.NETMVC4项目,我的Global.asax.cs页面显示错误WebApiConfig.Register(GlobalConfiguration.Configuration);Thename'GlobalConfiguration'doesnotexistinthecurrentcontext我已经做了很多Controller和View以及所有...我怎样才能解决这个问题并恢复我的项目?这是我的上下文代码的其余部分usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usi

c# - MVC4 中 Global.asax.cs 页面中的问题

我的ASP.NETMVC4项目,我的Global.asax.cs页面显示错误WebApiConfig.Register(GlobalConfiguration.Configuration);Thename'GlobalConfiguration'doesnotexistinthecurrentcontext我已经做了很多Controller和View以及所有...我怎样才能解决这个问题并恢复我的项目?这是我的上下文代码的其余部分usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usi

.net - 什么是 ResolveAssemblyReference.cache?

ResolveAssemblyReference.cache文件的用途是什么,是否需要checkin? 最佳答案 它是由ResolveAssemblyReference构建目标生成的文件。MSDN对此有如下说法:VisualStudioattemptstoexecutetargetswithcertainnameswhenitloadsaproject.ThesetargetsincludeCompile,ResolveAssemblyReferences,ResolveCOMReferences,GetFrameworkPaths

.net - 什么是 ResolveAssemblyReference.cache?

ResolveAssemblyReference.cache文件的用途是什么,是否需要checkin? 最佳答案 它是由ResolveAssemblyReference构建目标生成的文件。MSDN对此有如下说法:VisualStudioattemptstoexecutetargetswithcertainnameswhenitloadsaproject.ThesetargetsincludeCompile,ResolveAssemblyReferences,ResolveCOMReferences,GetFrameworkPaths

c# - 我如何解决 "Please make sure that the file is accessible and that it is a valid assembly or COM component"?

我正在使用C#中的OpenCV构建一个项目。它需要一个名为cvextern.dll的dll文件。但是,当添加此文件作为引用时,会出现此消息:-无法添加引用“cvextern.dll”,请确保该文件可访问并且它是有效的程序集或COM组件。我搜索累了,过去两天我一直在寻找该问题的解决方案 最佳答案 该文件是nativeDLL,这意味着您无法通过添加引用将其添加到.NET项目中...您可以通过DllImport使用它(参见http://msdn.microsoft.com/en-us/library/system.runtime.inte

c# - 我如何解决 "Please make sure that the file is accessible and that it is a valid assembly or COM component"?

我正在使用C#中的OpenCV构建一个项目。它需要一个名为cvextern.dll的dll文件。但是,当添加此文件作为引用时,会出现此消息:-无法添加引用“cvextern.dll”,请确保该文件可访问并且它是有效的程序集或COM组件。我搜索累了,过去两天我一直在寻找该问题的解决方案 最佳答案 该文件是nativeDLL,这意味着您无法通过添加引用将其添加到.NET项目中...您可以通过DllImport使用它(参见http://msdn.microsoft.com/en-us/library/system.runtime.inte

c# - 如何在 Global.aspx 的 Application_Start 中获取完整的主机名+端口号?

我试过了Uriuri=HttpContext.Current.Request.Url;Stringhost=uri.Scheme+Uri.SchemeDelimiter+uri.Host+":"+uri.Port;它在我的本地机器上运行良好,但是当发布到IIS7时,有一个异常说System.Web.HttpException:Requestisnotavailableinthiscontext有人知道如何实现吗? 最佳答案 当您的Web应用程序启动时,没有正在处理的HTTP请求。您可能想要处理定义Application_BeginR