在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 !
更多推荐
发布评论