在IIS上使用WCF调用部署ASP应用程序所需的帮助 [英] Help needed with deployment of ASP app with WCF calls on IIS

查看:76
本文介绍了在IIS上使用WCF调用部署ASP应用程序所需的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

在IIS上部署ASP应用程序时遇到问题.所有未使用WCF的页面都运行良好.该站点在ASP.NET开发服务器上也运行良好.但是,当调用一个调用WCF服务的页面时,出现以下错误:

无法加载一种或多种请求的类型.检索LoaderExceptions属性以获取更多信息.堆栈跟踪:

Hello,

I have a problem when I deployed my ASP app on IIS. All pages not using WCF are running well. The site is also running well on the ASP.NET development server. But when a page is called which calls a WCF service, I got the following error:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Stack Trace:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +78
   VesselDesign.Common.TypeHelpers.TypeHelper.GetChilderen(Type aType, Boolean IncludeGenericTypes) in C:\VesselDesign\Common\VesselDesign.Helpers\TypeHelper.cs:102
   VesselDesign.Common.TypeHelpers.TypeHelper.GetChilderen(Type aType) in C:\VesselDesign\Common\VesselDesign.Helpers\TypeHelper.cs:88
   VesselDesign.BusinessLayer.Objects.BusinessObject.GetKnownTypes() in C:\VesselDesign\VesselDesign.BusinessLayer.Objects\BusinessObject.cs:530




对象的类具有KnowType属性,该属性具有GetKnownTypes方法作为参数.此方法将动态检索此类的所有后代并返回它们.它使用反射(调用System.AppDomain.CurrentDomain.GetAssemblies())来检索后代.我认为这是造成问题的原因,可能与安全性有关,但又如何呢?


谁能帮我这个忙吗?



非常感谢!!!!



Marco




The class of the object has a KnowType attribute which has the GetKnownTypes method as a parameter. This method will dynamicly retrieves all descendends of this class and returns them. It uses reflection ( with a call to System.AppDomain.CurrentDomain.GetAssemblies() ) to retrieve the descendends. I think this is causing the problem and it possibly something with security, but what???


Can anyone please help me with this?



Thanks a lot!!!!



Marco

推荐答案

这确实是Microsoft最好的错误消息之一,不是吗. :-)
我为检索LoaderExceptions属性以获取更多信息"做了一个快速的google,我建议您执行相同的操作,有相当多的人具有相同的错误消息,但是原因不同.
这些范围从发行/调试中的不同编译目标框架到缺少引用的程序集,仅需要进行简单的旧重建.

[
This really is one of Microsoft''s finest error messages isn''t it. :-)
I did a quick google for "Retrieve the LoaderExceptions property for more information", I suggest you do the same a quite a few people have the same error message, but with differing causes.
These range from different compilation target frameworks in release/debug to a referenced assembly being missing to just a plain old rebuild needed.

This[^] seemed to have quite a few answers to the various causes.

I''ll 5 your question, hopefully someone else will have a better answer.


这篇关于在IIS上使用WCF调用部署ASP应用程序所需的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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