简体   繁体   中英

Javascript does not work on IIS

I have a .NET library executing as part of our website that renders HTML to image formats. It uses the IE rendering engine, and will happily run any javascript if present to do the rendering.

To clarify. The code is rendering the HTML onto the server. No client is involved.

The problem is we just moved the code to a new server, and javascript seems to be disabled.

I tried changing (briefly the Application Pools Process Model Identity from NetworkService to LocalSystem, and that worked fine.

Hence it must be a permissions problem.

Another clarification: Everything works fine ALWAYS except for the javascript. In otherwords as long as no JS is in the HTML, we can pass the URL to the IE rendering engine and get back a bitmap. If JS is in the HTML the HTML is rendered as if JS was disabled UNLESS we are the pool identity = LocalSystem.)

So my questions are this:

1) What is the specific permission I need to set to allow the IE rendering engine to execute javascript, inside the IIS application pool?

2) What is the best way to enable that in my application pool? Do I just somehow set it in NetworkService, or create a new identify (how is that done?)

Thanks!

I guess "uses the IE rendering engine" refers to "C:\\Program Files\\Internet Explorer\\iexplorer.exe", therefore the application pool identity need to have execute access on this path.

If you want to grant rights for this, don't allow Network Service to do this. Create a specific identity (new local user for example) and give it access to run IIS Worker Process (IIS_WPG group on IIS 6).

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