我想在远程连接上检索文件夹名称。我的代码在本地运行时正确运行,但是当我尝试从远程连接中检索时,它失败了,并显示以下错误
“ /”应用程序中的服务器错误。
用户名或密码不正确。
我的代码
<td style="width: 257px; height: 100px; background-color: whitesmoke; border: solid 2px lightgrey; vertical-align: top;">
<div class="left-pane-scrollable">
<%
foreach (var dir in new DirectoryInfo("//192.168.8.8/c$/inetpub/wwwroot/CrystalReportFiles/").GetDirectories())
{ %>
<%
string[] mergeFolderName = dir.Name.Split(' ');
var folderNameWithIPHANmark = "";
for (var i = 0; i < mergeFolderName.Length; i++)
{
if (i > 0)
{
folderNameWithIPHANmark = folderNameWithIPHANmark + "-" + mergeFolderName[i];
}
else
{
folderNameWithIPHANmark = mergeFolderName[i];
}
}
%>
</div>
</td>