Hi folks,
Today we are going to see, how we can run or deploy the Go (Golang) project in IIS.
Development
- 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"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\<<GoProject>>.exe" />
</system.webServer>
</configuration>
Deployment
- 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 psrdotcom@gmail.com




