简体   繁体   中英

Wcf service workes locally, but not properly on iis7

I have a test gui(winform) which I use to test my wcf service. The service call´s another project in my solution which uses some windows api methods(user32.dll) to find word dialog boxes. It works fine when I test it locally, but when I setup my wcf service in the iis and test it with soapUI, it fails to retrieve and do the desired action on the word dialog boxes.

I suspect that because I am using a winform to test the service, so when I run the test form the solution creates instances/handlers so the windows/dialogboxes are at my disposal in the solution. Testing the service alone without creating the test winform does not make the service get the dialogboxes...

Could this be a permission issue in the iss or somewhere else? I have tried to grant the worker process admin rights, but maby I am not granting the rights in the wrong place. I need find out how the service alone can get a hold of the windows/dialogboxes with user32.dll methods?

windows 7 pro, iis7, vs2010

Any help is greatly appreciated.

Your approach is completely wrong. It works under Visual Studio because it's runing under your user account, but once deployed in IIS, it runs in the context of the App Pool account, which has limited rights and can't interact with Desktop. Even if you run the service under an Admin account, which is a big security flaw, it will only work with local windows, never with windows on remote machines. If you explain better your requirements maybe we could suggest a better approach for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM