找不到文件"C:\ WINDOWS \ system32 \ [英] Could not find file "C:\WINDOWS\system32\

查看:305
本文介绍了找不到文件"C:\ WINDOWS \ system32 \的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个网站已有一段时间了.用户应该能够上传XML文件.为此,我在vs2000中使用了FileUpload控件,如下所示.

Hi all,

I have a site I''ve been on for a while. Users should be able to upload XML files. To get this done, I used the FileUpload control in vs2000 like this.

<INPUT id="upload" type="file"  runat="server">


我还添加了以下代码,以在代码隐藏页面的datagrid中绑定该XML数据:


I also added this code to bind that XML data in datagrid in the code-behind page:

conDB.Open()
       Dim reportData As New DataSet()
       Private strFileName As String
       strFileName = upload.PostedFile.FileName
       'reportData.ReadXml(Server.MapPath(strFileName))
       reportData.ReadXml(strFileName)
       GridView1.DataSource = reportData
       GridView1.DataBind()
       conDB.Close()



问题是当我尝试从本地系统上载文件(KPMCLT0001_shg_memberloan_Jan12.xml)时,出现错误-

找不到文件"C:\ WINDOWS \ system32 \ KPMCLT0001_plf_memberwise_Jan12.xml".
任何想法



The problem is when I try to do the upload a file(KPMCLT0001_shg_memberloan_Jan12.xml) from my local system, It give the error -

Could not find file "C:\WINDOWS\system32\KPMCLT0001_plf_memberwise_Jan12.xml".
Any idea

推荐答案

''c:\ windows \ system32 \ inetsrv \''是默认的当前目录".在ASP.NET中运行时

如果可以提供有关引发异常时当前与每个文件位置相关的字符串的内容的更多详细信息.您需要提供服务器中确切文件位置的完整路径.
''c:\windows\system32\inetsrv\'' is the default "Current Directory" when running in ASP.NET

If you can provide more details about what every file location related string currently has in it when the exception is thrown. You need to give the full path of the exact file location in server.


这篇关于找不到文件"C:\ WINDOWS \ system32 \的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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