dongzhugao9929 2010-02-16 04:52 采纳率: 0%
浏览 166
已采纳

如何使用WMI和C#以编程方式在IIS6和IIS 7中添加新的应用程序映射?

My goal is to add php Extension to IIS6 and IIS 7 via Code in C# using WMi (System.Management). I cant use DirectoryEntry.

I am stuck with adding a new ScriptMap Object to IIS 6/IIS7.

I have read some posts at here and there and heard that adding new WMi object from Scratch is difficult.

I want to enable IIS 6/IIS7 to handle php as well as aspx files and be able to process them. I have extracted php zip archive to a directory on my system (not installed it). The propblem is i am able to modify existing ScriptMap objects but i dont get to understand the add a new ScriptMap Objects.

Also i am not sure whether adding the a new extensiuon handler to ScriptMap will solve the problem or not.

Please guide.

Thanks

  • 写回答

2条回答 默认 最新

  • doubao12345 2010-02-18 04:05
    关注

    @Kev. Yes. Got it. Problem solved through Thanks Kev . :-)

    The solution was

    1. to add "*.php" extension in "Extensions" Property of ScriptMap Array and "ScriptProcessor" Property to be set to the path of the "php5isapi.dll".

    2. The second thing was to add the "Default.php" (or any other suitable default php document) to zeroth index of "DefaultDoc" Array among others like "Default.aspx, Default.htm, Default.html, Default.asp" etc.

    3. The third thing was to enable/Allow the PHP ISAPI Extension. IIsWebService.EnableExtension did the trick.

    Thanks again kev for providing me the starting point.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建