{"id":18339165,"url":"https://github.com/dotnet-websharper/webapi","last_synced_at":"2025-09-03T09:34:02.056Z","repository":{"id":68008633,"uuid":"13283263","full_name":"dotnet-websharper/webapi","owner":"dotnet-websharper","description":"Wrappers for hosting WebSharper sitelets and remoting components in WebAPI projects","archived":false,"fork":false,"pushed_at":"2014-02-06T19:28:10.000Z","size":192,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T05:36:12.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnet-websharper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-02T21:21:09.000Z","updated_at":"2025-02-09T09:43:51.000Z","dependencies_parsed_at":"2023-02-21T00:30:12.869Z","dependency_job_id":null,"html_url":"https://github.com/dotnet-websharper/webapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dotnet-websharper/webapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fwebapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fwebapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fwebapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fwebapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet-websharper","download_url":"https://codeload.github.com/dotnet-websharper/webapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fwebapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273423178,"owners_count":25103140,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-05T20:16:46.620Z","updated_at":"2025-09-03T09:34:02.028Z","avatar_url":"https://github.com/dotnet-websharper.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebSharper.WebApi\n\nWrappers for hosting [WebSharper][ws] sitelets and remoting components\nwith [ASP.NET Web API][webapi].  It is designed to work with\nWebSharper 2.5.\n\n* [NuGet][nuget] identifier: `WebSharper.WebApi`\n* [Git sources at GitHub][gh]\n* [Mercurial sources at Bitbucket][bb]\n* [License][license]\n* [Issue tracker][issues]\n\n## Usage\n\nHosting WebSharper code with ASP.NET Web API has the following\npurposes:\n\n1. Using WebSharper in ASP.NET MVC4 projects\n\n2. Hosting WebSharper as a part an [OWIN][owin] application, to\n   make it portable between IIS and other containers\n\n### ASP.NET MVC4\n\nFollow these steps to get started with ASP.NET MVC4 and WebSharper:\n\n1. Create an ASP.NET MVC4 project (or use an existing one).\n\n2. Using NuGet package manager, install the `WebSharper.WebApi`\n   package.  This will also install Microsoft Web API as a dependency.\n\n3. Create or use an existing WebSharper project defining a `Sitelet`\n   value.\n\n4. Configure your application to set up WebSharper.WebApi components\n   on initialization (see below).\n\n### OWIN / Standalone Use\n\nPlease see the provided example under `examples/`.\n\n## Configuration\n\nFor ASP.NET MVC4, all initialization code should be called on `Application_Start`, for\nexample by placing it in `Global.asax`:\n\n```csharp\nusing System.Web.Http;\nusing IntelliFactory.WebSharperWebApi;\n\npublic class MvcApplication : System.Web.HttpApplication\n{\n    protected void Application_Start()\n    {\n        // ...\n    }\n}\n```\n\nIn self-hosted applications, the initialization should be performed\nbefore the application starts.\n\nTo enable support for WebSharper remoting, which installs server-side\nhandlers to requests generated by calling `[\u003cRemote\u003e]`-annotated\nmethods from client-side code, do:\n\n```csharp\nRemotingHost.Register(GlobalConfiguration.Configuration);\n```\n\nTo host a sitelet, do:\n\n```csharp\nSiteletHost\n  .Configure(GlobalConfiguration.Configuration)\n  .WithDebug(true)\n  .WithServerRootDirectory(Server.MapPath(\"~\"))\n  .Register(MyNamespace.MyModule.MySitelet);\n```\n\nYou may also specify a URL prefix, for example by doing\n`.WithUrlPrefix(\"websharper\")`. The sitelet virutal path space will\nthen be found under `~/websharper`.\n\nSitelet hosting currently uses the router tables, so the order in of\nregistration matters in cases when you have non-WebSharper routers.\n\n* When registering the sitelet at root position, register other routes\n  before the sitelet registration and make them specific\n  (`mycontroller/{action}/{id}`, not `{controller}/{action}/{id}`.\n\n* When registering the sitelet with an URL prefix, register it before\n  other routes. In this case, other routes can capture arbitrary\n  patterns.\n\n[bb]: http://bitbucket.org/IntelliFactory/websharper.webapi\n[gh]: http://github.com/intellifactory/websharper.webapi\n[issues]: http://github.com/intellifactory/websharper.webapi/issues\n[katana]: https://katanaproject.codeplex.com\n[license]: http://github.com/intellifactory/websharper.webapi/blob/master/LICENSE.md\n[nuget]: http://nuget.org\n[owin]: http://owin.org\n[webapi]: http://www.asp.net/web-api\n[ws]: http://github.com/intellifactory/websharper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-websharper%2Fwebapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet-websharper%2Fwebapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-websharper%2Fwebapi/lists"}