如何使用CreateObject(“ MSXML2.XMLHTTP”)VB.Net修复FileNotFoundException

时间:2019-02-03 16:44:58

标签: vb.net filenotfoundexception

编辑/解决方案:FileNotFoundException是由带有#号的文件名引起的

原始问题: 我在这段代码上出现错误(明确地在.send-line上),该错误是针对每个所选文件单独执行的:

            With CreateObject("MSXML2.XMLHTTP")
                .Open("GET", arrDateipfade(i), False)
                .send
                strInhalt = .responseText
            End With

错误:

System.IO.FileNotFoundException: Ressource was not found

bei Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
bei Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
bei MyProgram.frmMyProgram.btnAusfuehren_Click(Object sender, EventArgs e) in C:\Users\topie\source\repos\MyProgram\MyProgram\Form1.vb:Line 314.

如何解决?

0 个答案:

没有答案