comexception

UserPrincipal.FindByIdentity results in COM error 0x80005000

元气小坏坏 提交于 2021-02-07 20:34:49
问题 I've an MVC Intranet app that I've recently upgraded from .Net 4 to 4.6.1. This app queries user details from Active Directory to load details that aren't available in the Controller's User.Identity property and until lately has done so flawlessly. The code looks something like this: public static void foo() { var usr = LookupUser("MyDomain", "jbloggs"); ... } private static UserPrincipal LookupUser(string domain, string username) { Console.WriteLine($"Lookup {domain}\\{username}"); using

UserPrincipal.FindByIdentity results in COM error 0x80005000

孤街醉人 提交于 2021-02-07 20:34:27
问题 I've an MVC Intranet app that I've recently upgraded from .Net 4 to 4.6.1. This app queries user details from Active Directory to load details that aren't available in the Controller's User.Identity property and until lately has done so flawlessly. The code looks something like this: public static void foo() { var usr = LookupUser("MyDomain", "jbloggs"); ... } private static UserPrincipal LookupUser(string domain, string username) { Console.WriteLine($"Lookup {domain}\\{username}"); using

Getting COMException when accessing Emails on Outlook 2010

♀尐吖头ヾ 提交于 2020-01-23 07:33:30
问题 Hello I am trying to access my emails in Outlook 2010 via a C# Console Application. Visual Studio is started with admin rights and I have added a reference to Microsoft.Office.Interop.Outlook v14.0.0.0 and used it as Outlook. My Code: Console.Write("starting"); Outlook.Application app = new Outlook.Application(); Outlook.NameSpace mapiNameSpace = app.GetNamespace("MAPI"); Outlook.MAPIFolder myInbox = mapiNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox); Console.WriteLine((

COMException on Main Thread of WPF application

走远了吗. 提交于 2020-01-07 16:35:12
问题 WPF, Excel AddIn, C#, I have multiple asychronous calls to get data from web service on main thread, then in call back, I will plot the data in Excel. I tracked call back and they run on main thread, too. but I still get COMException 0x800AC472, googled and it seems this is a multi-thread issue. but I am confused why this happened. I think there is only one main thread and since all callback are run on main thread and there is no reason to have the exception? Edit: On main UI thread, ribbon

Outlook COMException

北战南征 提交于 2020-01-03 17:37:05
问题 System.Runtime.InteropServices.COMException ..Your server administrator has limited the number of items you can open simultaneously... at Microsoft.Office.Interop.Outlook._AppointmentItem.get_UserProperties() var calendar = outlookApplication.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderCalendar); if (calendar == null || calendar.Items == null) { return null; } var calendarItems = calendar.Items; if (calendarItems != null && calendarItems.Count > 0) { // Dont convert to LINQ

Outlook COMException

主宰稳场 提交于 2020-01-03 17:36:25
问题 System.Runtime.InteropServices.COMException ..Your server administrator has limited the number of items you can open simultaneously... at Microsoft.Office.Interop.Outlook._AppointmentItem.get_UserProperties() var calendar = outlookApplication.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderCalendar); if (calendar == null || calendar.Items == null) { return null; } var calendarItems = calendar.Items; if (calendarItems != null && calendarItems.Count > 0) { // Dont convert to LINQ

.GetDirectoryEntry throws COM exception, code:0x800720720 when attempting to bind to object

亡梦爱人 提交于 2020-01-03 03:46:13
问题 My application is running on IIS 7.0, it is supposed to impersonate the authenticated user and unlock or reset other user accounts. It worked fine when I was developing it on my workstation, but when I uploaded it to the server the impersonation stopped working, it won't bind to the AD objects and keeps throwing the same exception. I had the same problem earlier with using PrincipalContext but I was able to get around that using using(HostingEnvironment.Impersonate()) because I didn't need

COMException occurred: ErrorCode = -2147287036

巧了我就是萌 提交于 2019-12-24 20:25:38
问题 I have to parallelize an application; This application has to process a file, I used tasks and each thread is processing one line of data (previously it used to process lines one by one sequentially). The problem is that the data provider uses some sort of caching and also it accesses the file multiple times during the process, so using one data provider was a hard work of making it thread-safe, instead I created on new data provider for each time a thread is processing a line. It works fine

Unknown com_exception error

无人久伴 提交于 2019-12-24 08:44:14
问题 I'm writing an extension for the Yii framework which I have asked on here about before and someone is reporting the following error: com_exception Description Source: Unknown Description: Unknown Source File C:\wamp\www\yiisample\protected\extensions\gallery\EGalleryBase.php(364) They are using WAMP 5, PHP Version 5.2.1 and Window XP. Line 364 refers to: $Command = realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'EGalleryProcessQueue.php '.$this->_realpath.' '.$this->thumbnailWidth.' '.$this-

Lync: VideoWindows of AVModality.VideoChannel are null after successfully calling BeginStart (COMException HRESULT: 0x80029C4A TYPE_E_CANTLOADLIBRARY)

谁说我不能喝 提交于 2019-12-23 01:52:24
问题 We are currently trying to incorporate Lync communication (Lync SDK 2010) into our application and we have run into an issue with the VideoWindows ( CaptureVideoWindow , RenderVideoWindow ) of the AVModality 's VideoChannel : They are always null, even after successfully calling BeginStart . The connection is definitely established. We can talk. Our own video is shown in a remote Lync client. AVModalityState is Connected . VideoChannelState goes from Connecting to Receive to Send . It does