简体   繁体   English

如何从Azure Web App读写文件到本地NAS?

[英]How to Read and Write files from Azure Web App to an on premise NAS?

I have a web app (.NET MVC) running on an Azure App Service. 我在Azure应用服务上运行了一个Web应用(.NET MVC)。 This application creates some PDF files and i want to store them in an on-premise NAS in my organization that requires credentials to access it. 此应用程序创建了一些PDF文件,我想将它们存储在组织中需要凭据才能访问的本地NAS中。

  1. How is this possible? 这怎么可能?
  2. Is it secure? 安全吗?
  3. What is the best practice? 最佳做法是什么?

Yes, it's possible. 是的,有可能。 To realize it as the figure below shown, the two requirements are as below. 为了实现它,如下图所示,两个要求如下。

在此处输入图片说明

  1. There is an on-premise server can mount your on-premise NAS Filesystem for reading and writing files. 有一个本地服务器可以挂载本地NAS文件系统以读取和写入文件。
  2. On Azure, you need to create a VPN gateway to build a Site-to-Site VPN connection for helping your Azure WebApp to request your on-premise server to relay the file operations. 在Azure上,您需要创建一个VPN网关来建立站点到站点VPN连接,以帮助您的Azure WebApp请求本地服务器中继文件操作。

For more details about Azure VPN Gateway, please refer to the offical tutorial Create a Site-to-Site connection in the Azure portal to know how to get started. 有关Azure VPN网关的更多详细信息,请参考官方教程Create a Site-to-Site connection in the Azure portal以了解如何入门。

And yes, it's secure. 是的,它是安全的。 I think it's a general solution. 我认为这是一个普遍的解决方案。

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM