响应.重定向到UNC路径 [英] Response.Redirect to a UNC path
本文介绍了响应.重定向到UNC路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用UNC路径将用户重定向到文件服务器上的目录.我曾尝试使用类似以下的内容,但是却收到404错误.
I'd like to redirect the user to a directory on a file server using its UNC path. I've tried using something like the following but I just get a 404 error.
Response.Redirect(@"file:\\fileserver\data\");
使此工作正确的语法是什么?
What's the correct syntax to make this work?
推荐答案
文件协议标识符不正确.试试:
You don't quite have the file protocol identifier correct. Try:
string location = String.Format("file:///{0}", @"\\fileserver\data\");
Response.Redirect(location, true);
这篇关于响应.重定向到UNC路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文