C # ASP. NET WebService calling external EXE invalid workaround

Source: Internet
Author: User

Recently with ASP. WebService, one of the functions is to invoke the execution of external EXE (similar to the execution of CMD), but after the execution of Process.Start there is no result, the same code in WinForm Normal, toss two days finally found a solution

This article refers to the following pages, thank you very much

http://bbs.csdn.net/topics/300053869

Http://blog.163.com/[email protected]/blog/static/15737970200862331842368/

Environment: Win7 SP1 64-bit and iis,vs2010 compiled as x86 program

First to service IIS Admin Service (double-click on him) sign in to "Allow service to desktop interaction"

Then set up a Web program, set up as a "website", and build the site automatically after the corresponding application pool

Select the corresponding application pool, click Advanced Settings, modify the process model in which the "identity" is LocalSystem

Then restart the Iis,iis Admin service and so on, OK.

PS: Some of the internet has said that the IIS Admin Service is possible, there may be some situations can be, we pay attention to

PS2: "Identity" of the application pool, if LocalSystem not, then set up "Custom account", account with Administrator account (administrator)

PS3: This effect may be a little different from what the WinForm desktop program does, such as the EXE program I called, which has a command-line form that appears after the WinForm call, and the WebService call does not have a command-line form, but through the task Manager You can see that the process is running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.