logger.write中的错误 [英] error in logger.write

查看:94
本文介绍了logger.write中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





无法加载文件或程序集'Microsoft.Practices.ServiceLocation,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或者它的依赖关系。系统找不到指定的文件。



此错误出现在下面的代码....





Logger.Write(caughtException.Message + Environment.NewLine +User Id:+

HttpContext.Current.User.Identity.Name + Environment .NewLine +角色名称:

+ Environment.NewLine +Type:+ caughtException.GetType()。FullName + Environment.NewLine +

Url: + Convert.ToString(Request.UrlReferrer)+ Environment.NewLine + caughtException.StackTrace);



请解决此问题...

hi

"Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

this error appear the below code....


Logger.Write(caughtException.Message + Environment.NewLine + "User Id: " +
HttpContext.Current.User.Identity.Name + Environment.NewLine + "Role Name: "
+ Environment.NewLine + "Type: " + caughtException.GetType().FullName + Environment.NewLine +
"Url: " + Convert.ToString(Request.UrlReferrer) + Environment.NewLine + caughtException.StackTrace);

pls solve this...

推荐答案

这里的解决方案

绑定失败:Th显示名称为Microsoft.Practices.ServiceLocation的程序集无法加载到ID为2的AppDomain的加载绑定上下文中[ ^ ]






您使用的是什么版本的企业库。

您可以将所有Libarary文件正确添加到参考中,并在项目的Bin文件夹中正确使用。 />


可以在Enterprise Library站点找到最新的Enterprise Library信息。



错误:说明该文件不可用,请下载此文件并添加为参考,并确保添加了正确的版本,并检查.DLL是否可用于构建应用程序后的Bin文件夹。

Hi,

What version of Enterprise Library are you using.
Dis you have all the Libarary files properly added to the Reference and properly available in Bin Folder of your project.

The latest Enterprise Library information can be found at the Enterprise Library site.

Error: States the file is not available, please download this file and add as reference and make sure the proper version is added and also check the .DLL is available in Bin folder once you Build the application.
File Details:
Namespace: Microsoft.Practices.ServiceLocation

Assembly: Microsoft.Practices.ServiceLocation (in Microsoft.Practices.ServiceLocation.dll) Version: 1.0.0.0 (1.0.0.0)





请查看此站点了解详细信息。 [ ^ ]


这篇关于logger.write中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