Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

[Question] GetWebLoginClientContext error when run under IIS #2808

Open
shikelong opened this issue Nov 20, 2020 · 4 comments
Open

[Question] GetWebLoginClientContext error when run under IIS #2808

shikelong opened this issue Nov 20, 2020 · 4 comments

Comments

@shikelong
Copy link

Which PnP repository should you use to report the issue?

Environment

[x] Office 365 / SharePoint Online
.Net env: .Net framework 4.6.1
Package verson: Install-Package SharePointPnPCoreOnline -Version 3.27.2011
OS: Windows 10

Expected or Desired Behavior

When I run my code in visual studio, the GetWebLoginClientContext function display the authentication window, automatically close and return the ClientContext

Observed Behavior

If I publish my code to IIS and call GetWebLoginClientContext via browser UI, I got a error, the detail is

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

How to fix it ? Thanks.

@ghost
Copy link

ghost commented Nov 20, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Nov 20, 2020
@mankyyou
Copy link

I have some issue.Waiting for answer

@shikelong
Copy link
Author

I have some issue.Waiting for answer

I has wrote a .Net framework Console Application to call the GetWebLoginClientContext method, Then it works. Can you avoid publish the application to IIS server, try to sperate a client Application to fix the problem?

@mankyyou
Copy link

I have some issue.Waiting for answer

I has wrote a .Net framework Console Application to call the GetWebLoginClientContext method, Then it works. Can you avoid publish the application to IIS server, try to sperate a client Application to fix the problem?

I see.
It's work prefect in Console Application,but not in Web Application.
And in my product use ASP.NET Web Application not Console Application.(It's impossible to change to Console App)
In Code GetWebLoginClientContext have System.Windows.Forms to create Forms for Login,
but System.Windows.Forms not use in ASP.NET WebApplication,then I try import dll of System.Windows.Forms to Web App but it's not work.
I hope them will support Web App soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants