Hi, I have a basic PrimalForms project that hides a mailbox in Exchange. I have PowerShell V2 installed. In the OnApplicationLoad function I have the following.
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
My form has 1 button with the following command associated with the Click event.
set-mailbox myuser_test -hiddenfromaddresslistsenabled $true -acceptmessagesonlyfrom myuser_test
When I run this from within PrimalForms it works great. When I package it to an exe and run it externally from PrimalForms it doesn't work. I receive an event log: Source MSExchange Common, event ID 106, Performance counter updating error. Does anyone know why it works in PrimalForms and not when packaged?
Packaged App fails
Packaged App fails
This could be various things such as permissions or firewall exceptions. Are you creating a 64bit or 32bit exe?
According to the MSDN there is usually an application log generated:
http://www.microsoft.com/technet/suppor ... &LCID=1033
See if you can find any related event that might shed light on the situation.
David
According to the MSDN there is usually an application log generated:
http://www.microsoft.com/technet/suppor ... &LCID=1033
See if you can find any related event that might shed light on the situation.
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- wayne_Avery
- Posts: 30
- Last visit: Tue Feb 01, 2022 2:25 pm
Packaged App fails
It is 32bit exe. Don't mind me, I came to work today with a fresh mind and realised that it is a permissions issue. I was running PrimalForms with elevated priviledge as it needs to make changes to Exchange whereas my normal account doesn't have the required access. Looks like I will need to learn more about trapping errors. Thanks for taking the time to look at it anyway.
- Alexander Riedel
- Posts: 8478
- Last visit: Tue Mar 26, 2024 8:52 am
- Been upvoted: 37 times
Packaged App fails
You can package your exe with a manifest that requires elevation.
Hope that helps.
Hope that helps.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.