views:

22

answers:

1

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?

A: 

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.

Andrew Arnott
Thank you Andrew.
Graham