Quantcast
Channel: Exchange Server Development forum
Viewing all 7132 articles
Browse latest View live

Office 365 - EWS Managed API 2.0 Impersonation 401 unauthorized/503 not available.

$
0
0
private ExchangeService connectToEWS(string email, bool impersonate = false) {
   WebCredentials credentials = new WebCredentials(username, password, domain);
   ExchangeVersion version = (ExchangeVersion)exchangeVersion;
   ExchangeService service = new ExchangeService(version) {
      Credentials = credentials,
      Url = new Uri("https://outlook.office365.com/ews/exchange.asmx")
   };
   if (impersonate) {
      service.HttpHeaders.Add("X-AnchorMailbox", email);
      service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, email);				         service.CookieContainer = new CookieContainer();
   }
   service.Timeout = int.MaxValue;
}

Using the code above as well as 

ExchangeService service = connectToEWS(email, true);
FolderId msgFolderRoot = WellKnownFolderName.MsgFolderRoot;
FolderView view = new FolderView(int.MaxValue);
view.PropertySet = PropertySet.IdOnly;
var result = service.FindFolders(msgFolderRoot, view);

I receive a 401 unauthorized exception on the FindFolders call. If I use the other constructor of WebCredentials that takes only the smtp and password, I get a 503 server not available exception. When I do not use impersonation (delegate access instead), no exceptions are thrown and I can get the list of folders however I need to be able to support impersonation.

I have added ApplicationImpersonation role to the service account (username in the first code block). Is there another role required for impersonation? I can not find anything in the EWS impersonation documentation. Every other thread about this issue points to the UPN usage rather than smtp but I am fairly sure this smtp is the same as the UPN. I don't actually know where to look within o365 however.



Update appointment body via EWS with powershell

$
0
0

How to update appointment message body via EWS in powershell? I can find appointment through $service.FindAppointments but I can't get body message. Please help!

My code:

Import-Module "C:\Program Files (x86)\Microsoft\Exchange\Web Services\2.1\Microsoft.Exchange.WebServices.dll"

$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1)

$creds = New-Object System.Net.NetworkCredential('login','pass')
$service.Credentials = $creds

foreach ($Mailbox in $Mailboxes) {

$service.AutodiscoverUrl($Mailbox.PrimarySMTPAddress.tostring())
$service.ImpersonatedUserId = New-Object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,$Mailbox.PrimarySMTPAddress.tostring())
$folderid = [Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Calendar
$findItems = $service.FindAppointments($folderid,(New-Object Microsoft.Exchange.WebServices.Data.CalendarView($StartTime,$EndTime)))

}

And:
1. how to get body?
2. how to modify body and save changes in source appointment?



[ExchangeOnline][Powershell]Problem removing calendar permissions for a deleted user in office 365

$
0
0

I asked this question in the Powershell subreddit today but am trying to get closer to people who specialize in this area. Please move if I didn't pick the appropriate forum.

I have a user Suzie who gave user Anita reviewer permission on her calendar (not their real names). Anita subsequently left and her Office 365 mailbox was deleted before removing permissions from Suzie's calendar. Now when I try to change or remove her permissions, I get this error:

Remove-MailboxFolderPermission -identity sjames -user aclark -confirm:$false

There is no existing permission entry found for user: aclark.
    + CategoryInfo          : NotSpecified: (:) [Remove-MailboxFolderPermission],
      UserNotFoundInPermissionEntryException

The help for Remove-MailboxFolderPermission says the User parameter can be any of

Name
Display name
Alias
Distinguished name (DN)
Canonical DN
Email address
GUID

I've tried all forms of Anita's name and email address. I even cobbled together the DN format of her name. All give the above error or ones like below:

The user "aclark@company.com" is either not valid SMTP address, or there is no matching information.+ CategoryInfo          : NotSpecified: (:) [Remove-MailboxFolderPermission],
       InvalidExternalUserIdException

There is still an MsolUser record for Anita, but it seems to be trying to validate the name against mailbox info which is gone. It doesn't show a DN or CN format or a GUID.

Does anybody know of any other way to delete the entry?

VbScript to send email by using Exchange without Outlook or SMTP Server.

$
0
0

Hi everyone,

