错误的winform应用程序使用Web服务 - "不能执行程序..." [英] Error consuming Web Service from Winform App - "Cannot execute a program..."

查看:127
本文介绍了错误的winform应用程序使用Web服务 - "不能执行程序..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个winform应用程序调用Web服务检查更新。这在开发和它也可以在其他地方我已经尝试过了,只是没有对已安装的版本我的机器上(这恰好是在开发相同的)。

I have a winform app that calls a web service to check for updates. This works in dev and it also works everywhere else I've tried it, just not on the installed copy on my machine (which happens to be the same in dev).

该错误是:

无法执行的程序。正在执行的命令是C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \ csc.exe的/ noconfig / fullpaths @C:\ Documents和Settings \ Giovanni.DOUBLE-AFSSZ043 \本地设置的\ Temp \ squ8oock .cmdline。

Cannot execute a program. The command being executed was "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\Documents and Settings\Giovanni.DOUBLE-AFSSZ043\Local Settings\Temp\squ8oock.cmdline".

防火墙被禁用,我看的C:\ Documents和Settings \ Giovanni.DOUBLE-AFSSZ043 \本地设置的\ Temp \ squ8oock.cmdline,这是不存在的。需要注意的是,每次我尝试使用Web服务的.cmdline的文件不同的是,第二次我跑这是如dae8rgen.cmdline。不管有什么样的名字,我永远无法找到该文件。

The firewall is disabled and I've looked for "C:\Documents and Settings\Giovanni.DOUBLE-AFSSZ043\Local Settings\Temp\squ8oock.cmdline" and it is not there. Note that every time I try to use the web service the ".cmdline" file is different, for example the second time I ran it it was "dae8rgen.cmdline." No matter what name it has, I can never find the file.

有什么建议?

推荐答案

在.cmdline文件是由.NET框架生成一个自动生成的文件。应用程序正试图实时编译XML序列用于从web服务解析数据

The ".cmdline" file is an autogenerated file produced by the .NET framework. The application is attempting to real-time compile an XML Serializer used to parse the data from the web service.

您是否已经验证,你可以在命令行窗口中执行csc.exe的?即使只输入C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \ csc.exe的/应该让你的编译器选项列表(或应该给你一个错误,如果你没有权限去执行它)。

Have you verified that you can execute "csc.exe" from a command-line window? Even just typing "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /?" should get you a list of compiler options (or should give you an error if you don't have permissions to execute it).

您运行的是什么用户帐户此之下,难道一定要在windows目录下执行.exe文件的权限?同样的,我知道你说的这种情况与您的机器上已安装的版本,但有可能它的执行关闭网络共享和接收限制code访问安全权限这将prevent其运行本地可执行文件?

What user account are you running this under, and does it have permissions to execute .exe files in the windows directory? Similarly, I know you said this happens with the installed copy on your machine, but is it possible it's executing off a network share and receiving limited Code Access Security permissions which would prevent it from running local executables?

有关引用,这里是一个知识库文章显示,可以发生在ASP.NET当用户帐户没有足够的权限类似的错误。 http://support.microsoft.com/kb/315904

For reference, here is a KB article showing a similar error that can occur in ASP.NET when the user account doesn't have enough permissions. http://support.microsoft.com/kb/315904

这篇关于错误的winform应用程序使用Web服务 - "不能执行程序..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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