简体   繁体   English

WCF未处理的异常在执行当前Web请求期间发生

[英]WCF unhandled exception occured during the excution of the current web request

I have a WCF service that is build in VS2008 When I publish the service and run it in IIS (32 bit applications are enabled in application pool) then fine, it works. 我有一个在VS2008中构建的WCF服务,当我发布该服务并在IIS中运行(在应用程序池中启用了32位应用程序)时,它可以正常工作。 But when I try debugging the application (platform targets of all the projects are Any CPU), I get the following error: 但是,当我尝试调试应用程序时(所有项目的平台目标都是Any CPU),出现以下错误:

Common Language Runtime detected an invalid program.

Description: An unhandled exception occurred during the execution of the current web     request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidProgramException: Common Language Runtime detected an invalid program.

Source Error: 
An unhandled exception was generated during the execution of the current web request.   Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 
[InvalidProgramException: Common Language Runtime detected an invalid program.]
   System.ServiceModel.HostingManager..ctor() +0
   System.ServiceModel.ServiceHostingEnvironment.EnsureInitialized() +463
   System.ServiceModel.ServiceHostingEnvironment.OnEnsureInitialized(Object state) +185
   System.ServiceModel.PartialTrustHelpers.PartialTrustInvoke(ContextCallback callback,     Object state) +314
   System.ServiceModel.ServiceHostingEnvironment.SafeEnsureInitialized() +209
   System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e)     +295
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +344
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +557

What does that error mean?? 该错误是什么意思? any help is highly appreciated 任何帮助都受到高度赞赏

The platform your have for development is 32 bit and the platform on which you deploy is 64 bit . 您要开发的平台是32位 ,部署的平台是64 bit Selecting the debug type AnyCPU assembly will JIT to 64 bit code when loaded into 64 bit process and 32 bit when loaded into a 32 bit process. 当被加载到选择所述调试型AnyCPU组件将JIT到64位代码64 bit处理和32 bit当被加载到32 bit处理。 The published assembly / dependent assembly is most probably not compatible for 64 bit and need to be in 32 bit process. 发布的程序集/从属程序集很可能与64位不兼容,并且需要采用32位处理。

You can read more about choosing the target platform and its impact over here . 您可以在此处阅读有关选择目标平台及其影响的更多信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Sitecore MVC-在执行当前Web请求期间生成了未处理的异常 - Sitecore MVC - An unhandled exception was generated during the execution of the current web request 当前Web请求“Ненайденуказанныймодуль”的执行期间发生未处理的异常 - An unhandled exception occurred during the execution of the current web request, “Не найден указанный модуль” 在执行当前Web请求asp net的过程中生成了未处理的异常 - an unhandled exception was generated during the execution of the current web request asp net 当前Web请求执行期间生成了未处理的异常 - An unhandled exception was generated during the execution of the current web request 当前Web请求执行期间发生未处理的异常 - An unhandled exception occurred during the execution of the current web request 在执行当前Web请求期间生成了未处理的异常。[HttpAntiForgeryException] - An unhandled exception was generated during the execution of the current web request.[HttpAntiForgeryException] 当前Web请求的执行期间发生未处理的异常。 型号兼容性无法检查 - An unhandled exception occurred during the execution of the current web request. Model compatibility cannot be checked 执行当前 Web 请求期间发生未处理的异常。 ASP.NET - An unhandled exception occurred during the execution of the current web request. ASP.NET 如何修复“在执行当前 Web 请求期间发生未处理的异常。” - How to fix "An unhandled exception occurred during the execution of the current web request. " 获取“在执行当前Web请求期间生成了未处理的异常。” 我的MVC UserManagementController中的错误 - Getting 'An unhandled exception was generated during the execution of the current web request.' Error in my MVC UserManagementController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM