Reputation: 157
I'm trying to setup a ServiceStack template loosely based on the existing ASP.NET with razor template. The services to be created using this will be hosted in a variety of locations. What I would like is for them to be able to register themselves with a central server.
What I was hoping to do was to add some code to Application_start (or apphost) which would perform the registration however I can't find any way of getting the root url of the application. The normal method of using the request object doesn't work as there isn't a request object at that point.
If I can't get this from asp.net I'm wondering if there is a servicestack call I can make which can give me what I need
Upvotes: 1
Views: 92
Reputation: 143319
The URL for where an ASP.NET Web Application is hosted at is only available at runtime, inferred from the incoming are Request URL, so you won't be able retrieve it at Startup.
Upvotes: 1