asp.net - 防止将 aspnet_client 文件夹添加到 .NET 站点

标签 asp.net

是的,这里的其他问题深入探讨了原因。我知道为什么添加该文件夹了。 但我还没有看到这个问题的答案:

如何确保 aspnet_client 永远不会添加到我的 .net 站点?

最佳答案

查看关于 ASP.NET IIS Registration Tool (Aspnet_regiis.exe) 的 MSDN 文档。有一个 e 和 ea 命令行开关,您应该能够在事后使用它来清理它。

You can use Aspnet_regiis.exe to install and remove system client-side script, such as script for client-side validation. Use the -c option to install client script for the version of ASP.NET that is associated with the tool. (Script is installed in the Aspnet_client subdirectory of each IIS site directory.) To remove the client-side script for just the ASP.NET version that is associated with the tool, use the -e option. To remove the client-side script for all installed versions of ASP.NET, use the -ea option.

(强调已添加。)

不幸的是,即使 .NET 4 安装程序也会添加此目录,因此仍需要进行清理。

关于asp.net - 防止将 aspnet_client 文件夹添加到 .NET 站点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4031939/

相关文章:

c# - 当多个实例运行时,使用ASP.NET重置密码时无效的 token

javascript - 仅在 IE9 标准模式下的 asp.net javascript 内存泄漏

c# - 安全运行时引擎 VS AntiXSS 库

javascript - 将带有数据和文件的 javascript 对象发送到 asp.net core

c# - 具有嵌套区域的 ASP.NET MVC4 应用程序

c# - ASP.Net双击问题

asp.net - 将新记录添加到 GridView 但不应更新数据库

c# - 防止 ItemTemplate 中的 LinkBut​​ton 回发并使用 Evaluated val 作为参数执行 javascript 函数

css - 图像未出现在 Asp.Net Core

c# - VM 回发返回 Null 对象?