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 9317319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:50:56+00:00 2026-06-19T02:50:56+00:00

My new project demands the implementation OpenAuth. Following is my code. The line scopes.Add(CalendarService.Scopes.Calendar.GetStringValue())

  • 0

My new project demands the implementation OpenAuth. Following is my code.

The line

scopes.Add(CalendarService.Scopes.Calendar.GetStringValue())

in the GetAuthorization gives the following error.

Overload resolution failed because no accessible…

GetStringValue is the most specific for these argument. I can understand that GetStringValue is not the method/argument found in the calendarservice.scopes.calendar but my question is why so? I have downloaded this code from some website and most website is giving example in C# but there are hardly any site that is showing any example in VB.Net. Can anyone help me here.

Regards

P.S. I am using Visual Studio 2008.

Imports System
Imports System.Diagnostics
Imports DotNetOpenAuth.OAuth2
Imports Google.Apis.Authentication.OAuth2
Imports Google.Apis.Authentication.OAuth2.DotNetOpenAuth
Imports Google.Apis.Calendar.v3
Imports Google.Apis.Util
Imports Google.Apis.Calendar.v3.Data
Imports Google.Apis.Tasks.v1
Imports Google.Apis.Tasks.v1.Data

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim provider = New NativeApplicationClient(GoogleAuthenticationServer.Description)
        provider.ClientIdentifier = "Client ID Here"
        provider.ClientSecret = "Client Secret Here"
        Dim auth = New OAuth2Authenticator(Of NativeApplicationClient)(provider, AddressOf GetAuthorization)

        Dim service = New CalendarService(auth)
        Dim first = service.CalendarList.List.Fetch().Items().First()

        Label1.Text = first.Summary

    End Sub

    Private Function GetAuthorization(ByVal arg As NativeApplicationClient) As IAuthorizationState

        Dim scopes As New System.Collections.Generic.List(Of String)

        scopes.Add(CalendarService.Scopes.Calendar.GetStringValue())

        Dim state As IAuthorizationState = New AuthorizationState(scopes)
        state.Callback = New Uri(NativeApplicationClient.OutOfBandCallbackUrl)
        Dim authUri As Uri = arg.RequestUserAuthorization(state)

        Process.Start(authUri.ToString())

        ' Open a modal dialogue for user to paste the authorization code from Browser = authCode 
        Dim authCode As String = Console.ReadLine()
        Return arg.ProcessUserAuthorization(authCode, state)

    End Function
End Class
  • 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-19T02:50:58+00:00Added an answer on June 19, 2026 at 2:50 am

    GetStringValue is en extension method defined on Google.Apis.Util.Utilities.

    Similar VB.NET code to this worked for me on VS2012 with the latest version of the library.
    You can find my VB.NET sample in https://codereview.appspot.com/7007048/, but it still wasn’t approved, so be careful using it.

    In the samples repository (http://code.google.com/p/google-api-dotnet-client/source/browse/?repo=samples#hg%2FDiscovery.VB.ListAPIs), there is currently only one VB.NET sample, but hopefully the sample above will be approved soon and it will be added to the repository.

    Please elaborate more on the references that you have in your project and the stack trace.
    It looks like there is another overloading to this GetStringValue somewhere else (http://msdn.microsoft.com/en-us/library/2hx4ayzs(v=vs.80).aspx) in your code or in a reference assembly.

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

Sidebar

Related Questions

While working on a new project in R, I wrote the following code: sp500
I've started a new project in Xcode (a command line app using C++), and
I will start new project which is based on ASP.NET MVC 3 using C#
After initiating a new project, I would like to know when Petrel has completed
It's a brand new project. Here's the exact commands I've run: rails new MyProject
we are starting a new project and I would like to know if V5
In a new project of mine I cannot see the Deployment Assembly link in
Im unable to start new project in a virtualenv. This is what i did
I created a new project, Windows Phone 7.0 Since i wanted the DockPanel, i
I came to a new project which have been developed for a quite long

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.