目前在消息体序列化的错误 [英] There was an error in serializing body of message

查看:265
本文介绍了目前在消息体序列化的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行我在VS2010的IDE或作为一个EXE PC上,它的工作原理。但是,当我运行通过调度另一个盒子,我得到的错误:

When I run on my PC in the VS2010 IDE or as an EXE, it works. But when I run on another box through a scheduler, I get the error:

There was an error in serializing body of message MyClassSoapIn: 'Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\xvjzdxjt.0.cs' could not be found
error CS2008: No inputs specified

难道这是一个权限问题?它使用临时文件夹。那会是一个问题?

Could this be a permissions issue? Its using the temp folder. Would that be an issue?

推荐答案

所以,你可能已经得到了类似的问题就是我有...

So, you've probably got a similar problem to the one I had...

您看到这个错误是因为VS需要在编译和/或运行的进程写入临时文件的位置信息,并VS不具备必要的权限/指定位置的权限。

The error you see is because VS needs to write info to a temporary file location during the compilation and/or run processes, and VS doesn't have the necessary rights/permissions for the specified location.

临时目录由TEMP指定的(和某个TMP)环境变量。

The temp directory is specified by the TEMP (and sometime TMP) environment variables.

WindowsKey + Pause > Advanced System Settings > Environment Variables

请注意,有2个类别的环境变量,用户和系统。

Note that there are 2 categories on environment variables, User and System.

您可能已经删除的用户变量,只留下系统变量。

You've probably deleted the USER variables, leaving only the SYSTEM variables.

什么情况是,VS查找ENV变量TEMP,无法为用户找到变量的任何值,所以使用系统变量来代替。问题是,VS没有写访问由系统临时VAR指定的位置。

What happens is that VS looks for the env variable TEMP, can't find any value for the USER variable, and so uses the SYSTEM variable instead. Problem is, VS doesn't have write access to the location specified by the SYSTEM TEMP var.

所以,修理,只需重新创建和定义用户TEMP,TMP ENV瓦尔用正确的价值%USERPROFILE%\应用程序数据\本地的\ Temp,让VS现在将找到并使用正确的位置它拥有文件的写入权限。

So, to fix, simply re-create and define the USER TEMP, TMP env vars to use the correct value of '%USERPROFILE%\AppData\Local\Temp', so that VS will now find and use the correct location where it has file write rights.

另外,你可能只是想改变位置到TEMP / TMP点到你保证权利不会为你是一个问题的地方。

Alternatively, you might just want to change the location to which TEMP/TMP points to a place where you're guaranteed that rights won't be an issue for you.

这篇关于目前在消息体序列化的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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