Today we are going to see, how we can run or deploy the Go (Golang) project in IIS.
- Create your Golang project with web APIs
- Build the Go project
- Go build
- Result will be an .exe file
- Create a web.config file
- Update the following content
<?xml version="1.0" encoding="utf-8"?>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
<aspNetCore processPath=".\<<GoProject>>.exe" />
- Place the <<GoProject.exe>> and web.config in IIS server accessible folder.
- Open IIS
- Create a new website
- Enter the web app details with port different from the project internal port
- Create or choose pool with .NET CLR version as "No managed code"
- The configured website looks like below
- After starting the website, user should be able to access the APIs
Request you send your feedback and comments to firstname.lastname@example.org