[英]Create directory (on network driver) throw an error wile runing on IIS
I am using asp.net mvc 5 with c#. 我正在使用带有c#的asp.net mvc 5。 The app needs to create a folder in the server when certain action occur.
当某些操作发生时,应用程序需要在服务器中创建一个文件夹。
The folder has to be created in one network drive. 必须在一个网络驱动器中创建该文件夹。 All this works properly when the app is running in visual studio, however, doesn't work on IIS.
当应用程序在visual studio中运行时,所有这些都能正常工作,但是在IIS上不起作用。
My guess is that the IIS does not have enough permissions, so i try to change the app pool identity, but the result wat the same. 我的猜测是IIS没有足够的权限,所以我尝试更改应用程序池标识,但结果是相同的。
One thing that could not help is that the network drive was created in the software in the server (QNAP server), not in windows. 有一点无法帮助的是网络驱动器是在服务器(QNAP服务器)中的软件中创建的,而不是在Windows中创建的。
How can i make IIS behave like visual studio ? 我怎样才能使IIS像visual studio一样?
How about you create a virtual directory that maps to the nas share folder. 如何创建映射到nas共享文件夹的虚拟目录。 Here are a few steps.
这是几个步骤。
Now from your code you access virtual directory. 现在从您的代码中访问虚拟目录。
Hope that helps. 希望有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.