作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在Windows Server 2008 R2 Web Edition上安装了WebDav,并且连接正常运行,除了当我尝试下载 protected Asp.Net文件(例如myfile.cshtml
或web.config
)时,我得到了Error downloading file! (404)
。
所有其他文件工作正常。
我想某些ISAPI会以某种方式阻止访问。我找到了这篇文章,但没有解决我的问题:http://www.webdavsystem.com/server/documentation/hosting_iis_asp_net/protected_folders
我删除了RequestFilteringModule
,每个aspnet_filter.dll
和Request Filtering
的每个条目。我可以看到App_Data
文件夹。我可以上传*.cshtml
文件并将其删除。我什至可以覆盖它们,但不能下载它们。
我想念什么?
最佳答案
这是摘录,可以完成您想要的大部分事情(允许.config,.cs等):
<?xml version="1.0"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions allowUnlisted="true">
<clear />
</fileExtensions>
<hiddenSegments>
<clear />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
<system.web>
<httpHandlers>
<remove path="*" verb="GET" />
</httpHandlers>
</system.web>
</configuration>
关于asp.net - 如何在IIS 7.x上通过WebDav编辑/下载'*.cshtml'和其他Asp.Net文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6844247/
我是一名优秀的程序员,十分优秀!