简体   繁体   English

MSOnline同时连接问题

[英]Problems with simultanious MSOnline connections

We offer a service to our customer by the usage of a website where the user can connect to his O365 account and consult/manage his information. 我们通过使用网站为我们的客户提供服务,用户可以在该网站上连接到他的O365帐户并查询/管理他的信息。 Everything worked fine while testing and so on but when we are "stresstesting it" by connecting with multiple tenants at the same time, IIS (or MSOnline service) is not handling that well and shuts of all sessions. 在测试等过程中,一切工作正常,但是当我们通过同时与多个租户连接进行“压力测试”时,IIS(或MSOnline服务)不能很好地处理并关闭所有会话。 The website is hosted on Azure on a VM where IIS userprofile creates 1 connection to the MSOnline service at a time for 1 user only. 该网站托管在VM上的Azure上,其中IIS用户配置文件仅一次为1个用户创建1个与MSOnline服务的连接。 We do this because we could not set it up properly to have multiple userprofiles in IIS to create multiple connections to MSOnline service. 这样做是因为我们无法正确地将其设置为在IIS中具有多个用户配置文件来创建与MSOnline服务的多个连接。 I have read about Azure App Service Hybrid Connections, where if i understood it properly, we could have the same scenario we have now AND be able to create multiple connections with the multiple "hybrid connections". 我已经阅读了有关Azure App Service混合连接的信息,如果我正确理解的话,我们可能会遇到与现在相同的情况,并且能够使用多个“混合连接”创建多个连接。

My question is, are we doing something that we shouldn't do, is this an issue on IIS level or a limitation of the MSOnline service or something else ? 我的问题是,我们是否在做我们不应该做的事情,这是IIS级别的问题还是MSOnline服务的限制或其他原因? What are our options, what is the best, cleanest and "should do" option ? 我们有哪些选择,最好,最清洁和“应该做”的选择是什么? We are also using Exchange online connection & EWS which we have no issues at all regarding connections. 我们还使用了Exchange在线连接和EWS,这些连接完全没有问题。

EDIT 编辑

Dear community 亲爱的社区

I don't know wether no one has an answer or if something is not OK from my side is the reason that no one is responding but i would like to update our situation: 我不知道是否没有人可以回答,或者如果我这边有什么问题是没有人回应的原因,但是我想更新一下我们的情况:

we have try to move on and implement a custom Queue system to perform all connection request one by one so they would not interfere with each other however we don't think this is correct to even try implement this solution. 我们试图继续并实现一个自定义的Queue系统来逐个执行所有连接请求,以使它们不会互相干扰,但是即使尝试实现此解决方案,我们也不认为这是正确的。 We also tried multithreading/async but this had also some issues and was not a stable solution. 我们还尝试了多线程/异步,但这也存在一些问题,并且不是一个稳定的解决方案。

Our code was trying to use threads to do something which should be done in different application domains: "An application domain forms an isolation boundary for security" says the MSDN documentation. 我们的代码试图使用线程来完成应在不同应用程序域中执行的操作:MSDN文档说:“应用程序域形成了安全性的隔离边界”。

The Office 365 library that we use (the service) to connect through powershell will no doubt use the app domain of the current thread - and we're just using two threads which belong to the same app domain, hence the confusion / failure of our attempt. 我们用来(通过服务)通过Powershell连接的Office 365库无疑将使用当前线程的应用程序域-我们仅使用了属于同一应用程序域的两个线程,因此我们的困惑/失败尝试。

We found this: https://msdn.microsoft.com/en-us/library/3c4f1xde(v=vs.110).aspx and we think this should be our solution, however we don't know how to properly implement this and have tried multiple ways but with no positive effect. 我们发现了这一点: https : //msdn.microsoft.com/en-us/library/3c4f1xde(v=vs.110).aspx ,我们认为这应该是我们的解决方案,但是我们不知道如何正确实施并且尝试了多种方法,但没有产生积极效果。

We have tried this as well: https://docs.microsoft.com/en-us/dotnet/framework/app-domains/how-to-configure-an-application-domain 我们也尝试过这样做: https : //docs.microsoft.com/zh-cn/dotnet/framework/app-domains/how-to-configure-an-application-domain

And this would be the exact same issue we are having: Unable to execute two Office 365 commands simultaneously using different accounts in C# and was solve for the person who posted the issue by applying the AppDomain “fix”. 这将是我们遇到的完全相同的问题: 无法使用C#中的不同帐户同时执行两个Office 365命令,并且通过应用AppDomain“修复”解决了发布该问题的人员。

Can someone please take us into the right direction, that being how to implement this or directing us to the right direction ? 有人可以将我们带入正确的方向,即如何实现这一目标或将我们引向正确的方向吗?

Thank you in advance ! 先感谢您 !

从那时起,我们一直在使用AzureAD cmdlet,这使我们不能使用MSOnline服务,该服务不允许多个实例进行连接,这是我们需要的方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WPF中元素的同时动画 - Simultanious Animation of Elements in WPF 具有不同连接的多个DbContexts的问题 - Problems with Multiple DbContexts with differents connections C#多个串口同时读取 - C# multiple serial ports simultanious reading ASP.NET Web-api核心:处理客户端连接问题并发现冲突 - ASP.NET Web-api core: Handling client connections problems and find conflicts 尝试在ASP.NET Web应用程序中加载Powershell模块“ MSOnline”时出错 - Error while Trying to load Powershell Module “MSOnline” in ASP.NET web app 无法从“C:\Program Files\WindowsPowerShell\Modules\MSOnline\1.1.183.57\PSModule\”加载 PSModule。 试图加载不正确的格式 - Can't load PSModule from 'C:\Program Files\WindowsPowerShell\Modules\MSOnline\1.1.183.57\PSModule\'. An attempt was made to load incorrect format Web 应用程序的同时运行是否会创建自己的进程内 COM 实例? 如果是这样,为什么我的结果会在 Web 应用程序用户之间混淆 - Do simultanious runs of a web app create their own instances of an in-process COM? If so why are my results getting mixed up between web app users SQL连接 - SQL Connections ADO.NET连接池中没有可用的连接 - No connections available in ADO.NET connections pool BackgroundWorkers和SQL连接 - BackgroundWorkers and SQL Connections
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM