IIS 7.5的w3wp.exe运行另一个程序 [英] IIS 7.5 w3wp.exe to run another process

查看:301
本文介绍了IIS 7.5的w3wp.exe运行另一个程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在IIS上运行ASP.NET MVC3应用程序。其中一个控制器行动启动进程CMD / C混帐克隆了一些回购。

I have ASP.NET MVC3 application that runs on IIS. One of controllers actions starting the process "cmd /C git clone some-repo".

我需要确保子进程已经让Git是安装在用户下运行。我使用的应用程序池身份==我的户头(管理+ Git是作品)。

I need to make sure that child process running under the user that already have git being setup. I use application pool with Identity == My Accout (admin + git is works).

该进程启动OK,但是挂断。我想是因为错误的身份是它运行它。

The processes starting up ok, but it hangs up. I think that because of wrong identity which runs it.

有没有人有以经验与IIS下启动的进程,你见过类似的东西?什么是调试这些问题的方法是什么?

Does anyone have experiece with starting up processes under IIS, have you seen something similar? What is the way to debug such issues?

推荐答案

我觉得你的<一个href="http://stackoverflow.com/questions/7538434/iis7-5-application-pool-process-identity-and-environment">other问题的解决方案适用于这一点。

I think that your other question's solution works for this too.

在设置模拟到我的用户名像这样

After setting impersonation to my username like this

<identity impersonate="true" password="o1j2813n" userName="obrad" />

我试图运行从System.Diagnostics.Process.Start处理从MVC的行动,他们在我的Windows任务管理器的用户名出现,所以我认为<一href="http://stackoverflow.com/questions/7538434/iis7-5-application-pool-process-identity-and-environment/7538890#7538890">this答案将是有益的。

修改

问题的另一部分 - Git的工作不被错误的方式造成给git的命令。我已经做了一些实验,找到了一种方法如何克隆从控制器操作的混帐回购协议:

The other part of problem - git not working is caused by wrong way to give git command. I have made some experiments and found a way how to clone a git repo from controller action:

System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Git\bin\git.exe", "clone git://github.com/goranobradovic/go.DB.JournalingBase.git " + @"C:\Users\obrad\Desktop\temp");

该命令从克隆混帐回购协议://github.com/goranobradovic /go.DB.JournalingBase.git 来临时文件夹我的桌面上。

This command clones repo from git://github.com/goranobradovic/go.DB.JournalingBase.git to temp folder on my desktop.

这篇关于IIS 7.5的w3wp.exe运行另一个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