今天在项目ASP.NET调用远程服务器Webservice,出现如下错误:
Server was unable to process request. ---> Access to the temp directory is denied. Identity 'NT AUTHORITY/NETWORK SERVICE' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account the process is using to do the compilation,so if the user doesnt have access to system temp directory,you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location.
用有道翻译结果如下:
服务器是无法处理的请求。——>访问临时目录被否定了。身份的新台币权威/网络服务的XmlSerializer下运转没有足够的权限存取临 时目录。CodeDom将使用用户帐号的过程是用做编写的,因此,如果用户不存取系统临时目录,您将无法编译。使用 Path.GetTempPath()API来找出临时目录地点。
解决方法:
进入远程服务器,设置目录权限,设置的目录如下:
C:/WINDOWS/Temp
设置用户NETWORK SERVICE的读取与运行的权限,如果不行就给所有权限。这样就可以了。
如果再不行就设置everyone的权限,就可以了。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。