‘=’ is an unexpected token. The expected token is ‘;’. web platform installer

‘=’ is an unexpected token. The expected token is ‘;’. web platform installer

Microsoft has provided many good tools which are very handy while setting up any server. Web Platform installer can be used to enable many ad-on features on IIS web server. URL rewrite feature can give you a liberty to rewrite and redirect any URL. While installation, it can create problems like stated in the title of this post. ‘=’ is an unexpected token. The expected token is ‘;’. This seems some error with the programming but its not. This can happen while installing any module using web platform installer. Web platform installer itself installed without any problem.

The problem can occur while installing any module like URL rewrite. Before providing the solution I would like to share my environment. I was trying to install web platform installer on windows 2016 server which comes with IIS10. The web platform installer was installed without any issue. I downloaded the URL rewrite 2.1 and tried to install it. ‘=’ is an unexpected token. The expected token is ‘;’ was error while installation of URL rewrite module.

Solution!

The solution of this problem is quite simple and easy to follow. URL rewrite and other modules are version specific. Microsoft has released different versions for IIS10 and IIS8.5.

Microsoft URL Rewrite Module 2.0 for IIS (x64)

URL Rewrite Module 2.0 provides a rule-based rewriting mechanism for changing requested URL’s before they get processed by web server and for modifying response content before it gets served to HTTP clients.

https://www.microsoft.com/en-us/download/confirmation.aspx?id=47337

IIS URL Rewrite Module 2 is an incremental release that includes all the features from version 1.1, and adds support for outbound response rewriting. More specifically, it can be used to:

  • Implement complex URL rewriting logic by using custom rewrite providers written in .NET.
  • Replace the URLs generated by a web application in the response HTML with a more user friendly and search engine friendly equivalent .
  • Fix up the content of any HTTP response by using regular expression pattern matching.
  • Modify HTTP request headers and IIS server variables.
  • Modify HTTP response headers