eelanee 发表于 2024-5-7 16:20:57

10.0 关于本地服务器做外网端口映射,远程登录无法实现钉钉单点登录

场景,

本地局域网服务器,使用电信宽带做了外网映射 80端口 映射外网9090端口,钉钉单点登录无法登录(已经按照标准配置好),我把外网映射端口改为80(原为9090),局域网内单点登录可以实现,然而电信关闭了外网80端口,远程无法登录应用,何解.

Shawn.Liu 发表于 2024-5-7 18:03:02

本帖最后由 Shawn.Liu 于 2024-5-7 18:09 编辑

您好,钉钉单点登录无法登录这个问题可以截图下错误日志或者收集下错误日志吗,这边看下如何处理,是端口映射的问题还是需要将源码给到您这边自己修改等。

一看就会,超有用活字格技能:四十五,错误日志收集功能
https://gcdn.grapecity.com.cn/showtopic-52854-1-1.html
(出处: 葡萄城开发者社区)

eelanee 发表于 2024-5-8 15:06:57

Shawn.Liu 发表于 2024-5-7 18:03
您好,钉钉单点登录无法登录这个问题可以截图下错误日志或者收集下错误日志吗,这边看下如何处理,是端口映 ...

2024-05-08 10:29:00.947 - The api Route: requested in error: [由于目标计算机积极拒绝,无法连接。 [::ffff:127.0.0.1]:22349 (localhost:22349)].
2024-05-08 10:29:00.949 - Request Exception Happened-------------------------------
Path/customapi/dingdingsinglelogin/sso

2024-05-08 10:29:00.951 - {
"ClassName": "System.ArgumentNullException",
"Message": "Value cannot be null.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": "   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.TryGetFirst(IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at p.f(String a, String b, String c)
   at p.e(HttpContext a)
   at p.b(HttpContext a)
   at p.a(HttpContext a)
   at p.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at o.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.StartPageMiddleware.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.ResourceMiddleware.InvokeAsync(HttpContext context)
   at ForguncyServerCommon.HttpHeaderMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at v.InvokeAsync(HttpContext context)",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147467261,
"Source": "System.Linq",
"WatsonBuckets": null,
"ParamName": "source"
}
2024-05-08 10:29:00.953 - - Source: /customapi/dingdingsinglelogin/sso, UserName: , ExtraData: , Callback: {
"ClassName": "System.ArgumentNullException",
"Message": "Value cannot be null.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": "   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.TryGetFirst(IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at p.f(String a, String b, String c)
   at p.e(HttpContext a)
   at p.b(HttpContext a)
   at p.a(HttpContext a)
   at p.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at o.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.StartPageMiddleware.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.ResourceMiddleware.InvokeAsync(HttpContext context)
   at ForguncyServerCommon.HttpHeaderMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Extensions.AsyncMiddlewareLogWrapper.InvokeAsync(HttpContext context)
   at v.InvokeAsync(HttpContext context)",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147467261,
"Source": "System.Linq",
"WatsonBuckets": null,
"ParamName": "source"
}

eelanee 发表于 2024-5-8 15:07:31

服务器的诊断日志

Shawn.Liu 发表于 2024-5-8 18:13:03

本帖最后由 Shawn.Liu 于 2024-5-22 14:48 编辑

eelanee 发表于 2024-5-8 15:07
服务器的诊断日志
收到大佬,您这边目前外网的映射端口目前还是9090,只能在浏览器通过账户密码的方式登录,而无法在钉钉客户端通过 /customapi/dingdingsinglelogin/sso 访问是吗?
错误日志最好可以请您收集为psi格式。

eelanee 发表于 2024-5-8 18:46:39

Shawn.Liu 发表于 2024-5-8 18:13
收到大佬,您这边目前外网的映射端口目前还是9090,只能在浏览器通过账户密码的方式登录,而无法在钉钉客 ...

好的,明天约个时间看一下

Shawn.Liu 发表于 2024-5-9 18:27:31

{:5_108:}

Shawn.Liu 发表于 2024-5-15 14:24:05

本帖最后由 Shawn.Liu 于 2024-5-22 14:50 编辑

大佬,请教一下我们这个问题是否已通过如改变外网映射的方式,发布到外网可访问的机器解决?
这个问题这边从源码了解了下,其中一个可能的原因是在获取访问活字格单点登录的token时有误,您可以尝试下将发布到本地局域网服务器时端口从80修改为外网端口9090,如果还有问题可以跟帖回复哈

Shawn.Liu 发表于 2024-5-27 14:22:33

问题跟进:楼主是与电信沟通开启了外网80端口后解决,标记一下。
页: [1]
查看完整版本: 10.0 关于本地服务器做外网端口映射,远程登录无法实现钉钉单点登录