Run go web application on IIS

后端 未结 2 1621
死守一世寂寞
死守一世寂寞 2020-12-28 23:29

Is there a way to run Go web application on IIS?
I found a setting for azure but its not working on my dev machine
this is a web config for azure :

&         


        
相关标签:
2条回答
  • 2020-12-29 00:28

    HttpPlatformHandler module doesn't work for me. I found this post by Sutean Rutjanalard on Medium very helpful, which use ASP.NET Core Module instead.

    Basically, you need to create Application pool with "No Managed Code" as you do with a .net core app. And the following is the web.config.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <system.webServer>
            <handlers>
                <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
            </handlers>
            <aspNetCore processPath=".\YourGoApp.exe" />
        </system.webServer>
    </configuration>
    
    0 讨论(0)
  • 2020-12-29 00:31

    Your local IIS does not work simply because you need to install a separate component, called HttpPlatformHandler module,

    https://azure.microsoft.com/en-us/blog/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/

    http://www.iis.net/downloads/microsoft/httpplatformhandler

    Reverse proxy or FastCGI were the older approaches which are no longer necessary with this new approach.

    0 讨论(0)
提交回复
热议问题