I am doing some work with OAuth and need to get the URL of the request. To do this I am doing the following:
operationContext.RequestContext.RequestMessage.Properties.Via
This was working great in Visual Studio Development Server because it would return
http://localhost:12345/{myrequest}
However, when pushed to IIS, and setting my project properties to use Custom Web Server with a value of this:
http://www.mydomain.com/
This is now showing a URL like the following in my RequestContext:
http://{machinename}/{myrequest}
Instead of:
http://www.mydomain.com/{myrequest}
Is this an IIS setting? To get around this, I 开发者_如何学Goam forced to modify the URI instance to swap out the machine name with the domain name. This is non-ideal.
Anything I am missing here?
精彩评论