Error when creating new RDOSession using RedemptionLoader - outlook

Below is my code:
RDOSession pstSession = null;
string binPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
RedemptionLoader.DllLocation64Bit = Path.Combine(binPath, "Redemption64.dll");
RedemptionLoader.DllLocation32Bit = Path.Combine(binPath, "Redemption.dll");
pstSession = RedemptionLoader.new_RDOSession();
Error logged is:
System.Runtime.InteropServices.COMException (0x8004010F): Creating an instance of the COM component with CLSID {29AB7A12-B531-450E-8F7A-EA94C2F3C05F} from the IClassFactory failed due to the following error: 8004010f Exception from HRESULT: 0x8004010F.
Searched the error code but could not get much information. What might be the problem? The issue is not replicated in every machine.

0x8004010F is MAPI_E_NOT_FOUND, which most likely means Redemption cannot find the MAPI system, either because it is not present (Outlook must be installed) or it has a wrong bitness. See http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject for more details.

Related

WebView2 creation failed with exception = System.DllNotFoundException: Unable to load DLL 'WebView2Loader.dll'

I'm trying to use WebView2 in ASP.Net Web API Web App (VS2019).
The WebView2 package is installed using NuGet Package Manager.
I see the runtimes subfolder with all the needed runtimes in my web app's \bin folder.
But I'm getting a run-time error message:
WebView2 creation failed with exception = System.DllNotFoundException: Unable to load DLL 'WebView2Loader.dll':
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2EnvironmentWithOptions(String browserExecutableFolder, String userDataFolder, ICoreWebView2EnvironmentOptions options, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environment_created_handler)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.<CreateAsync>d__3.MoveNext()
The run-time error happens at the last line of the following code:
var webView = new Microsoft.Web.WebView2.WinForms.WebView2();
...
var ecwTask = webView.EnsureCoreWebView2Async(null);
AFAICG I should try to create a custom CoreWebView2Environment and pass it as parameter to webView.EnsureCoreWebView2Async(...).
Any ideas how it can be done or how to solve the subject issue differently?
I have solved the subject issue ("Unable to load DLL 'WebView2Loader.dll'") with the following code:
var udf = ... // Temp Folder - should be new for every new instance of WebView2 control
var fixedDriverFolder = null;
var envTask = await Microsoft.Web.WebView2.Core.CoreWebView2Environment
.CreateAsync(browserExecutableFolder: fixedDriverFolder, userDataFolder: udf);
var ecwTask = br.EnsureCoreWebView2Async(envTask);
while (ecwTask.IsCompleted == false)
{
Application.DoEvents();
};
Now I can use WebView2 Control in .NET Framework console applications.
I still can't use the WebView2 control in ASP.NET Web Api Web App - another runtime error appears.

Exception thrown: 'System.UnauthorizedAccessException' in HP.HPRM.OfficeIntegration.Outlook.dll Additional information:

I have written an OutllokAddin.In my email I have attached one draft email. When I open the email and try to open the attach draft email I got the below error.
Exception thrown:
'System.UnauthorizedAccessException' in
HP.HPRM.OfficeIntegration.Outlook.dll Additional information: The
property
"http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/CheckInInfoID"
does not support this operation.
below is my code where SetProperty is throwing error.
Interop.PropertyAccessor propertyAccessor = null;
try
{
propertyAccessor = this.GetPropertyAccessor();
propertyAccessor.SetProperty(propString, value);
}
I have faced this in office 2016. I believe same is also replicate in office 2019.
When I create a new email I don't see the error. Only if I open the attachment I get the error.

App crashes when Link All Assemblies enabled

