casdoor / casdoor-dotnet-sdk

.NET client SDK for Casdoor
https://github.com/casdoor/casdoor
Apache License 2.0
28 stars 25 forks source link

IDX20803: Unable to obtain configuration from: 'http://localhost:7001/.well-known/openid-configuration'. #91

Closed wuxiao-ling197 closed 11 months ago

wuxiao-ling197 commented 11 months ago

1

2

hello , this is what my error . I only changed the CasdorOptions params and then just run this ConsoleApp program , it told me I can`t get the configuration ; but if I run it in MVCApp it was success , and I have try to deploy casdoor in public domain like https://xxx.com but I have any idea how to achieve it , Thank you ver much !

casbin-bot commented 11 months ago

@seriouszyx @ComradeProgrammer @Resulte

hsluoyz commented 11 months ago

@wuxiao-ling197 you should deploy Casdoor in Production mode: https://casdoor.org/docs/basic/server-installation/#production-mode (yarn build) and use endpoint: http://localhost:8000

image

wuxiao-ling197 commented 11 months ago

oh I tried , the error was still , and then I tried  to deploy it by public domain , but I am unable to deal with about the way to deploy to public domain(https) ,  does there have a related example ?发自我的手机-------- 原始邮件 --------发件人: hsluoyz @.>日期: 2023年12月1日周五 20:29收件人: casdoor/casdoor-dotnet-sdk @.>抄送: wuxiao-ling197 @.>, Mention @.>主 题: Re: [casdoor/casdoor-dotnet-sdk] IDX20803: Unable to obtain configuration from: 'http://localhost:7001/.well-known/openid-configuration'. (Issue #91) @wuxiao-ling197 you should deploy Casdoor in Production mode: https://casdoor.org/docs/basic/server-installation/#production-mode (yarn build) and use endpoint: http://localhost:8000 image.png (view on web)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

hsluoyz commented 11 months ago

@wuxiao-ling197 pull latest code, fixed by: https://github.com/casdoor/casdoor-dotnet-sdk/commit/38ee767d66fd267d0b1bc7f98e6e4295f0725362

robincodex commented 3 months ago

I'm getting the same error, I've debugged and found that the conditional (_syncAfter <= now) judgment here is false, is there anything else I need to do?

await client.RequestClientCredentialsTokenAsync();
// or
await client.RequestAuthorizationCodeTokenAsync(code, "");
console  |       System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'http://casdoor:8000/.well-known/openid-configuration'.
console  |          at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
console  |          at Casdoor.Client.CasdoorClient.ApplyConfigurationAsync[T](T request, CancellationToken cancellationToken)
console  |          at Casdoor.Client.CasdoorClient.RequestAuthorizationCodeTokenAsync(String code, String redirectUri, String codeVerifier, CancellationToken cancellationToken)
console  |          at Studio.Console.Controllers.UnauthorizedUserController.SignIn(String code, String state)

image