草庐IT

process_item

全部标签

c# - SOAP 错误 : "Server was unable to process request" "Object reference not set to an instance of an object"

当我向本地IIS中的服务发送SOAP请求时,一切正常。当我向在另一台主机上的IIS上运行的同一服务发送SOAP请求时,一切正常。但是当另一个程序员向我的服务发送SOAP请求时,他通常会得到正确的响应,除了返回服务中的一个方法:soap:ServerServerwasunabletoprocessrequest.--->Objectreferencenotsettoaninstanceofanobject.我需要了解他收到此错误的原因。他的SOAP请求与SOAP请求完全相同,但我的有效,而他的无效。 最佳答案 如果您不确切知道错

c# - 为什么即使进程确实存在,Process.WaitForExit 也会抛出 "no process"异常?

我有一个包含此代码的Windows服务:publicstaticvoidExtractTextInner(stringsource,stringdestination){ProcessStartInfostartInfo=newProcessStartInfo();startInfo.FileName=EXTRACTOR_EXE_FILEPATHstartInfo.Arguments="\""+source+"\"\""+destination+"\"";startInfo.CreateNoWindow=true;startInfo.WindowStyle=ProcessWindowS

c# - 在什么情况下 Process.Start() 方法会返回 false?

来自MSDN:Thereturnvaluetrueindicatesthatanewprocessresourcewasstarted.IftheprocessresourcespecifiedbytheFileNamememberoftheStartInfopropertyisalreadyrunningonthecomputer,noadditionalprocessresourceisstarted.Instead,therunningprocessresourceisreusedandfalseisreturned.尝试这样的事情:varinfo=newProcessStart

C# Process.MainWindowHandle 总是返回 IntPtr 零

这是我的代码:using(Processgame=Process.Start(newProcessStartInfo(){FileName="DatabaseCheck.exe",RedirectStandardOutput=true,CreateNoWindow=true,UseShellExecute=false})){lblLoad.Text="Loading";intSwitch=0;while(game.MainWindowHandle==IntPtr.Zero){Switch++;if(Switch%1000==0){lblLoad.Text+=".";if(lblLoad

c# - process.standardoutput.ReadToEnd() 总是空的?

我正在启动一个控制台应用程序,但是当我重定向标准输出时,我总是什么也得不到!当我不重定向它,并将CreateNoWindow设置为false时,我在控制台中正确地看到了所有内容,但是当我重定向它时,StandardOutput。ReadToEnd()始终返回一个空字符串。Processcproc=newProcess();cproc.StartInfo.CreateNoWindow=true;cproc.StartInfo.FileName=Dest;cproc.StartInfo.RedirectStandardOutput=true;cproc.StartInfo.WindowSt

c# - 根据 item.key 获取字典项的索引

如何根据元素键找到字典元素的索引?我正在使用以下代码来浏览字典:foreach(varentryinfreq){varword=entry.Key;varwordFreq=entry.Value;inttermIndex=??????;}有人能帮忙吗? 最佳答案 Dictionary中没有索引的概念。您不能依赖Dictionary中项目的任何顺序。OrderedDictionary可能是替代方案。varfreq=newOrderedDictionary();//...foreach(varentryinfreq){varword=e

c# - 递归 LINQ 查询 : select item and all children with subchildren

有没有什么方法可以编写一个LINQ(或过程式)查询,它可以通过一个查询选择一个项目和所有子项?我有实体:publicclassComment{publicintId{get;set;}publicintParentId{get;set;}publicintText{get;set;}}我有一个ID,所以我想选择带有ID的Comment及其所有子项和子项。示例:1-2--3-4-5--623如果ID==1那么我想要1,2,3,4,5,6的列表。 最佳答案 publicclassComment{publicintId{get;set;}

c# - LINQ to Entities 无法识别方法 'System.String get_Item (System.String)' ,

我该如何解决这个问题?这是我的代码:DateTimedtInicio=newDateTime();DateTimedtFim=newDateTime();Int32codStatus=0;if(!string.IsNullOrEmpty(collection["txtDtInicial"]))dtInicio=Convert.ToDateTime(collection["txtDtInicial"]);if(!string.IsNullOrEmpty(collection["txtDtFinal"]))dtFim=Convert.ToDateTime(collection["txtDt

c# - 当 UAC 被拒绝时,Process.Start 永远不会返回

我有一个更新程序exe,用于关闭主exe,用更新的exe替换它,然后启动更新的exe。当更新程序尝试启动更新的exe时,如果UAC权限对话框被用户拒绝,更新程序将挂起。这是因为Process.Start()函数永远不会返回。顺便说一下,我的CPU周期表显示几乎没有使用。我希望我所有的用户都对UAC说"is",但既然我在这里,我想至少用某种错误消息来处理这种情况。假设我的用户至少拥有Windows7。exe本身是32位Winforms应用程序。目标.NetFramework是4.0。使用VisualStudio2010Ultimate。关于如何检测我的用户何时拒绝UAC对话框的任何想法?

c# - C# 中的 Process 和 ProcessStartInfo 有什么区别?

Process和ProcessStartInfo有什么区别?我用过这两种方法来启动外部程序,但必须有一个原因有两种方法可以做到这一点。这里有两个例子。ProcessnotePad=newProcess();notePad.StartInfo.FileName="notepad.exe";notePad.StartInfo.Arguments="ProcessStart.cs";notePad.Start();和ProcessStartInfostartInfo=newProcessStartInfo();startInfo.FileName="notepad.exe";startInf