I am trying to reduce app size and enabled "Link All Assemblies", but my app crashes with following error
MvvmCross.Platform.Exceptions.MvxException: Failed to construct and initialize ViewModel for type Japam.Core.ViewModels.MantraasViewModel from locator MvxDefaultViewModelLocator - check InnerException for more information
I tried
--linkskip=mvvmcross.platform.ios
--linkskip=mvvmcross.core
--linkskip=mvvmcross.platform
but no luck, kept preserve attribute at assembly level of my core pcl project.
Also added a couple of more methods in LinkerPleaseIncludefile
public void Include(MvvmCross.Platform.IoC.MvxPropertyInjection injection)
{
injection = new MvvmCross.Platform.IoC.MvxPropertyInjection();
}
public void Include(MvxDefaultViewModelLocator locator)
{
locator = new MvxDefaultViewModelLocator();
}
but no use, could somebody help me find out what is missing
MvvmCross.Platform.Exceptions.MvxException: Failed to construct and initialize ViewModel for type
Japam.Core.ViewModels.MantraasViewModel from locator
MvxDefaultViewModelLocator - check InnerException for more information
---> MvvmCross.Platform.Exceptions.MvxException: Problem creating viewModel of type MantraasViewModel --->
MvvmCross.Platform.Exceptions.MvxIoCResolveException: Failed to
construct MantraasViewModel --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
MvvmCross.Platform.Exceptions.MvxIoCResolveException: Failed to
resolve parameter for parameter sqliteConnectionFactory of type
IMvxSqliteConnectionFactory when creating
Japam.Core.Services.DataServices.MantraService
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.GetIoCParameterValues
(System.Type type, System.Reflection.ConstructorInfo firstConstructor)
[0x00036] in D:\git\MvvmCross\MvvmCross\Platform\Platform\IoC\
Finally I found the issue, it's SQLite problem so I added below three commands and it started working hope this helps someone else
--linkskip=MvvmCross.Plugins.Sqlite
--linkskip=SQLite-net
--linkskip=MvvmCross.Plugins.Sqlite.iOS
I should kept SQLite earlier it self my last project I did kept SQLite but forgot this time

Retrieving the COM class factory for component with CLSID {#####} failed due to the following error: 80080005 Server execution failed

we are attempting initialize OneNote in a C# program but have hit a significant roadblock with permissions issues regarding the COM of the CLSID. We found the appropriate ID, and set the permissions of pretty much every user on the system to have access to pretty much everything possible including Read, Full Control, and Special Permissions.
No matter what though, the error "Retrieving the COM class factory for component with CLSID {#####} failed due to the following error: 80080005 Server execution failed" still occurs.
We also tried a workaround from https://support.microsoft.com/en-us/kb/870655 to alter the Windows subkey to no avail.
At this point we have no ideas left, and would appreciate any advice/assistance offered.
Code:
"public OnenoteOcrEngine()
{
var app = this.Try(() => new Application(), e => new OcrException("Error initializing OneNote: " + e.Message, e));
this._page = this.Try(() => new OnenotePage(app), e => new OcrException("Error initializing page.", e));
}"
If it helps any we are following this tutorial here: http://www.journeyofcode.com/free-easy-ocr-c-using-onenote/

MVC WebAPI returning 500 error with no information

I've been having this problem for several days (now fixed and solution noted for anyone that comes across this issue and is pulling their hair out).
After my latest round of code changes to my Silverlight application which uses MVC4 WebAPI for data, I was having a problem with one of my HttpGet Actions which was returning IQueryable<oneofmyclasses>. Using Fiddler2 to watch the request, I could see I was getting an internal server error (500), with no body text to explain why. I received no errors thrown in my Action.
Check 1: I verified that my Action was indeed getting to the return collection.AsQueryable(); line with no errors. It was
Check 2: I verified that my data was serializing to JSON with no errors using this code (g is my collection):
var json = new JsonMediaTypeFormatter();
json.SerializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.Objects;
ObjectContent<IEnumerable<Model.MenuGroup>> responseContent = new ObjectContent<IEnumerable<Model.MenuGroup>>(g, json);
MemoryStream ms = new MemoryStream();
responseContent.CopyToAsync(ms).Wait();
ms.Position = 0;
var sr = new StreamReader(ms);
var str = sr.ReadToEnd();
This also worked. I also tested it using XML formatter even though I was pretty sure it only ever used JSON (can't be too careful).
Check 3: Enabled .Net Framework debugging. This time when the error occured (in HttpApplication.cs) VS 2012 caught it.
My error:
Despite having marked the property with these attributes,
[XmlIgnore]
[IgnoreDataMember]
[JsonIgnore]
the .Net Source was calling a get on one of my properties. The catch, it was a write-only property. I simply added
get { return null; }
and the problem was solved.
I probably should have just done Check 3 first, but my previous experience with this error has shown it to usually be an error trying to serialize my objects, which was why I had a bit of a head scratcher when they did serialize properly and the error persisted.
How I solved it:
Enabled .Net Framework debugging. Tools -> Options -> Debugging -> Check 'Enable .NET Framework source stepping'
This time when the error occured (in HttpApplication.cs) VS 2012 caught it.

Resources