{"id":21062070,"url":"https://github.com/bpoe/dotnetcgi","last_synced_at":"2025-12-28T09:17:24.908Z","repository":{"id":164634252,"uuid":"640086604","full_name":"Bpoe/DotnetCGI","owner":"Bpoe","description":"How to implement CGI in .Net","archived":false,"fork":false,"pushed_at":"2023-05-24T05:15:40.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T20:28:02.438Z","etag":null,"topics":["cgi","common-gateway","http"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bpoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-13T00:39:18.000Z","updated_at":"2023-05-24T05:18:07.000Z","dependencies_parsed_at":"2024-03-22T11:49:53.256Z","dependency_job_id":null,"html_url":"https://github.com/Bpoe/DotnetCGI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpoe%2FDotnetCGI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpoe%2FDotnetCGI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpoe%2FDotnetCGI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpoe%2FDotnetCGI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bpoe","download_url":"https://codeload.github.com/Bpoe/DotnetCGI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505962,"owners_count":20301619,"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":["cgi","common-gateway","http"],"created_at":"2024-11-19T17:28:35.722Z","updated_at":"2025-12-28T09:17:24.851Z","avatar_url":"https://github.com/Bpoe.png","language":"C#","readme":"# .Net CGI\nThis code illustrates how to implement the Common Gateway Interface standard with C#. I created a simple CgiContext class that will build an\nHttpRequestMessage from the environment variables passed by the web server. You can then use that to read the input and respond appropriately.\n\nWhy? Why not? This was mostly just educational to see how CGI works as an IPC method.\n\nSample\n```dotnetcli\nusing Dotnet.Cgi;\nusing Newtonsoft.Json.Linq;\n\nvar app = new CgiApp();\n\napp.Map(HttpMethod.Get, \"/cgi/SampleCgiApp.exe/\", async (context, parameters) =\u003e\n{\n    var responseContent = new JObject\n    {\n        [\"env\"] = JObject.FromObject(Environment.GetEnvironmentVariables()),\n        [\"context\"] = JObject.FromObject(context),\n        [\"requestBody\"] = context.Request.Content?.ReadAsStringAsync().Result,\n    };\n\n    await context.Created(responseContent);\n});\n\nawait app.Execute();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpoe%2Fdotnetcgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpoe%2Fdotnetcgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpoe%2Fdotnetcgi/lists"}