Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9271353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:36:01+00:00 2026-06-18T15:36:01+00:00

I am tring to implemented an OAuth2Authorization Server and I am tring to connect

  • 0

I am tring to implemented an OAuth2Authorization Server and I am tring to connect to it by DotNetOpenAuth.AspNet.Clients.OAuth2Client in a MVC 4 webclient project.

In my SPA webclient I am able to obtain an AccessToken overriding QueryAccessToken of OAuth2Client.

With my AccessToken I am able to call a REST API service and obtain successful result as user extra data.

....
HttpWebRequest apiRequest = 
   (HttpWebRequest)WebRequest.Create(".....://localhost:4314/api/TodoList");
DotNetOpenAuth.OAuth2.ClientBase.AuthorizeRequest(apiRequest, AccessToken);
....

But, after some time my AccessToken goes to expire and I receive an error, so I need to refresh my AccessToken for next REST service calls.

How can I refresh my AccessToken inside a method of OAuth2Client?
Is it possible to use ClientBase.RefreshAuthorization(....)?

Thanks
Carmelo

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:36:02+00:00Added an answer on June 18, 2026 at 3:36 pm

    Using the DotNetOpenAuth.AspNet namespace for authorization (using the access token repeatedly for web requests) is swimming upstream. That namespace has clients that are only intended for login (authentication).

    A better fit for what you’re doing would be to use the WebServerClient class, which is part of the core DotNetOpenAuth library. It automatically refreshes the access token as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Kendo-UI for web support MVC 4 ? I am trying to implemented Grid
I have implemented a Facebook connect example with my Codeigniter website. I am trying
Here is the thing: We've implemented a C++ RESTful API Server, with built-in HTTP
I'm still trying to decide whether my (home) project should use UTF-8 strings (implemented
I implemented the table sorter yesterday and i have a problem trying to change
I'm trying to use the Ember.Router implemented in the latest version of ember (latest
I am trying to customize spring security Login mechanism implemented in an existing spring
I have been trying to understand the way ActionScript's events are implemented, but I'm
I'm trying a more object oriented approach with javascript and have implemented a class
I’m trying backbone and playing with the model concept – something I’ve implemented without

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.