开发者

RequestContext Via Property has Machine Name instead of URL in IIS

开发者 https://www.devze.com 2023-02-25 15:41 出处:网络
I am doing some work with OAuth and need to get the URL of the request. To do this I am doing the following:

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消