我有一台服务器,允许用户免费托管其Web应用。
在服务器中,我有4个不同的池。
2个池用于.Net Framework, 1个池用于.Net MVC, 1个池用于.Net Core 3.1
每个池有50多个应用。
为了进行安全性测试,我创建了一个程序,该程序获取文件的完整路径/位置并从IIS服务器读取该文件。如果有任何用户在我的服务器上上传了这种类型的代码,则他们可以评估任何文件。
现在,这就是我的服务器的问题。
现在,我想做的是,我的用户只能访问其应用程序资源,而不能访问其他资源。
但是,我不知道该怎么做。
答案 0 :(得分:0)
为了限制用户访问IIS中的文件,我们可以在根web.config文件中引用以下配置。
import postcss from 'postcss'
^^^^^^^
SyntaxError: Unexpected identifier
它将限制<location path="myfolder">
<system.webServer>
<security>
<authorization>
<remove users="*" roles="" verbs="" />
<!--for authentication, we should enable either windows authentication or form authentication in IIS authentication module.-->
<add accessType="Allow" roles="Administrators" />
</authorization>
</security>
</system.webServer>
</location>
下的所有内容。尤其要排除特定的文件。
Myfolder
请随时告诉我是否有什么可以帮忙的。