0

I dont know why, but this Message was deleted by moderator in my First question and moderator wrote that I need open New question. So...... (part 1 - Change Google default Auth Redirection - C# (Google liblary))

I try bad have little problem: If i try this code:

public class MyNewAuthorizationCodeMvcApp : AuthorizationCodeMvcApp
    {
        public MyNewAuthorizationCodeMvcApp(Controller controller, FlowMetadata flowData) : base(flowData.Flow, "http://www.yandex.ru",  controller.Request.Url.ToString())
        {         


        }
    } 

I get error that : AuthorizationCodeMvcApp constructor(default liblary) does not contein a constructor that takes 3 arguments

if I try :

  public class MyNewAuthorizationCodeMvcApp : AuthorizationCodeWebApp
    {
        public MyNewAuthorizationCodeMvcApp(Controller controller, FlowMetadata flowData) : base(flowData.Flow, "http://www.yandex.ru",  controller.Request.Url.ToString())
        {         


        }
    }

I dont get error BUT! i cant SET Valeu for

        this.controller = controller;
        this.flowData = flowData;

Because this field only for reading(((

What wrong?

Community
  • 1
  • 1
David Abaev
  • 43
  • 1
  • 5

1 Answers1

0

AuthorizationCodeMvcApp Takes two parameters in its constructor, so that's why you get the first error.

You can't set controller and flowdata because they are read only, in the AuthorizationCodeMvcApp they are set only in the constructor!

I think that the best solution for you is to just copy the content of AuthorizationCodeMvcApp and change line 46 to the right URI you want it to have.

peleyal
  • 3,472
  • 1
  • 14
  • 25
  • I try - but i have new problem http://stackoverflow.com/questions/27213217/driveservice-in-google-drive-credential-always-null – David Abaev Nov 30 '14 at 12:38