App Deployment error - The operation took too long.

Iron Contributor

Hello Team

 

I am trying to deploy app using following code

string acsAppId = Convert.ToString(WebConfigurationManager.AppSettings.Get("ClientId"));
            string acsSupport = Convert.ToString(WebConfigurationManager.AppSettings.Get("ClientSecret"));

 

            OfficeDevPnP.Core.AuthenticationManager authManager = new OfficeDevPnP.Core.AuthenticationManager();
            ClientContext context = authManager.GetAppOnlyAuthenticatedContext(siteUrl, acsAppId, acsSupport);
            var appManager = new AppManager(context);
            var apps = appManager.GetAvailable();
            var chartsApp = apps.Where(a => a.Title == "MyApp").FirstOrDefault();
            var installApp = appManager.Install(chartsApp.Id);

App is not getting  installed , when I monitor the app it is showing following error

Avian1_0-1692199030949.png

 

Can anyone please help, why app is not getting installed and throwing above error.

 

Regards

Avian

 

1 Reply
Hello All,

Can anyone help on above code? What I am missing here.

I already tested by passing username/pwd, but I dont want to hardcode the username/password. I also tried with PNP PowerShell successfully.

Has anyone resolve this issue, please help.

Regards
Avian