gpt4 book ai didi

asp.net - 如何在IIS 7.x上通过WebDav编辑/下载'*.cshtml'和其他Asp.Net文件

转载 作者:行者123 更新时间:2023-12-02 04:07:35 25 4
gpt4 key购买 nike

我已经在Windows Server 2008 R2 Web Edition上安装了WebDav,并且连接正常运行,除了当我尝试下载 protected Asp.Net文件(例如myfile.cshtmlweb.config)时,我得到了Error downloading file! (404)

所有其他文件工作正常。

我想某些ISAPI会以某种方式阻止访问。我找到了这篇文章,但没有解决我的问题:http://www.webdavsystem.com/server/documentation/hosting_iis_asp_net/protected_folders

我删除了RequestFilteringModule,每个aspnet_filter.dllRequest 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>

我仍在处理.cshtml位...

编辑:我已使用对我有用的东西对此进行了更新。

关于asp.net - 如何在IIS 7.x上通过WebDav编辑/下载'*.cshtml'和其他Asp.Net文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6844247/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com