Execute javascript on IIS server
        Posted  
        
            by James Westgate
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by James Westgate
        
        
        
        Published on 2010-04-27T08:29:29Z
        Indexed on 
            2010/04/27
            8:33 UTC
        
        
        Read the original article
        Hit count: 413
        
iis
|JavaScript
I have the following situation. A customer uses JavaScript with jQuery to create a complex website. We would like to use JavaScript and jQuery on the server (IIS) for the following reasons:
- Skills transfer - we would like to use JavaScript and jQuery on the server and not have to use eg VB Script. / classic asp. .Net framework/Java etc is ruled out because of this. 
- Improved options for search/accessibility. We would like to be able to use jQuery as a templating system, but this isn't viable for search engines and users with js turned off - unless we can selectively run this code on the server. 
There is significant investment in IIS and Windows Server, so changing that is not an option.
I know you can run jScript on IIS using windows Script host, but am unsure of the scalability and the process surrounding this. I am also unsure whether this would have access to the DOM.
Here is a diagram that hopefully explains the situation. I was wondering if anyone has done anything similar?

© Stack Overflow or respective owner