I need to construct a VBSCRIPT that should be executed at Login time, and that send an email to external domain using the user mailbox. The user(s) doesn't have Outlook installed on his workstation, but OWA, and can't use the SMTP Server due relay restrictions. Also, I don't want the user insert his credentials again after login when the script executes, for don't compromise them. I've been trying to follow this article: https://msdn.microsoft.com/en-us/library/aa494235(v=exchg.80).aspx but it seems it was written for Exchange 2007. I have been using both DSQUERY and ADSI Edit tools for locating the mailbox URL but I haven't been able to get it. Could you please let me know how can I get the mailbox URL of an specific user in Exchange 2012, better using Active Directory, or how can I  get the User Credentials after login, in such a way they can be used for sending authenticated emails to outside?. 

Thank you in advance.

Windows Server 2012 R2 change from GUI to Core and exchange's OWA and ECP is not working. PC in the same network can access email send/receive no issue but only OWA and ECP having issue. Please Help.

$
0
0
Windows Server 2012 R2 change from GUI to Core and exchange's OWA and ECP is not working. PC in the same network can access email send/receive no issue but only OWA and ECP having issue. Please Help. i tried to recover the GUI interface using add-windowsfeature Server-Gui-Mgmt-Infra and it installed successfully before restart, once restart it will show Failure configuring windows features, reverting changes. then it shows Core version again.

[EWS M-API / Powershell] Creating an IEnumerable type

$
0
0
In the EWS Managed API, several methods of ExchangeService use an IEnumerable generic type to pass ItemIds as a parameter.    Here's the C# syntax for the DeleteItems method:

public
ServiceResponseCollection<ServiceResponse> DeleteItems (
    IEnumerable<ItemId> itemIds,
    DeleteMode deleteMode,
    Nullable<SendCancellationsMode> sendCancellationsMode,
    Nullable<AffectedTaskOccurrence> affectedTaskOccurrences
)

I am trying to create a pure PowerShell 2.0 script that uses the DeleteItems method.   When I pass a simple array of ItemIds to the DeleteItems method, I receive this error:

