dotnetopenauth pending request lost
I have dotnetopenauth working fine as a provider except when a user 开发者_运维知识库clicks the submit button multible times. Then the following error occurs:
Throw New InvalidOperationException("There's no pending authentication request!")
What is the best way to prevent this happening?
I guess you're using ProviderEndpoint.PendingAuthenticationRequest
to store the request, which is automatically cleared after the response is sent. So it makes sense that an accidental double-click would result in this error. To prevent this from happening you'd have to decide how long to store a response in the user's Session and store it yourself, perhaps just before sending the first response. Then using that instead of ProviderEndpoint.PendingAuthenticationRequest
.
精彩评论