Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# HTML下载链接不会从VisualStudio19中的服务器下载文件_C#_Html_Asp.net_Razor_Visual Studio 2019 - Fatal编程技术网

C# HTML下载链接不会从VisualStudio19中的服务器下载文件

C# HTML下载链接不会从VisualStudio19中的服务器下载文件,c#,html,asp.net,razor,visual-studio-2019,C#,Html,Asp.net,Razor,Visual Studio 2019,我在vs2019中的cshtml代码有问题。我需要能够从服务器获取一个文件,并能够通过HMTL5的下载链接下载它。如果我在vs2019之外使用代码,它可以工作,但在vs2019之内它不工作;有什么想法吗?我已经检查了特权,这似乎是个问题 这是我的控制器中的cshtml视图代码 @{ ViewData["Title"] = "Index"; } <h2>Index</h2> <h1> <a href="\\someserv

我在vs2019中的cshtml代码有问题。我需要能够从服务器获取一个文件,并能够通过HMTL5的下载链接下载它。如果我在vs2019之外使用代码,它可以工作,但在vs2019之内它不工作;有什么想法吗?我已经检查了特权,这似乎是个问题

这是我的控制器中的cshtml视图代码

@{
     ViewData["Title"] = "Index";
}

 <h2>Index</h2>
 <h1>
   <a 
     href="\\someserver\somefolder\anotherfolder\yetanotherfolder\test.txt" 
    download> 
     Test </a>
 </h1>
@{
ViewData[“标题”]=“索引”;
}
指数

请提供一些代码,以便我们可以帮助您。请参见添加视图代码。