Cannot convert argument "0", with value: "System.Object[]", for "DeleteItems" to type "System.Collections.Generic.IEnumerable`1[Microsoft.Exchange.WebServices.Data.ItemId]": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Collections.Generic.IEnumerable`1[Microsoft.Exchange.WebServices.Data.ItemId]"."
At C:\ews\managedapi\purge_folders1.ps1:103 char:21
+ $service.DeleteItems <<<< ($itemids,$mewd.DeleteMode::HardDelete,$null,$null)
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

The error appears to indicate the exact type (in bold) that I need to use in PowerShell for the ItemIds parameter.

There are a number of ways to create a generic type in Powershell.  One of the simplest uses this function:

function TypeOf-Generic ([type] $base) {
  $base.MakeGenericType($args)
}

Using this function appears to create the desired type, but PowerShell complains that an assembly is not loaded:

PS C:\> $a = new-object (TypeOf-Generic System.Collections.Generic.IEnumerable``1 ([Microsoft.Exchange.WebServices.Data.ItemId]))

New-Object : Cannot find type [System.Collections.Generic.IEnumerable`1[[Microsoft.Exchange.WebServices.Data.ItemId, Microsoft.Exchange.WebServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]: make sure the assembly containing this type is loaded.
At line:1 char:16
+ $a = new-object <<<<  (TypeOf-Generic System.Collections.Generic.IEnumerable``1 ([Microsoft.Exchange.WebServices.Data.ItemId]))
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

Both the Microsoft.Exchange.WebServices and mscorlib assemblies are in fact loaded:

PS C:\> [AppDomain]::CurrentDomain.GetAssemblies()

GAC    Version        Location
---    -------        --------
True   v2.0.50727     C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
...
False  v2.0.50727     c:\ews\util\Microsoft.Exchange.WebServices.dll

--
Gary W. MacDonald

Active directory synchronization with remote domain controller “with using extend ASP”

$
0
0


Hello

I believe you know well about extend ASP tool

Just brief information about my infra, I need to sync remote domain controller with my host domain controller

I’m using ‘Extend ASP’ web site Panel and i need to sync customer domain controller

I complete all configuration as per deployment guide provided by Extend ASP

after complete all configuration I’m try to run “ExtendASP.EPS.ProvisioningManager.Client.exe” for Verify Workflow Engine Functionality but in this scenario I received error

now I checked all required services is running and not at all error event  in application and administrative event in windows event viewer

I’m struggling with this issue Please help me on this issue

I appreciate if you share any valuable  point or step for kill this issue

Thanks for understanding

Regards

Girish Bakshi


Girish Bakshi | MCITP: 2007 | MCTS: 2010, MCITP: Server 2008 | E-Mail girish.bakshi84@gmail.com

Microsoft Exchange 2016 on 2012 R2 / IMAP synchro problem

$
0
0

Good day.

I recently installed Microsoft Exchange 2016 over Windows Server 2012 R2.

IMAP4 , POP3 services are on.

I created an email account on Exchange and i tried to move my 5000 emails from local pst to the Exchange Account over IMAP.

(Windows 10 Professional x64, Microsoft Outlook 2013 x32 , one account local and a second account with IMAP to this Exchange Server.)

I copied the files from Inbox of my local account to IMAP account (copy function of outlook 2013). The target files appeared correctly to the IMAP view of Outlook Client, but the Microsoft Exchange Server 2016 stopped to synchronize the files, with the "Microsoft Exchange Notification Broker" Service stopped. I tried to restart the service and for some seconds, some emails synchronized and then the same service stopped. And this goes on all over again. This event make the transfer of 5000 emails impossible. Any ideas ???


[E2013] [TA] [C#] [Windows]: Error installing transport agent on Exchange 2013

$
0
0

Hi,

Pretty new to Exchange Development and I'm trying to install the transport agent from this blog: https://blogs.technet.microsoft.com/appssrv/2009/08/26/how-to-control-routing-from-your-own-routing-agent/ but not having any luck.

The error I get is:

The TransportAgentFactory type "RoutingAgentOverride.SampleRoutingAgentFactory" doesn't exist. The
TransportAgentFactory type must be the Microsoft .NET class type of the transport agent factory.
Parameter name: TransportAgentFactory
    + CategoryInfo          : InvalidArgument: (:) [Install-TransportAgent], ArgumentException
    + FullyQualifiedErrorId : [Server=QA-EXCH13-01,RequestId=86424b9f-edc1-4b6b-8450-a497b08c899c,TimeStamp=13/11/2016
    11:22:47] [FailureCategory=Cmdlet-ArgumentException] 2C8C2427,Microsoft.Exchange.Management.AgentTasks.InstallTra
  nsportAgent

The command I'm using is:

Install-TransportAgent -Name "RoutingAgent" -AssemblyPath "C:\RoutingAgentOverride.dll" -TransportAgentFactory "RoutingAgentOverride.SampleRoutingAgentFactory"

The top part of the code as per the blog:

namespace RoutingAgentOverride
{
    public class SampleRoutingAgentFactory : RoutingAgentFactory
        {
            public override RoutingAgent CreateAgent(SmtpServer server)
            {
                RoutingAgent myAgent = new ownRoutingAgent();
                return myAgent;
            }
        }

So I think I've got the command right and testing out the installation on a Exchange 2016 server it sucessfully installed, however on my Exchange 2013 CU14 server it does not.  I am using the same versions of the Microsoft.Exchange.Data.Transport.dll and Microsoft.Exchange.Data.Common.dll that come with Exchange 2013 CU14

I tried the fixit script in https://support.microsoft.com/en-us/kb/2938053 but that made no difference.

Is anybody able to suggest anything that I can do to get the transport agent installed on my Exchange 2013 box?


Install Exchange 2016 on Windows server 2012 r2

$
0
0

Will someone please chime in on what is up with this?

This is a server 2012 r2 std, exchange 2016 install... it is not a DC, (The DC is a 2016 std)...

The install gets to

Step 1 of 5: Mailbox Role: Mailbox  Service

plz help me

Error:
The following error was generated when "$error.Clear();
          if (!$RoleIsDatacenter -and !$RoleIsDatacenterDedicated)
          {
            $createNewOab = $false;
            $oabName = $null;
            $oabAddressList = $null;
            $oabVdirs = $null;
            $oabGlobalWebDistribution = $false;
            $oabConfiguredAttributes = $null;

            Write-ExchangeSetupLog -Info ("Looking for an existing default OAB");
            $defaultOab = Get-OfflineAddressBook -DomainController:$RoleDomainController | where {$_.IsDefault};
            if ($defaultOab -ne $null)
            {
              Write-ExchangeSetupLog -Info ("Found a default OAB: " + $defaultOab.Name + "; checking its version");
              if ($defaultOab.ExchangeVersion.CompareTo([Microsoft.Exchange.Data.ExchangeObjectVersion]::Exchange2012) -lt 0)
              {
                $e15Oab = Get-OfflineAddressBook -DomainController:$RoleDomainController | where {$_.ExchangeVersion.CompareTo([Microsoft.Exchange.Data.ExchangeObjectVersion]::Exchange2012) -eq 0};
                if ($e15Oab -eq $null)
                {
                  Write-ExchangeSetupLog -Info ("Existing OAB is Exchange 2010 or older; will create a new OAB");
                  $createNewOab = $true;
                  $oabName = $defaultOab.Name + " (Ex2013)";
                  $oabAddressList = $defaultOab.AddressLists;
                  $oabGlobalWebDistribution = $defaultOab.GlobalWebDistributionEnabled;
                  $oabConfiguredAttributes = $defaultOab.ConfiguredAttributes;
                }
                else
                {
                  Write-ExchangeSetupLog -Info ("Already has an existing Exchange 2013 OAB:" + $e15Oab.Name + "; will not create a new OAB");
                }
              }
              else
              {
                Write-ExchangeSetupLog -Info ("Existing OAB is Exchange 2013 or newer; will not create a new OAB");
              }
            }
            else
            {
              Write-ExchangeSetupLog -Info ("Did not find a default OAB; will create one");
              $createNewOab = $true;

              $oabName = [Microsoft.Exchange.Data.Directory.SystemConfiguration.OfflineAddressBook]::DefaultName;
              $nonDefaultOabWithDefaultName = Get-OfflineAddressBook $oabName -DomainController:$RoleDomainController -ErrorAction SilentlyContinue | where {$_.IsDefault -eq $false};
              if ($nonDefaultOabWithDefaultName -ne $null)
              {
                $createNewOab = $false;
                Write-ExchangeSetupLog -Warning `
                  ("Offline address book " + `
                  $nonDefaultOabWithDefaultName.Name + `
                  " already exists: " + `
                  $nonDefaultOabWithDefaultName.DistinguishedName + `
                  ". Use administrative tools to change it to default OAB.");
              }

              $allGals = @(Get-GlobalAddressList -DomainController:$RoleDomainController | where {$_.IsDefaultGlobalAddressList});
              if ($allGals -eq $null -or $allGals.Count -eq 0)
              {
                $createNewOab = $false;
                Write-ExchangeSetupLog -Warning `
                  ("Couldn't find the default global address list. The default offline address book can't be created.");
              }
              elseif ($allGals.Count -gt 1)
              {
                $createNewOab = $false;
                Write-ExchangeSetupLog -Warning `
                  ("Found " + $allGals.Count + " default global address lists. You can have only one default global address list in your organization. The default offline address book will not be created.");
              }
              else
              {
                $oabAddressList = $allGals[0];
                Write-ExchangeSetupLog -Info ("OAB will be based on default GAL: " + $oabAddressList.Name);
              }
            }

            if ($createNewOab)
            {
              if ($oabGlobalWebDistribution -eq $false)
              {
                $currentAdSiteDn = (Get-ExchangeServer $RoleFqdnOrName -DomainController:$RoleDomainController).Site.DistinguishedName;
                $allOabVdirs = @(Get-OabVirtualDirectory -ADPropertiesOnly -DomainController:$RoleDomainController);
                $e15MinimumServerVersion = New-Object Microsoft.Exchange.Data.ServerVersion([Microsoft.Exchange.Data.Directory.SystemConfiguration.Server]::E15MinVersion);
                if ($allOabVdirs -ne $null -and $allOabVdirs.Count -gt 0)
                {
                  foreach ($oabVdir in $allOabVdirs)
                  {
                    if ([Microsoft.Exchange.Data.ServerVersion]::Compare($oabVdir.AdminDisplayVersion, $e15MinimumServerVersion) -gt 0)
                    {
                      $oabVdirSiteDn = (Get-ExchangeServer $oabVdir.Server -DomainController:$RoleDomainController).Site.DistinguishedName;
                      if ($oabVdirSiteDn -eq $currentAdSiteDn)
                      {
                        $oabVdirs = $oabVdir;
                        break;
                      }
                      elseif ($oabVdirs -eq $null)
                      {
                        $oabVdirs = $oabVdir;
                      }
                    }
                  }
                }

                if ($oabVdirs -ne $null)
                {
                  Write-ExchangeSetupLog -Info ("OAB will be distributed to OAB virtual directory " + $oabVdirs.Name);
                }
                else
                {
                  Write-ExchangeSetupLog -Info ("Could not find any OAB virtual directories; OAB will be configured without distribution.");
                }
              }

              try
              {
                Write-ExchangeSetupLog -Info ("Creating new default OAB.");
                $newOab = New-OfflineAddressBook `
                  -Name $oabName `
                  -AddressLists $oabAddressList `
                  -VirtualDirectories $oabVdirs `
                  -GlobalWebDistributionEnabled $oabGlobalWebDistribution `
                  -IsDefault $true `
                  -DomainController:$RoleDomainController;
              }
              catch [Microsoft.Exchange.Data.Directory.ADObjectAlreadyExistsException]
              {
                Write-ExchangeSetupLog -Warning ("Tried to create new default OAB but the object already exists; it may have been created by another instance of setup.");
              }

              if ($oabConfiguredAttributes -ne $null)
              {
                Write-ExchangeSetupLog -Info ("Setting OAB ConfiguredAttributes to: " + $oabConfiguredAttributes);
                Set-OfflineAddressBook $newOab -ConfiguredAttributes $oabConfiguredAttributes -DomainController:$RoleDomainController;
              }
            }
          }
        " was run: "Microsoft.Exchange.Data.DataValidationException: Database is mandatory on UserMailbox.
   at Microsoft.Exchange.Data.Directory.ADDataSession.ObjectsFromEntries[TResult](SearchResultEntryCollection entries, String originatingServerName, IEnumerable`1 properties, ADRawEntry dummyInstance)
   at Microsoft.Exchange.Data.Directory.ADGenericPagedReader`1.GetNextPage()
   at Microsoft.Exchange.Data.Directory.ADGenericPagedReader`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Exchange.Data.Directory.Recipient.ADRecipientObjectSession.FindOrganizationMailboxByCapability(OrganizationCapability capability, QueryFilter optionalFilter)
   at Microsoft.Exchange.Data.Storage.OrganizationMailbox.InternalGetOrganizationMailboxesByCapability(IRecipientSession session, OrganizationCapability capability, QueryFilter optionalFilter)
   at Microsoft.Exchange.ProvisioningAgent.NewOfflineAddressbookProvisioningHandler.FindGeneratingMailbox(String domainController, OrganizationId orgId)
   at Microsoft.Exchange.ProvisioningAgent.NewOfflineAddressbookProvisioningHandler.ProvisionDefaultProperties(IConfigurable readOnlyIConfigurable)
   at Microsoft.Exchange.Provisioning.ProvisioningLayer.ProvisionDefaultPropertiesImpl(Task task, IConfigurable temporaryObject, IConfigurable dataObject, Boolean checkProvisioningLayerAvailability)
   at Microsoft.Exchange.Provisioning.ProvisioningLayer.ProvisionDefaultProperties(Task task, IConfigurable temporaryObject, IConfigurable dataObject, Boolean checkProvisioningLayerAvailability)
   at Microsoft.Exchange.Configuration.Tasks.NewTaskBase`1.InternalStateReset()
   at Microsoft.Exchange.Configuration.Tasks.NewTenantADTaskBase`1.InternalStateReset()
   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()
   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

              

DAG Replication issue: Database copy is "failed and suspended'; it is not keeping up with the changes on the active database copy

$
0
0
Hi there,

I want some help with a query, let me try to give synopsis of our environment first:

We've our Exchange environment (v. 2010) spread across two separate DCs (DC1 & DC2) - with 8 MBX servers; 4 at each site.

We've a DAG which is also spread across both DCs; we've at least two copies of database (active/passive) across each site.

Recently, due to some issue some passive database copies in second DC failed replication and threw an error "Database copy is "failed and suspended"; it is not keeping up with the changes on the active database copy".

As per the recommendation on technet.microsoft.com, we should reseed the database either through EMC by performing "Update database..." or, running cmdlets via EMS. (https://technet.microsoft.com/en-us/library/ff359982(v=exchg.140).aspx) 

I performed this action on one database and after the process was complete, it came up and status was "Healthy".

However, as per my senior, I shouldn't have done it and should have gone simply for "Resume database..." instead of "Update database..." which involves reseeding.

He even did perform "Resume database..." on another failed database & issue was fixed.

Resume was much quicker than Update, which seems obvious, however my confusion is that "Why shouldn't have I done reseeding?" I was told not to do it again in future.

It has confused me ever since, so I want someone to help me with some clarification.

Thanks,

E2013 TA C# Windows: How do I use a configuration file with a TA

$
0
0

Hello,

I'm building a transport agent for Exchange 2013 and I would like to use a configuration file for this agent.

I do not want to read the configuration file each time a TA is created in order to avoid the IO and time needed, is there a way to have it memory for all instances of the agent?

Thanks in advance,

Christos

Remove duplicate entries in public folders

$
0
0

Hello guys,

I got an important task from one of our customers:

He wants me to run through all public folders (I guess something like 60.000 or more / around 500 GB) in Exchange 2010 and remove the duplicate folders, mails, calendars and contacts.

As far as I know is there no official third party tool.

Can someone help me with a small script oder a few ideas to accomplish the task?

Thanks in advance,

Benjamin


Out of Office web service

$
0
0

Hi,

my question was forwarded into this forum.

I was thinking about the following: Is it possible to get the "out of office" status from an external platform (for example SharePoint Online). In the other forum there was EWS mentioned but I''m not sure if this works from client side (meaning things like SharePoint Designer or so..).

Maybe someone here has a good guess? :-) 

Best regards,

André

How to delete / cancel the appointment date in outlook calendar in Exchange server - Please help

$
0
0

The following code I used for creating  the appointment in C# . Please can you help me  to write the code how to delete / cancel the appointment for the given date ,   from the following code

private void button2_Click(object sender, EventArgs e)
{
try
{

ExchangeService service = new ExchangeService();
string username = mycompany+ "\\" + "usersid";
service.Credentials = new WebCredentials(username, "myusername"); 
service.AutodiscoverUrl("myname@mycompany.com");
Appointment appointment = new Appointment(service);
appointment.Subject = "Testing Holiday";
appointment.Start = DateTime.Now;
appointment.End = appointment.Start.AddHours(1);
appointment.Save();
}

catch (Exception ex)
{

console.writeline("following error occurred: " + ex.Message);
}
}


polachan


How to store appointment id or itemid and then later how can I use to delete the appointment by using the itemid using C#

$
0
0

private void button2_Click(object sender, EventArgs e)
{
try
{

ExchangeService service = new ExchangeService();
string username = mycompany+ "\\" + "usersid";
service.Credentials = new WebCredentials(username, "myusername"); 
service.AutodiscoverUrl("myname@mycompany.com");
Appointment appointment = new Appointment(service);
appointment.Subject = "Testing Holiday";
appointment.Start = DateTime.Now;
appointment.End = appointment.Start.AddHours(1);
appointment.Save();
}

catch (Exception ex)
{

console.writeline("following error occurred: " + ex.Message);
}
}

How to store appointment id or itemid and then later how can I use to delete the appointment by using the itemid  . Please give an example to write the code in C#


polachan

Exchange 2013 Installation Problem

$
0
0

Hi ,

while running Exchange 2013 installation  getting below error ,All the error are pasted below

Even I have tried after temp data delete

Suggestion will appriciated ,


(C:\Users\ADMINI~1.TNT\AppData\Local\Temp\UcmaRuntimeSetup\Chains\SpeechPlatformRuntime.msi) Installation failed. Msi Log: Microsoft Unified Communications Managed API 4.0, Runtime_20130427_130955413-MSI_SpeechPlatformRuntime.msi.txt
 PerformOperation was aborted


Action complete

 OnFailureBehavior for this item is to Rollback.

Action complete

 Final Result: Installation failed with error code: (0x80091007), "The hash value is not correct. " (Elapsed time: 0 00:00:37).
 WM_ACTIVATEAPP: Focus stealer's windows WAS visible, NOT taking back focus

===================================================

Setups Logs :--

[Duration:00:00:04.9921681]
[04/26/2013 09:34:25.0472] [1] Finished [Rule:RPCOverHTTPproxyNotInstalled] [Duration:00:00:04.9921681]
[04/26/2013 09:34:25.0472] [1] Evaluated [Setting:IsServerGuiMgmtInfraInstalled] [HasException:False] [Value:"True"] [ParentValue:"<NULL>"] [Thread:66] [Duration:00:00:03.4776664]
[04/26/2013 09:34:25.0472] [1] Finished [Setting:IsServerGuiMgmtInfraInstalled] [Duration:00:00:03.4776664]
[04/26/2013 09:34:25.0472] [1] Evaluated [Rule:ServerGuiMgmtInfraNotInstalled] [HasException:False] [Value:"False"] [ParentValue:"<NULL>"] [Thread:66] [Duration:00:00:04.9921681]
[04/26/2013 09:34:25.0472] [1] Finished [Rule:ServerGuiMgmtInfraNotInstalled] [Duration:00:00:04.9921681]
[04/26/2013 09:34:25.0472] [1] Evaluated [Setting:IsWcfHttpActivation45Installed] [HasException:False] [Value:"True"] [ParentValue:"<NULL>"] [Thread:62] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Finished [Setting:IsWcfHttpActivation45Installed] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Evaluated [Rule:WcfHttpActivation45Installed] [HasException:False] [Value:"False"] [ParentValue:"<NULL>"] [Thread:62] [Duration:00:00:05.0195746]
[04/26/2013 09:34:25.0472] [1] Finished [Rule:WcfHttpActivation45Installed] [Duration:00:00:05.0195746]
[04/26/2013 09:34:25.0472] [1] Evaluated [Setting:IsWebMgmtConsoleInstalled] [HasException:False] [Value:"True"] [ParentValue:"<NULL>"] [Thread:54] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Finished [Setting:IsWebMgmtConsoleInstalled] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Evaluated [Rule:WebMgmtConsoleNotInstalled] [HasException:False] [Value:"False"] [ParentValue:"<NULL>"] [Thread:54] [Duration:00:00:05.0035554]
[04/26/2013 09:34:25.0472] [1] Finished [Rule:WebMgmtConsoleNotInstalled] [Duration:00:00:05.0035554]
[04/26/2013 09:34:25.0472] [1] Evaluated [Setting:IsNETFramework45FeaturesInstalled] [HasException:False] [Value:"True"] [ParentValue:"<NULL>"] [Thread:51] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Finished [Setting:IsNETFramework45FeaturesInstalled] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Evaluated [Rule:NETFramework45FeaturesNotInstalled] [HasException:False] [Value:"False"] [ParentValue:"<NULL>"] [Thread:51] [Duration:00:00:05.0035554]
[04/26/2013 09:34:25.0472] [1] Finished [Rule:NETFramework45FeaturesNotInstalled] [Duration:00:00:05.0035554]
[04/26/2013 09:34:25.0472] [1] Evaluated [Setting:IsWebNetExt45Installed] [HasException:False] [Value:"True"] [ParentValue:"<NULL>"] [Thread:50] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Finished [Setting:IsWebNetExt45Installed] [Duration:00:00:03.4316688]
[04/26/2013 09:34:25.0472] [1] Evaluated [Rule:WebNetExt45NotInstalled] [HasException:False] [Value:"False"] [ParentValue:"<NULL>"] [Thread:50] [Duration:00:00:05.0035554]
[04/26/2013 09:34:25.0472] [1] Finished [Rule:WebNetExt45NotInstalled] [Duration:00:00:05.0035554]
[04/26/2013 09:34:33.0468] [1] Evaluated [Setting:PrimaryDNSPortAvailable] [HasException:False] [Value:"True"] [ParentValue:"<NULL>"] [Thread:42] [Duration:00:00:13.3314020]
[04/26/2013 09:34:33.0468] [1] Finished [Setting:PrimaryDNSPortAvailable] [Duration:00:00:13.3314020]
[04/26/2013 09:34:33.0468] [1] Evaluated [Rule:PrimaryDNSTestFailed] [HasException:False] [Value:"False"] [ParentValue:"<NULL>"] [Thread:42] [Duration:00:00:13.3314020]
[04/26/2013 09:34:33.0468] [1] Finished [Rule:PrimaryDNSTestFailed] [Duration:00:00:13.3314020]
[04/26/2013 09:34:33.0477] [1] Finished [Analysis:Prereq] [Duration:00:00:13.4369527]
[04/26/2013 09:34:33.0477] [1] Failed [Rule:UcmaRedistMsi] [Message:This computer requires the Microsoft Unified Communications Managed API 4.0, Core Runtime 64-bit. Please install the software fromhttp://go.microsoft.com/fwlink/?LinkId=260990.]
[04/26/2013 09:34:33.0491] [1] [REQUIRED] This computer requires the Microsoft Unified Communications Managed API 4.0, Core Runtime 64-bit. Please install the software fromhttp://go.microsoft.com/fwlink/?LinkId=260990.
[04/26/2013 09:34:33.0515] [1] Help URL: http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.UcmaRedistMsi.aspx
[04/26/2013 09:34:33.0538] [1] Ending processing test-SetupPrerequisites
[04/27/2013 07:01:05.0308] [0] The registry key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\V15\Setup, wasn't found.
[04/27/2013 07:01:05.0342] [0] End of Setup
[04/27/2013 07:01:05.0342] [0] **********************************************

Have a method to deploy Exchange Transport Agent that will only affect some special user.

$
0
0

I write an exchange transport agent, and want to deploy for test. for security reason, i want let the agent just process emails that send or received by a part of users. 

e.g. my environment is Exchange 2013.  I have three Mailbox Servers.

MBS 1 (hosted user: user10, user11,user12)

MBS 2(hosted user: user20, user21, user22)

MBS 3(hosted user: user30, user31, user32)

i want let the agent just process emails that send or received by user10, user11, user12. so I just installed the transport agent in MBS 1.

but the result seems there are some email send or received by user10, user11, user12 that didn't processed by my agent.

is there a method to deploy Exchange Transport Agent to only affect a part of users ?

Outlook bi-directional Sync

$
0
0

Hi,

We are planning to implement Outlook calendar  bi-directional sync for in one of out application using EWS SOAP services . It should sync appointments from outlook for thousands of users using batch job. Here is the approach we through of.

1. Using SyncFolderItem we would like to get calendar items in batches (25-50 per batch) for each user and call GetItem to retrieve Data.

Is it the correct approach?

I looked at Subscriptions functionality in bulk upload, looks like it will be best suited for individual user  sync and not for bulk users sync. did any one implement subscriptions for processing sync for thousands of accounts.


Performance comparison SyncFolderItems vs. FindItem in EWS

$
0
0

There are two ways to get changes from Exchange using EWS API:

  1. Use SyncFolderItems to get a list of changed items
  2. Use FindItem to get a list of changed items (filtered by modify time)

My use case is not the typical mobile sync email situation. I just want to quickly scan mailboxes and find new items since last scan (so I don't care about changed items, read status, deleted items, ..).

Since many mailboxes need to be scanned, performance is a major consideration. I thought that SyncFolderItems would be more efficient as it only works on 'changes'. However, from my testing with large mailboxes/folders (for example, 20000+ items in folders, with 200 new items each folder), it appears that the performance of SyncFolderItems and FindItem are the same. 

I'm inclined to use FindItem based on the testing result, as this approach is simpler and no need to maintain the Sync State information for SyncFolderItems. I'm wondering if Microsoft or someone can help to confirm this finding, or are there some other considerations? Thanks!

Viewing all 7132 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>