点击一个按钮,Response.Redirect(...) 为什么找不到文件?? http://localhost/sigo 和 http://192.168.0.22/ sigo 可以打开我的网站http://localhost/sigo/selected.aspx?file=aa.txt上面情况下可以打开文本文件aa.txt可是换成我的局域网IP地址,本机都打不开aa.txt,浏览器说"该页无法显示..."http://192.168.0.22/sigo/selected.aspx?file=aa.txt如何设置权限?我已经把文件夹设置为共享了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 因为你的iis的ip不是你的说的另外一个IP即"我的局域网IP地址" http://localhost/sigo/files/aa.txt 可以打开http://192.168.0.22/sigo/files/aa.txt 也可以打开可是我string filepath = Server.MapPath("d://sigo//files//"+ filename);Response.Redirect(filepath); 在第一种情况可以打开,在192.168.0.22时候不行 string filepath = Server.MapPath("/sigo/files")+ filename; string filepath = Server.MapPath("/sigo/files")+ filename; 试试IIS里把IP绑定为192.168.0.22 用绝对地址引用的方法一般不推荐,string filepath = Server.MapPath("/sigo/files")+ filename; http://192.168.0.22/sigo/selected.aspx?file=aa.txt这样的方式是用aspnet用户的身份访问文件http://192.168.0.22/sigo/files/aa.txt这样的方式是用iis的那个用户访问文件你可以通过看aa.txt的安全属性看是否赋予用户相应的权限 TextBox控件输入内容时,有回车换行操作。用Literal控件显示内容时,没有换行效果了。请问如何解决? 链接数据库出错!急 请问javascript中 >>> 这个符号 相当于 asp.net 中为什么符号 短信平台互动丢包问题处理。 【急】VSS怎么创建不了一个新的数据库【在线等】 javascript跨域访问的问题 100分 求javascript操作dataset 急问? 关于转向FTP中文文件名地址的问题 405 - 不允许用于访问此页的 HTTP 谓词。 问一下消息队列能不能用于远程接发呀 连接池耗尽 pool exhausted
http://localhost/sigo/files/aa.txt 可以打开http://192.168.0.22/sigo/files/aa.txt 也可以打开
可是我
string filepath = Server.MapPath("d://sigo//files//"+ filename);Response.Redirect(filepath); 在第一种情况可以打开,在192.168.0.22时候不行
string filepath = Server.MapPath("/sigo/files")+ filename;
这样的方式是用aspnet用户的身份访问文件
http://192.168.0.22/sigo/files/aa.txt
这样的方式是用iis的那个用户访问文件
你可以通过看aa.txt的安全属性看是否赋予用户相应的权限