在IIS7中以编程方式为虚拟目录启用BITS上载(Enable BITS Uploads for virtual directory programmatically in IIS7)

编程入门 行业动态 更新时间:2024-10-28 08:15:44
在IIS7中以编程方式为虚拟目录启用BITS上载(Enable BITS Uploads for virtual directory programmatically in IIS7)

在IIS7中,虚拟目录的“BITS上传”功能下,有一个“允许客户端上传文件”的复选框我需要为特定的虚拟目录和“默认网站”启用此复选框

这可以在C#中完成,甚至可以在命令行中完成,这样我就可以通过脚本\ C#来运行它吗?

谢谢!

编辑:在调查applicationHost.config的更改之后,可以修改这个Xml文件但是有很多更改(包括GUID更改)但是感觉不对...我希望appcmd.exe \ c#可以为我提供一个解决这个小而重要的要求。 如果有人能为这个问题发布更好的解决方案,我会非常感谢谢谢,Lior

In IIS7 under the feature called "BITS Uploads" for virtual directories, there is a checkbox for "Allow clients to upload files" I need to enable this checkbox for specific virtual directory and also for "Default Web Site"

Can this be done in C# or even in a command line so I can run it throught script\C#?

Thanks!

Edit: After investigating the changes of applicationHost.config it is possible to modify this Xml file however with a lot of changes (including GUID changes) But it does not feel right...i hoped that appcmd.exe\c# could supply me a solution for this small but important requirment. I will be really greatfull if someone can post a better solution for this problem Thanks, Lior

最满意答案

您可以根据需要使用c#或您选择的任何语言修改ApplicationHosts.config文件: http : //learn.iis.net/page.aspx/373/editing-configuration-files/ (请注意,您很可能需要管理员帐户,如果启用了UAC)

I've figured a better way to configure IIS automatically. For IIS7 you can download an administration pack that lets you generate scripts(C#\javascript\appcmd) for IIS configuration. In IIS7.5 the administration pack is already integrated as a part of the IIS and it is called "Configuration Editor" You can find this on the following tutorial

Thanks for the help you've given me before !

更多推荐

本文发布于:2023-08-04 09:10:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1413021.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中以   虚拟目录   方式   BITS   directory

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!