{"id":21347250,"url":"https://github.com/suaveio/suave.iis","last_synced_at":"2025-07-12T17:31:49.754Z","repository":{"id":86734607,"uuid":"74360292","full_name":"SuaveIO/Suave.IIS","owner":"SuaveIO","description":"Set of helper functions for smooth running Suave.io web server on Internet Information Services (IIS)","archived":false,"fork":false,"pushed_at":"2017-09-07T11:51:40.000Z","size":68,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-25T09:13:20.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuaveIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-21T12:14:13.000Z","updated_at":"2021-08-07T15:57:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ca17151-b9ab-403f-bd07-d3958a3690da","html_url":"https://github.com/SuaveIO/Suave.IIS","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/SuaveIO/Suave.IIS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuaveIO%2FSuave.IIS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuaveIO%2FSuave.IIS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuaveIO%2FSuave.IIS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuaveIO%2FSuave.IIS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuaveIO","download_url":"https://codeload.github.com/SuaveIO/Suave.IIS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuaveIO%2FSuave.IIS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265025482,"owners_count":23699756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T02:13:26.081Z","updated_at":"2025-07-12T17:31:49.467Z","avatar_url":"https://github.com/SuaveIO.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Suave IIS\n\nSet of helper functions for smooth running [Suave.io](http://suave.io) web server on Internet Information Services (IIS) without common issues like problems with routing on sub-apps, etc...\n\n\n## IIS Installation\n\n### HttpPlatformHandler vs AspNetCoreModule\n\nTo host Suave.io web application, you need to use IIS module to redirect requests from IIS to your application. There are currently two modules:\n\n* [HttpPlaformHandler](https://www.iis.net/downloads/microsoft/httpplatformhandler) - the \"official and safe\" module, however not updated for more than 2 years\n* [AspNetCoreModule](https://github.com/aspnet/AspNetCoreModule) - fork of HttpPlatformHandler, [not supported as standalone component](https://github.com/aspnet/AspNetCoreModule/issues/117#issuecomment-311983265), but under active development with new features added\n\n**Which one to use?**\n\nSince Suave.IIS v2.3.0, you can use both, so it is up to you. If you can live without new features and want to something \"100% production safe\", then go for HttpPlatformHandler. If you rather want to live on the edge, go for AspNetCoreModule. I will do my best to keep support for both of them as long as possible.\n\n## Web application installation\n\n**Please note:** Currently **only Suave 2.x.x** version is supported. If you are running on older Suave, choose [Suave.IIS v1.0.0](https://www.nuget.org/packages/Suave.IIS/1.0.0).\n\nOk, we got IIS ready, now let`s install Nuget package:\n\n    Install-Package Suave.IIS\n\nor using [Paket](http://fsprojects.github.io/Paket/getting-started.html)\n\n    nuget Suave.IIS\n\nTo start using IIS helpers in Suave, create own filter functions based on Suave.IIS.Filters \u0026 set port to configuration using `withPort` function.\n\n```fsharp\n[\u003cEntryPoint\u003e]\nlet main argv =\n\n    // use IIS related filter functions\n    let path st = Suave.IIS.Filters.path argv st\n    let pathScan format = Suave.IIS.Filters.pathScan argv format\n    let pathStarts st = Suave.IIS.Filters.pathStarts argv st\n\n    // routes\n    let webpart =\n    \tchoose [\n            pathStarts \"/st\" \u003e=\u003e OK \"Path starts with '/st'\"\n            path \"/test\" \u003e=\u003e OK \"Look ma! Routing on sub-app on localhost\"\n            path \"/\" \u003e=\u003e OK \"Hello from Suave on IIS\"\n        ]\n\n    // start service server\n    let config = { defaultConfig with bindings=[HttpBinding.create HTTP IPAddress.Any 8083us]; } |\u003e Suave.IIS.Configuration.withPort argv\n    startWebServer config webpart\n    0\n\n```\n\nThe last thing we need for proper run on IIS is `web.config`\n\n**Using HttpPlatformHandler**\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003csystem.webServer\u003e\n    \u003chandlers\u003e\n      \u003cremove name=\"httpplatformhandler\" /\u003e\n      \u003cadd name=\"httpplatformhandler\" path=\"*\" verb=\"*\" modules=\"httpPlatformHandler\" resourceType=\"Unspecified\"/\u003e\n    \u003c/handlers\u003e\n    \u003chttpPlatform\n        forwardWindowsAuthToken=\"true\"\n        stdoutLogEnabled=\"true\"\n        stdoutLogFile=\"myiiswebname.log\"\n        startupTimeLimit=\"20\"\n        processPath=\"C:\\inetpub\\wwwroot\\myiiswebname\\myiiswebname.exe\"\n        arguments=\"%HTTP_PLATFORM_PORT% \u0026quot;myiiswebname\u0026quot;\"/\u003e\n  \u003c!-- now running on http://localhost/myiiswebname --\u003e\n  \u003c/system.webServer\u003e\n\u003c/configuration\u003e\n```\n\n**Using AspNetCoreModule**\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003csystem.webServer\u003e\n    \u003chandlers\u003e\n      \u003cadd name=\"aspNetCore\" path=\"*\" verb=\"*\" modules=\"AspNetCoreModule\" resourceType=\"Unspecified\" /\u003e\n    \u003c/handlers\u003e\n    \u003caspNetCore\n\tforwardWindowsAuthToken=\"true\"\n        startupTimeLimit=\"20\"\n        stdoutLogEnabled=\"true\"\n        stdoutLogFile=\"myiiswebname.log\"\n        processPath=\"C:\\inetpub\\wwwroot\\myiiswebname\\myiiswebname.exe\"\n        arguments=\"%ASPNETCORE_PORT% \u0026quot;myiiswebname\u0026quot;\"\u003e\n\t\u003c!-- if running on http://localhost/myiiswebname --\u003e\n    \u003c/aspNetCore\u003e\n  \u003c/system.webServer\u003e\n\u003c/configuration\u003e\n```\n\n## IIS Application\n\nNow create new web application on IIS:\n\n![IIS new web app](./docs/iis_newapp.png)\n\nCopy all your build files into `C:\\inetpub\\wwwroot\\myiiswebname` and navigate to `http://localhost/myiiswebname`. You should see your web application output now.\n\n## IIS Site\n\nIf you need to run Suave application as Site (on default port 80 or any other port), just **omit second parameter** in arguments attribute of httpPlatformHandler section in `web.config` file:\n\n**Using HttpPlatformHandler**\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003csystem.webServer\u003e\n    \u003chandlers\u003e\n      \u003cremove name=\"httpplatformhandler\" /\u003e\n      \u003cadd name=\"httpplatformhandler\" path=\"*\" verb=\"*\" modules=\"httpPlatformHandler\" resourceType=\"Unspecified\"/\u003e\n    \u003c/handlers\u003e\n    \u003chttpPlatform\n        forwardWindowsAuthToken=\"true\"\n        stdoutLogEnabled=\"true\"\n        stdoutLogFile=\"myiiswebname.log\"\n        startupTimeLimit=\"20\"\n        processPath=\"C:\\inetpub\\wwwroot\\myiiswebname\\myiiswebname.exe\"\n        arguments=\"%HTTP_PLATFORM_PORT%\"/\u003e\n  \u003c!-- now running on http://localhost/ --\u003e\n  \u003c/system.webServer\u003e\n\u003c/configuration\u003e\n```\n\n**Using AspNetCoreModule**\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003csystem.webServer\u003e\n    \u003chandlers\u003e\n      \u003cadd name=\"aspNetCore\" path=\"*\" verb=\"*\" modules=\"AspNetCoreModule\" resourceType=\"Unspecified\" /\u003e\n    \u003c/handlers\u003e\n    \u003caspNetCore\n\tforwardWindowsAuthToken=\"true\"\n        startupTimeLimit=\"20\"\n        stdoutLogEnabled=\"true\"\n        stdoutLogFile=\"myiiswebname.log\"\n\t    processPath=\"C:\\inetpub\\wwwroot\\myiiswebname\\myiiswebname.exe\"\n        arguments=\"%ASPNETCORE_PORT%\"\u003e\n\t\u003c!-- now running on http://localhost/ --\u003e\n    \u003c/aspNetCore\u003e\n  \u003c/system.webServer\u003e\n\u003c/configuration\u003e\n```\n\n## Suave.IIS on .NET Core\n\nAll the previous things are exactly the same (for both IIS Site \u0026 IIS Application), but there is little change in `web.config` file.\n\nFor IIS Site:\n\n```xml\nprocessPath=\"dotnet\"\narguments=\"C:\\inetpub\\wwwroot\\myiiswebname\\myiiswebname.exe %ASPNETCORE_PORT%\"\n```\n\nor IIS Application:\n\n```xml\nprocessPath=\"dotnet\"\narguments=\"C:\\inetpub\\wwwroot\\myiiswebname\\myiiswebname.exe %ASPNETCORE_PORT% \u0026quot;myiiswebname\u0026quot;\"\n```\n\n## Good to know\n\n1. Maybe you didn\\`t notice, but using this library, you can still run Suave locally (from Visual Studio hitting F5 or FAKE script) - it there are no command line arguments, default setup is used, so you don\\`t need to change anything. Just use `withPort` and create custom filter functions based on `Suave.IIS.Configuration`.\n2. Only few (three, actually :)) filter functions are wrapped in `Suave.IIS.Filters`. If you need more of them, please feel free to send PR.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuaveio%2Fsuave.iis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuaveio%2Fsuave.iis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuaveio%2Fsuave.iis/lists"}