开发者

DotNetOpenAuth - A property with the name 'OriginalHttpRequestUri' is not present Exception

开发者 https://www.devze.com 2023-02-21 16:08 出处:网络
I am attempting to implement the example from the DotNetOpenAuth Service Provider solution but instead of using OpenId for authentication, I am using Forms Authentication.

I am attempting to implement the example from the DotNetOpenAuth Service Provider solution but instead of using OpenId for authentication, I am using Forms Authentication.

I copied and pasted the Consumer example but remov开发者_如何学Goed the Service Reference and added a new service reference pointing to my WCF service.

Getting of the Access Tokens is working great and I can see them appearing in my database table, however, as soon as I attempt to access data, it is failing on this line in the OAuthAuthorizationManager class:

Uri requestUri = OperationContext.Current.IncomingMessageProperties["OriginalHttpRequestUri"] as Uri;

Is there something I am missing somewhere? It seems that this property should exist because I don't see where it is manually added anywhere in the original. I copied and pasted the Web.config from the sample Service Provider project and all of my files are named the same.

Let me know if there is any more information needed or if anyone wants me to email them the sample project to look at.

Thanks for any assistance.


Uri requestUri = operationContext.RequestContext.RequestMessage.Properties.Via;

I think it is a more secure way of finding the original HTTP information.

0

精彩评论

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