在.net core 2.0中使用WCF Web服务引用提供程序向SOAP接口添加连接服务时,System.ServiceModel.ClientBase版本4.2.0.0不再具有4.0.0.0版中的IDisposable接口.
这意味着我不能再将它包装在using语句中(或使用try/finally并处理对象),如下所示:
using (MyClass.MyClassSoapClient client = new MyClass.MyClassSoapClient(EndpointConfiguration.MyClassSoap))
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚为什么IDisposable被删除以及我是否应该尝试自己实现它,或者我是否打算在.net核心中以不同的方式使用SOAP接口?
摘要:iOS/OS 12中的第三方登录中断!
我们有一个适用于多个网站的通用登录.这在Windows,macOS和iOS上的Firefox,Chrome和Safari中运行良好.但是对于iOS 12和macOS 12,似乎cookie不再从auth0登录窗口工作到我们的登录API.
它不仅在Safari中停止工作,而且在iOS 12上也在Chrome和Firefox中停止工作(它仍适用于Mac OS 12上的Chrome).我怀疑这与智能跟踪预防2.0有关,但我很难找到许多技术细节.
我们的登录流程如下:
我在启动时使用以下内容:
services.AddAuthentication(options => {
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
})
.AddCookie(options =>
{
options.Cookie.Path = "/";
options.SlidingExpiration = false;
})
.AddOpenIdConnect("Auth0", options => {
// Set the authority to your Auth0 domain
options.Authority = $"https://{Configuration["Auth0:Domain"]}";
// Configure the Auth0 Client ID and Client Secret
options.ClientId = Configuration["Auth0:ClientId"];
options.ClientSecret = Configuration["Auth0:ClientSecret"];
// Set response type to code
options.ResponseType = "code";
// Configure the scope …
Run Code Online (Sandbox Code Playgroud) 对于 iOS 11 上的 PWA,我们通过将登录详细信息存储在 Service Worker Web 缓存中来解决在 Safari 中打开的外部第三方登录问题。
这在 iOS 12 中不再有效(在撰写本文时处于测试版)。我认为这肯定是因为 PWA 现在拥有自己的服务工作线程缓存,不再与 Safari 共享,但我无法确认这一点。
有谁知道是否有办法在 safari 和 PWA 之间共享服务工作线程缓存?请注意,我们已经尝试过 IndexedDB,但它不是共享的,当然 cookie 也不是。
据我所知,这意味着 PWA 完全被 safari 沙箱化,并且无法让第三方登录正常工作。有什么解决办法吗?
我可以使用该[AllowAnonymous]
属性来允许用户访问控制器操作,但是是否有一个属性只允许匿名用户执行操作?例如[AllowAnonymousOnly]
有没有办法让多个事件(例如oninput,onblur)触发完全相同的HTML函数?
这是我要简化的HTML:
<input id="Email" name="Email" type="text" oninput="toggleSuccessIcon(this, isEmail)" onblur="toggleSuccessIcon(this, isEmail)">
Run Code Online (Sandbox Code Playgroud)
我知道这是可能的jQuery中的解释在这里,但因为我有很多的不同的输入(例如地址,邮政编码等),其需要调用不同的功能(例如toggleSuccessIcon(这一点,isAddresss),toggleSuccessIcon(这一点,isPostCode)等),我想避免在JavaScript中进行冗长且混乱的初始化。但是,如果我用HTML而不是JQuery这样做很愚蠢,那么我将对使用JQuery的优势做出解释。
请注意,isEmail,isAddress,isPostCode等是函数名称。
我需要能够识别标头(x-functions-key)中提供的密钥(理想情况下是密钥名称),以便在 Run 方法中向 Azure 函数发送 POST,例如
Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ILogger log, ClaimsPrincipal principal)
Run Code Online (Sandbox Code Playgroud)
能够保护对 Azure 功能的访问,在 Azure 门户面板中添加功能键是很棒的,但我必须能够分辨使用了哪个功能键。理想情况下,可以在每个功能键上关联声明,但只要我至少能弄清楚使用了哪个键,我就会很高兴。
iOS iOS应用程序适用于iOS 9.3和iOS 10.2的所有模拟器,从iPhone 5s到iPhone 7 Plus,以及iPad.
但是,在iPhone 5(不太重要的是4)上,模拟器或实际的iPhone 5都无法启动应用程序.从未命中AppDelegate方法"FinishedLaunching"或Application Main方法中的断点.
实际发生的是静态故事板预发布图像显示一秒钟然后关闭.在停止之前重复几次.尝试从图标启动应用程序具有完全相同的效果.这适用于iOS 9.3和10.2.
在Visual Studio的调试控制台中,只有以下内容没有给我任何尝试找到解决方案:
Launching 'xxx' on 'iPhone 5 iOS 9.3'...
Launch failed. The app 'xxx' could not be launched on 'iPhone 5 iOS 9.3'. Error: An error occured on client IDB420719 while executing a reply for topic xvs/idb/4.2.0.719/launch-app. Please check the logs for more details.
The app has been terminated.
Run Code Online (Sandbox Code Playgroud)
Mac上的模拟器没有〜/ Library/Logs/DiagnosticReports崩溃的日志(它会记录其他版本的其他崩溃,因此路径是正确的).
PC和MAC上的所有内容都是最新的.
我有点不知道如何进一步挖掘和困惑,因为它在iPhone5s +上运行良好.
建议我可以尝试,我可以看到的地方和可能的原因非常感谢.
c# ×2
ios ×2
.net ×1
.net-core ×1
asp.net-core ×1
asp.net-mvc ×1
auth0 ×1
azure ×1
html ×1
ios12 ×1
javascript ×1
jquery ×1
xamarin ×1