asp.net web api - multiple self-hosted webapi on same server -



asp.net web api - multiple self-hosted webapi on same server -

i want host, mutiple self-hosted webapi's along web-site on same machine / windows 2k8 server. hosting website using iis. , webapi's using self-hosted webapi 2. how configure using self-hosted webapi, can work in sync on same server.

so lets host website @ http://example.com/mysite , hosting webapi @ http://example.com/apiws , http://example.com/apiui

i using windows service configuration. how web-api self hosting looks of - first webapi.

protected override void onstart(string[] args) { _config = new httpselfhostconfiguration(serviceaddress); _config.maphttpattributeroutes(); _config.routes.maphttproute("defaultapi", "apiws/{controller}/{id}", new { id = routeparameter.optional }); _server = new httpselfhostserver(_config); _server.openasync().wait(); }

the configuration same sec server well.

my question having of them working on same port, possible? there issues might arise? etc?

you confusing web-api mvc.

mvc/iis/websites needs hosting on domain on sub-domain. webapi listening request , providing info response.

asp.net-web-api self-hosting

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -