问题标签 [appcmd]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
4444 浏览

url-rewriting - 通过 appcmd 重写 Url

我想使用 appcmd 创建 urlrewrite url 以重定向来自的所有请求

http://

https://

我试图谷歌但没有找到。你能给我一些基本的例子吗?

0 投票
2 回答
2649 浏览

iis - 从命令行设置 UrlSegmentMaxLength

有没有办法设置使用 appcmd/netsh 或任何其他命令行实用程序的UrlSegmentMaxLength值?Http.sys

0 投票
2 回答
4150 浏览

iis - 使用 appcmd 创建网站后的未知网站

我正在使用 IIS 8.5(Windows 8.1)。我尝试使用 appcmd 工具为我的本地 IIS 创建一个网站。我使用这些页面作为参考(我知道它们适用于 IIS 7,但我找不到 IIS 8 的等价物):

http://technet.microsoft.com/en-us/library/cc772042(v=ws.10).aspx

http://technet.microsoft.com/en-us/library/cc772350(v=ws.10).aspx

这是我使用的命令:

我添加以下反馈:

在此处输入图像描述

但如果我检查我的 IIS 管理器,它会将网站显示为未知。我不能用它做任何事情(似乎没有选择网络配置)

在此处输入图像描述

我尝试通过 IIS 管理器(指向同一个文件夹)使用相同的参数创建相同的网站,并且创建的网站运行良好。

有什么我想念的吗?

谢谢

0 投票
1 回答
12361 浏览

powershell - 如何在 PowerShell 中运行 appCmd 以将自定义标头添加到默认网站

请帮助我弄清楚如何正确转义参数,以便它们在 powershell 内调用 appcmd 时起作用。

我的脚本如下所示:

在 powershell_ise 中运行时的输出是这样的:

这适用于命令行

谢谢你的帮助!

0 投票
0 回答
119 浏览

c# - some powershell commands work from C# ... others won't

I created a powershell script:

If I run this in powershell it works fine.
I tried running it from a c# web page (code below) the mkdir commands works but the appcmd does not

Anyone have any ideas?

0 投票
3 回答
4960 浏览

iis-7 - 使用 appcmd 删除使用 IIS 7 的应用程序时出错

我正在使用appcmd脚本编写我正在部署的站点。在此开始时,我试图删除一些由供应商站点自动安装的站点。它们需要被删除,因为它们被错误地设置到磁盘不存在的部分。

我正在使用的命令失败如下:

我无法弄清楚避免此错误所需的语法。

该服务器上的应用程序列表可以通过以下appcmd list apps命令查看:

0 投票
2 回答
2155 浏览

c# - 进程、appcmd 和参数格式错误。为什么?

我收到此错误: 无法处理输入:参数“C:\test.xml”必须以 / 或 - 开头(HRESULT=80070057)。

我正在尝试使用 appcmd 导出我的 IIS 网站,但我无法在 C# 中使用此命令,但如果我在 cmd.exe 中复制过去的手册,它就可以工作。“列出站点/config /xml > C:\test.xml”,我也尝试过“列出站点/config /xml > C:/test.xml”。

我做错了什么?

0 投票
1 回答
895 浏览

php - 无法更改 AppCmd 的权限/无法从 php 运行 AppCmd

我试图为 iis 创建一个小的“plesk like”面板,供我个人使用和娱乐。

但此时我被卡住了,因为 php 无权运行该appcmd.exe文件。

我想知道如何更改让 php 运行的权限appcmd.exe

如果我以我的用户身份运行appcmd,我会得到以下 信息但是当我以管理员身份运行它时,它工作正常。cmdNicolas运行 appcmd 的权限不足

现在我尝试更改文件权限并尝试添加 php 用户。

但由于某种原因,我无法更改 appCmd.exe 的权限 在此处输入图像描述

我该怎么做才能使用 php 执行 appcmd.exe?

0 投票
1 回答
89 浏览

iis-7 - 如何将目录标识符传递给 Install Shield 中的操作

我尝试将目录标识符直接添加到命令提示符操作中:

传递目录标识符

使用此命令提示符时,我的安装程序遇到错误。

0 投票
1 回答
4165 浏览

c# - appcmd.exe Cannot read configuration file due to insufficient permissions

I have followed the steps at Cannot read configuration file due to insufficient permissions

I also tried to manually set the rights to related files, but that didn't work, especially on appcmd.exe.

I am trying to update applicationHost.config to set IIS reset time dynamically, when my website loads on IIS. For this I am trying to execute the following code in global.asax file of my project:

This works perfectly when I run my website in Visual Studio, but when I deploy it on IIS, it produces the following errors:

Prevent the IIS app pools from shutting down due to being idle:

appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00 /commit:apphost

Schedule IIS app pool recycles for 8:00 AM UTC time (1:00 AM MST):

appcmd set config -section:applicationPools -applicationPoolDefaults.recycling.periodicRestart.schedule.[value='08:00:00']" /commit:apphost

Prevent IIS app pool recycles from recycling on the default schedule of 1740 minutes (29 hours):

appcmd set config -section:applicationPools -applicationPoolDefaults.recycling.periodicRestart.time:00:00:00 /commit:apphost

Then I tried to execute following code:

Then it didn't work even from Visual Studio. I then reverted back to code that was working in Visual Studio (as mentioned above). And added the following tags in Web.config (inside <system.web> tag):

But that didn't work when I ran the website on IIS (7.5). Any ideas how to make this work?