如何从Azure Webjob访问UNC路径

时间:2018-11-28 15:30:22

标签: c# azure azure-webjobs

我正在尝试从用C#编写的Azure Web作业访问另一台服务器(我的凭据)的共享路径,我可以通过本地计算机进行连接,但是在Azure中,我遇到拒绝访问错误。

 WebClient request = new WebClient();
                string url = "ftp://smuc4ftp/WELLS/test/" + "test.txt";
                request.Credentials = new NetworkCredential("username", "password");
                Console.WriteLine("Reading File");
                byte[] newFileData = request.DownloadData(url);
                string fileString = System.Text.Encoding.UTF8.GetString(newFileData);
                Console.WriteLine(fileString);

能否请您帮助我在Azure中缺少哪些设置以便基于凭据连接到服务器?

0 个答案:

没有答案