START Sub send_ics(vtype,vcalendarname,vidx,vemailto,vdummy1,vdummy2,vdummy3) 'vtype : "LR", and more for future purpose if IsValidEmail(vemailto) = "True" then Dim sarrtmpstorage(10), icssql, icsrs, sstrbody, sarrvalue(5), CDOMail sstrbody = "" icssql = "" sarrvalue(0) = "False" sarrtmpstorage(0) = "hdes@inntempo.com" 'From Email Select Case vtype Case "LR" sarrtmpstorage(1) = "Leave Schedule from HDES" 'Subject icssql = "SELECT * FROM lr_hdr WHERE lrh_idx = "&savenumeric(vidx)&"" Set icsrs = conn.execute(icssql) if icsrs.EOF = "False" then sarrvalue(0) = "True" sarrvalue(1) = icsrs("lrh_leave_date_from") sarrvalue(2) = icsrs("lrh_leave_date_to") sarrvalue(3) = icsrs("lrh_for") if get_lr_reason_info(icsrs("lrh_reason"),"lrr_desc") <> "" then sarrvalue(4) = get_lr_reason_info(icsrs("lrh_reason"),"lrr_desc") else sarrvalue(4) = "Leave Request" end if end if End Select if sarrvalue(0) = "True" then sstrbody = sstrbody & "BEGIN:VCALENDAR"&chr(13)&chr(10) sstrbody = sstrbody & "VERSION:2.0"&chr(13)&chr(10) sstrbody = sstrbody & "PRODID:-//HDES//Leave Request//EN"&chr(13)&chr(10) sstrbody = sstrbody & "METHOD:REQUEST"&chr(13)&chr(10) sstrbody = sstrbody & "CALSCALE:GREGORIAN"&chr(13)&chr(10) sstrbody = sstrbody & "X-WR-CALNAME:"&vcalendarname&""&chr(13)&chr(10) sstrbody = sstrbody & "X-WR-TIMEZONE:Asia/Hong_Kong"&chr(13)&chr(10) sstrbody = sstrbody & "BEGIN:VTIMEZONE"&chr(13)&chr(10) sstrbody = sstrbody & "TZID:Asia/Hong_Kong"&chr(13)&chr(10) sstrbody = sstrbody & "X-LIC-LOCATION:Asia/Hong_Kong"&chr(13)&chr(10) sstrbody = sstrbody & "BEGIN:STANDARD"&chr(13)&chr(10) sstrbody = sstrbody & "TZOFFSETFROM:+0800"&chr(13)&chr(10) sstrbody = sstrbody & "TZOFFSETTO:+0800"&chr(13)&chr(10) sstrbody = sstrbody & "TZNAME:HKT"&chr(13)&chr(10) sstrbody = sstrbody & "DTSTART:19700101T000000"&chr(13)&chr(10) sstrbody = sstrbody & "END:STANDARD"&chr(13)&chr(10) sstrbody = sstrbody & "END:VTIMEZONE"&chr(13)&chr(10) sstrbody = sstrbody & "BEGIN:VEVENT"&chr(13)&chr(10) sstrbody = sstrbody & "DTSTAMP:"&generate_timestamp(now,"Z")&chr(13)&chr(10) sstrbody = sstrbody & "UID:"&generate_timestamp(now,"Z")&"-"&generatestring(10,1)&"@inntempo.com"&chr(13)&chr(10) sstrbody = sstrbody & "DTSTART;TZID=Asia/Hong_Kong:"&generate_timestamp(hkdateformat(extractmysqldatetime(sarrvalue(1),"date")),"")&chr(13)&chr(10) sstrbody = sstrbody & "DTEND;TZID=Asia/Hong_Kong:"&generate_timestamp(hkdateformat(extractmysqldatetime(sarrvalue(2),"date")),"")&chr(13)&chr(10) sstrbody = sstrbody & "SUMMARY:"&sarrvalue(4)&" ("&getuserinfo(sarrvalue(3),"fullname")&")"&chr(13)&chr(10) sstrbody = sstrbody & "DESCRIPTION:"&sarrvalue(4)&chr(13)&chr(10) sstrbody = sstrbody & "END:VEVENT"&chr(13)&chr(10) sstrbody = sstrbody & "END:VCALENDAR"&chr(13)&chr(10) Set CDOMail = CreateObject("CDO.Message") CDOMail.Subject = sarrtmpstorage(1) CDOMail.From = sarrtmpstorage(0) CDOMail.To = vemailto CDOMail.TextBody = sstrbody CDOMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 CDOMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPHost 'SMTP Server CDOMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Server port CDOMail.Configuration.Fields.Update CDOMail.Fields.Item ("urn:schemas:mailheader:content-type") = "text/calendar; Content-Dis; charset=utf-8;\r\nContent-Type: text/plain; charset=""utf-8""" CDOMail.Fields.Update CDOMail.Send Set CDOMail=nothing end if end if End Sub END
generate .ics file
Non-event synchronization of calendar items with external system
I'm trying to use EWS to synchronize calendars between my SharePoint-based application and Exchange.
Reading through https://msdn.microsoft.com/en-us/library/office/dn440952%28v=exchg.150%29.aspx gives me conflicting information.
Use an approach similar to notification-based synchronization. Because SyncFolderItem does not include any calendaring logic, use the EWS Managed API FindAppointments method, or the EWS FindItem operation with theCalendarView element to view appointments between two dates, and then call the EWS Managed APILoadPropertiesForItems method, or the EWS GetItem operation to retrieve the item properties for the calendar item.
Do not poll using the EWS Managed API FindAppointments method, or the EWSFindItem operation with a CalendarView element.
These two points directly oppose each other. One says to use specific EWS methods, while the other says these methods shouldn't be used.
Also, even disregarding the conflict of those two points, there's no mention of how to actually sync calendar data. The biggest issue I have is that any modifications to recurring master items remove any recurrence exceptions (both in Exchange as well as in my SharePoint!). Because of this things tend to be a real mess.
Is there a clear-cut design pattern used for periodic synchronization of calendar events between Exchange and a client application?
[Exchange-Online][EWSMA][C#] Set action is invalid for property
Hi,
I'm using Exchange (Office 365) and I have a problem with appointments that have 'corrupted' StartTimeZone properties. When I request the appointment I get the following StartTimeZone property in the response:
<t:StartTimeZone Name="" Id="��������������������������������"><t:Periods><t:Period Bias="-PT1H" Name="Standard" Id="trule:Microsoft/Registry/��������������������������������/1-Standard"/><t:Period Bias="-PT2H" Name="Daylight" Id="trule:Microsoft/Registry/��������������������������������/1-Daylight"/></t:Periods><t:TransitionsGroups><t:TransitionsGroup Id="0"><t:RecurringDayTransition><t:To Kind="Period">trule:Microsoft/Registry/��������������������������������/1-Daylight</t:To><t:TimeOffset>PT2H</t:TimeOffset><t:Month>3</t:Month><t:DayOfWeek>Sunday</t:DayOfWeek><t:Occurrence>-1</t:Occurrence></t:RecurringDayTransition><t:RecurringDayTransition><t:To Kind="Period">trule:Microsoft/Registry/��������������������������������/1-Standard</t:To><t:TimeOffset>PT3H</t:TimeOffset><t:Month>10</t:Month><t:DayOfWeek>Sunday</t:DayOfWeek><t:Occurrence>-1</t:Occurrence></t:RecurringDayTransition></t:TransitionsGroup></t:TransitionsGroups><t:Transitions><t:Transition><t:To Kind="Group">0</t:To></t:Transition></t:Transitions></t:StartTimeZone>
As you can see the StartTimeZone Id as well as some other nested properties contain null characters. I'm trying to 'fix' this appointment by settings the StartTimeZone to UTC, but when I try to update the appointment I get the error: Set action is invalid for property.
The request XML is as follows:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><t:RequestServerVersion Version="Exchange2013" /></soap:Header><soap:Body><m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToNone"><m:SavedItemFolderId><t:FolderId Id="AQMkAGEwMjNlYmM3LWUzYTEtNDllMS1iOWVjLTBlOGIxNTA0MjUwNAAuAAADtguy/eJ/vEKOus9XxaWQUAEAqTiKPVjqr0ScW5mGWLzzBQAAAgEOAAAA" ChangeKey="AQAAAA==" /></m:SavedItemFolderId><m:ItemChanges><t:ItemChange><t:ItemId Id="AAMkAGEwMjNlYmM3LWUzYTEtNDllMS1iOWVjLTBlOGIxNTA0MjUwNABGAAAAAAC2C7L94n+8Qo66z1fFpZBQBwCpOIo9WOqvRJxbmYZYvPMFAAAAAAEOAACpOIo9WOqvRJxbmYZYvPMFAADQ7y2bAAA=" ChangeKey="DwAAABYAAACpOIo9WOqvRJxbmYZYvPMFAAFCDmdE" /><t:Updates><t:SetItemField><t:FieldURI FieldURI="calendar:Start" /><t:CalendarItem><t:Start>2015-07-02T10:00:00.000Z</t:Start></t:CalendarItem></t:SetItemField><t:SetItemField><t:FieldURI FieldURI="calendar:StartTimeZone" /><t:CalendarItem><t:StartTimeZone Name="UTC" Id="UTC"><t:Periods><t:Period Bias="P0DT0H0M0.0S" Name="Standard" Id="Std" /></t:Periods><t:TransitionsGroups><t:TransitionsGroup Id="0"><t:Transition><t:To Kind="Period">Std</t:To></t:Transition></t:TransitionsGroup></t:TransitionsGroups><t:Transitions><t:Transition><t:To Kind="Group">0</t:To></t:Transition></t:Transitions></t:StartTimeZone></t:CalendarItem></t:SetItemField><t:SetItemField><t:FieldURI FieldURI="calendar:End" /><t:CalendarItem><t:End>2015-07-02T12:00:00.000Z</t:End></t:CalendarItem></t:SetItemField><t:SetItemField><t:FieldURI FieldURI="calendar:EndTimeZone" /><t:CalendarItem><t:EndTimeZone Name="UTC" Id="UTC"><t:Periods><t:Period Bias="P0DT0H0M0.0S" Name="Standard" Id="Std" /></t:Periods><t:TransitionsGroups><t:TransitionsGroup Id="0"><t:Transition><t:To Kind="Period">Std</t:To></t:Transition></t:TransitionsGroup></t:TransitionsGroups><t:Transitions><t:Transition><t:To Kind="Group">0</t:To></t:Transition></t:Transitions></t:EndTimeZone></t:CalendarItem></t:SetItemField></t:Updates></t:ItemChange></m:ItemChanges></m:UpdateItem></soap:Body></soap:Envelope>
and the following response comes back:
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="201" MinorBuildNumber="17" Version="V2_46" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></s:Header><s:Body><m:UpdateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:UpdateItemResponseMessage ResponseClass="Error"><m:MessageText>Set action is invalid for property.</m:MessageText><m:ResponseCode>ErrorInvalidPropertySet</m:ResponseCode><m:DescriptiveLinkKey>0</m:DescriptiveLinkKey><m:MessageXml><t:FieldURI FieldURI="calendar:StartTimeZone" /></m:MessageXml><m:Items /></m:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope>
How can it be that Exchange sends back an invalid StartTimeZone, and I'm unable to change it to a valid timezone?
BTW EWSEditor shows an empty value for StartTimeZone:
how to get message subject list from public folder using ews powershell
Hi
I need to get message subject list from public folder using ews Powershell then i already know to how to bind public folder but i want to know to how to use impersonation and get message subject from public folder Pls help me
Thanks
Manidurai
VB.net and Exchange
Hi
Can anyone point me in the direction of links that show how to use vb.net with MS Exchange?
I want to do things like put an appointment into a user's exchange appointments or send email to a user's exchange inbox.
i can't seem to find any helpful links.
Thanks
Roy
Roy T
401.2 Unauthorized when accessing Exchange through IIS
I am working on an ASP.NET MVC site that accesses our local Exchange 2013 server. Everything works fine on my development machine with VS 2013 + IIS Express and the db on SQL Express (on another machine).
The deployed application however throws 401.2 when accessing Exchange with the current user (SQL Server is running on the same server). This should be a problem with Kerberos delegation. Unfortunately I did not get it to work after hours of searching and configuring. So here's what I have:
- EWS Managed API V2.2
- Windows Authentication enabled in web.config and on IIS
- I use the same domain user when testing on my local machine and the webserver
IIS Configuration:
- Windows Authentication Providers: Negotiate, NTLM
- Windows Authentication Advanced Settings: Extended Protection Off, Kernel-Mode Auth DISABLED
- ASP.Net Impersonation activated on the productive webserver
- Application Pool runs as a domain user ("Contoso\roomplanner")
- "useAppPoolCredentials" in ApplicationHost.config for site = TRUE
AD configuration:
- AppPool user trusted for delegation, webserver trusted for delegation
- Added SPNs for Contoso\roomplanner: http/webserverNETBIOS; http/webserverFQDN
I followed this tutorial for Kerberos Delegation:http://blogs.msdn.com/b/chiranth/archive/2014/04/17/setting-up-kerberos-authentication-for-a-website-in-iis.aspx
Code I use to connect to Exchange:
publicvoidAuth(WebCredentials creds, bool useAutodiscover,string EWSURL =null){if(useAutodiscover){// not of interest, because I always use the EWSURL in this scenario}else{if(!String.IsNullOrEmpty(EWSURL)){
service =newExchangeService(ExchangeVersion.Exchange2013_SP1);
service.CookieContainer=newCookieContainer();
service.TraceEnabled=true;
service.Credentials= creds;// CURRENT USER in this case
service.Url=newUri(EWSURL);}else{// ERROR}}}
Here is a sample of a following operation on the Exchange:
publicList<EmailAddress>GetAllRoomAddresses(){var roomlists = service.GetRoomLists();List<EmailAddress> roomAddresses =newList<EmailAddress>();foreach(var item in roomlists){
roomAddresses.AddRange(service.GetRooms(newEmailAddress(item.Address)));}return roomAddresses;}
TL;DR: Everything works fine on my development machine. The Exchange Server however denies access, when accessing the site through a regular IIS (Double hop scenario).
Can somebody tell me how I get this to work?
Regards
chn
Trying to get EWS Code to Compile Error GetAttachments.exe does not contain a static 'Main' method suitable for an entry point_
this is the only error I get when i go to try to compile:
GetAttachments.exe does not contain a static 'Main' method suitable for an entry point
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Exchange.WebServices.Data;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.IO;
namespace GetAttachments
{
class Program
{
public void Main(string[] args, ExchangeService service, ItemId itemId)
{
service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.EnableScpLookup = false;
service.Credentials = new WebCredentials("USN", "Password", "domain");
service.TraceEnabled = true;
service.TraceFlags = TraceFlags.All;
service.Url = new Uri("https://<IP address of Exchange Server>/ews/exchange.asmx");
ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
EmailMessage message = EmailMessage.Bind(service, itemId, new PropertySet(ItemSchema.Attachments));
foreach (Attachment attachment in message.Attachments)
{
if (attachment is FileAttachment)
{
FileAttachment fileAttachment = attachment as FileAttachment;
// Load the attachment into a file.
// This call results in a GetAttachment call to EWS.
fileAttachment.Load("C:\\temp\\" + fileAttachment.Name);
Console.WriteLine("File attachment name: " + fileAttachment.Name);
}
else // Attachment is an item attachment.
{
ItemAttachment itemAttachment = attachment as ItemAttachment;
// Load attachment into memory and write out the subject.
// This does not save the file like it does with a file attachment.
// This call results in a GetAttachment call to EWS.
itemAttachment.Load();
Console.WriteLine("Item attachment name: " + itemAttachment.Name);
}
}
}
private static bool CertificateValidationCallBack(
object sender,
System.Security.Cryptography.X509Certificates.X509Certificate certificate,
System.Security.Cryptography.X509Certificates.X509Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
// If the certificate is a valid, signed certificate, return true.
if (sslPolicyErrors == System.Net.Security.SslPolicyErrors.None)
{
return true;
}
// If there are errors in the certificate chain, look at each error to determine the cause.
if ((sslPolicyErrors & System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors) != 0)
{
if (chain != null && chain.ChainStatus != null)
{
foreach (System.Security.Cryptography.X509Certificates.X509ChainStatus status in chain.ChainStatus)
{
if ((certificate.Subject == certificate.Issuer) &&
(status.Status == System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.UntrustedRoot))
{
// Self-signed certificates with an untrusted root are valid.
continue;
}
else
{
if (status.Status != System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError)
{
// If there are any other errors in the certificate
chain, the certificate is invalid,
// so the method returns false.
return false;
}
}
}
}
// When processing reaches this line, the only errors in the certificate chain are
// untrusted root errors for self-signed certificates. These certificates are valid
// for default Exchange server installations, so return true.
return true;
}
else
{
// In all other cases, return false.
return true;
}
}
}
}
public folders script
Hello,
I Want to set permission as “None” for all the users on public folders which are inactive since last 180 days.
Please do let me know if you have any poweshell script for this purpose?
[E2013] Exchange Server - Only allow meeting requests in certain times
Hi,
I am wondering how people recommend implementing either an Exchange application (or anything simpler) that requires users to only have meetings during a certain time range (Either office hours or just a general time range). If someone tries to book outside the range, it auto sends a rejection email or something similar.
Ideally, it would be before the user even can see the meeting request but I could settle for best effort (Given it is reasonable).
I am thinking of using the EWS API or any other Exchange API if it will work. I'm wondering if this is realistic since I have no Exchange programming experience.
If so, how I would approach doing this?
Get an error "Unable to access an account or mailbox" no matter using delegate access or impersonation
i am trying to access a mailbox using EWS api.
i use a global admin with application impersonate role to access the mailbox, it failed and return an error "Unable to access an account or mailbox"。
use the global admin i can access all the mailboxes but this one. I am very confused, don't know what's special about this mailbox.
I assign the global admin full access rights to this mailbox, and try to use this via powershell or EWS api to access the mailbox, it falied again.
But i can access the mailbox using its own account
Anybody know why i cannot access this mailbox using other account. I am very sure that the code i used has no problem, because it works on other mailbox.
EWS 2.2 - The attachment could not be opened
Hi All
I'm connecting to the Exchange Server 2010 SP2 from my C# application with EWS version 2.2 to download a big image attachment in my calendar item. The image size is 5,976,794 bytes as reported by fileAtt.Size property. The application throws exception:
Microsoft.Exchange.WebServices.Data.ServiceResponseException: The attachment could not be opened.
at
Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary()
at
Microsoft.Exchange.WebServices.Data.ServiceResponse.ThrowIfNecessary()
at
Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at
Microsoft.Exchange.WebServices.Data.ExchangeService.InternalGetAttachments(IEnumerable`1 attachments, Nullable`1 bodyType,IEnumerable`1 additionalProperties, ServiceErrorHandling errorHandling)
at
Microsoft.Exchange.WebServices.Data.ExchangeService.GetAttachment(Attachment attachment,Nullable `1 bodyType, IENumerable`1 additionalProperties)
at
Microsoft.Exchange.WebServices.Data.Attachment.InternalLoad(Nullable`1 bodyType, IENumerable`1 addtionalProperties)
at Microsoft.Exchange.WebServices.Data.Attachment.Load()
Here is my code to download the attachment:
service.LoadPropertiesForItems(items, PropertySet.FirstClassProperties);
foreach (Appointment a in appointments) {
string htmlBody = a.Body.Text;
foreach(Attachment att in a.Attachments) {
if (att is FileAttachment) {
FileAttachment fileAtt = att as FileAttachment;
FileStream theStream = new FileStream(String.Format(@"ANP\{0}", att.ContentId ), FileMode.OpenOrCreate, FileAccess.ReadWrite);
fileAtt.Load(theStream);
theStream.Close();
theStream.Dispose();
}
}
}
The exception is triggered by this code line: fileAtt.Load(theStream);
Do I miss something ? If the attachment is < 5 Mb, the codes run very well and I can download the attachment.
Please help.
Thank you so much.
Halomoan
EWS Managed API - How to add a group to the delegates?
Hi,
I try to add users and groups to the delegates via the EWS API. There is no problem with user but I can not add groups. How can I add groups via the EWS? Thank you for your help.
Email CollectOverMetrics.ps1 HTML Report
Exchange 2013 SP1 with 2 member DAG with 1 DB. I want to monitor the DAG using collectovermetrics.ps1. I want to have the html report from collectovermetrics.ps1 email to administrators. I know I have to have task scheduler run the command:
CollectOverMetrics.ps1 -DatabaseAvailabilityGroup DAG1 -StartTime "06/15/2012" -EndTime "06/16/2012" -GenerateHTMLReport –ShowHTMLReport
But how do I have that report emailed? I know you can use:
Send-MailMessage -To user@user.com -From user2@user.com -subject "This is a test" -Credential (Get-Credential)
But this fails with:
send-mailmessage : The email cannot be sent because no SMTP server was specified. You must specify an SMTP s using either the SmtpServer parameter or the $PSEmailServer variable. At line:1 char:1+ send-mailmessage -to user@domian.tld -from user2@domain.tld+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidArgument: (:) [Send-MailMessage], InvalidOperationException+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.SendMailMessage
Can anyone help with this?
EWS connection Office365 - System.Net.WebException - (403) Forbidden
We have an application that should connect to Office365 mailboxes and update calendar entries for selected users. The connection tests successfully but when an attempt is made to update a specific mailbox, we receive the following in our trace:
Exception: System.Net.WebException
Message: The remote server returned an error: (403) Forbidden.
Source: System
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
[3004] INFO EWSSyncCore.ExAddressBookManager DoResolve [] - Resolving user : <user email address was here>
[3004] FATAL EWSSyncCore.ExAddressBookManager DoResolve [] - Failed to Resolve the User
Exception: Microsoft.Exchange.WebServices.Data.ServiceRequestException
Message: The request failed. The remote server returned an error: (403) Forbidden.
Source: Microsoft.Exchange.WebServices
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.ResolveName(String nameToResolve, IEnumerable`1 parentFolderIds, ResolveNameSearchLocation searchScope, Boolean returnContactDetails, PropertySet contactDataPropertySet)
at EWSSyncCore.ExAddressBookManager.DoResolve(String Email, GroupwareUser& GWUserInfo)
We have confirmed that the user mailbox does exist on the server and the error occurs regardless of the user being updated so we assume that this is related to the connection itself. Other forum postings indicate that 403 can result when SSL connections are not used but we cannot find a way to confirm this is the cause in this case. Any guidance you can provide to help debug this issue would be greatly appreciated.
[E2013] [MailApps] [JS] [Windows]: window.open from a mail app fails in Chrome and Firefox but works in IE
I develop an Office Mail App which is used in Exchange 2013 On-Premises in my test lab. The mail app is hosted on IIS 8 (Windows Server 2012 R2) in the same LAN and ActiveDirectory domain.
Opening popup windows from the mail app does only work in IE, not in Chrome and Firefox.
Here are the details:
The following server and domain names are changed to hide our internal names. I adjusted the error messages accordingly.
Exchange 2013 is available at https://e13.some.dom/owa...
The app content comes from https://server.some.dom/...
Both the app and exchange server have valid SSL certicates.
Both server URLs are listed in the popup exception lists of the browsers I use.
The app generates html with an element which uses onclick to open another item in the same mailbox in a new browser window. Like so:
<a onclick="window.open('https://e13.some.dom/owa/#viewmodel=ReadMessageItem&ItemID=SomeValidID', '_blank', 'width=600,height=400');">click me</a>
Clicking that link in Internet Explorer (11.0.9600.17105; Update Versions: 11.0.7) opens a new browser window and shows the message specified with "SomeValidID". All good.
When I use Chrome (Version 34.0.1847.131 m) the popup browser window opens. I see some progress text "Starting..." and "Almost there..." and then this error:
:-(
something went wrong
Sorry, we can't get that information right now. Please try again later. If the problem continues, contact your helpdesk.
X-OWA-Error: ClientError;exMsg=Blocked a frame with origin "https://e13.some.dom" from accessing a cross-origin frame.;file=Error: Blocked a frame with origin "https://e13.some.dom" from accessing a cross-origin frame. at Error
(native) at new _a.$SQ (https://e13.some.dom/owa/prem/15.0.847.32/scripts/boot.0.mouse.js:91:301915) at Function._z.$GG.$544 (https://e13.some.dom/owa/prem/15.0.847.32/scripts/boot.0.mouse.js:91:662161) at Function.Program.main
(https://e13.some.dom/owa/prem/15.0.847.32/scripts/boot.0.mouse.js:91:663563) at invokeMain (https://e13.some.dom/owa/?bO=1:549:25) at https://e13.some.dom/owa/?bO=1:601:15:552
X-OWA-Version: 15.0.847.32
X-FEServer: E13
X-BEServer: null
Date: 1/2/1601 2:52:00 PM
Firefox 29.0 pops up the window as well. Shows "Starting..." and "Almost there..." and then this error (some text is german although the mailbox language is set to english, its basically the same error intro text like in Chrome):
:-(
Da hat etwas nicht geklappt.
Diese Informationen können wir momentan leider nicht abrufen. Bitte versuchen Sie es später noch mal. Kontaktieren Sie bitte Helpdesk, wenn das Problem weiterhin auftritt.
X-OWA-Error: ClientError;exMsg=Permission denied to access property 'popOutManager';file=_a.$SQ@https://e13.some.dom/owa/prem/15.0.847.32/scripts/boot.0.mouse.js:91_z.$GG.$544@https://e13.some.dom/owa/prem/15.0.847.32/scripts/boot.0.mouse.js:91Program.main@https://e13.some.dom/owa/prem/15.0.847.32/scripts/boot.0.mouse.js:91invokeMain@https://e13.some.dom/owa/?bO=1
X-FEServer: E13
Date: 08.05.2014 11:58:34
In Firefox I see the popOutManager-access with "permission denied", but the popup window itself was already opened.
Seems like the opened popup window tries to open another window?
When I open up a new browser window in Chrome or Firefox manually and paste the URL (https://e13.some.dom/owa/#viewmodel=ReadMessageItem&ItemID=SomeValidID) manually in the address bar the message is shown correctly, so the URL itself does not seem to be the problem.
Double clicking on messages in Chrome and Firefox opens those messages in new windows as well. So it does not seem to be a general popup problem in Chrome and Firefox as well.
Any ideas how I get the popups from my mail app working in Chrome and Firefox as well?
--
SvenC
-- SvenC
Exchange Throttling Policy not honored?
Hello,
I've configured an application to use a specific service account to access my users' mailboxes. I've created and associated a throttling policy with this service account (no limit, null values).
In reviewing the event logs, I come across an error that seems to suggest the unlimited throttling policy is not being honored.
Microsoft.Exchange.Data.Directory.SystemConfiguration.OverBudgetException: This operation exceeds the throttling budget for policy part 'CAS', budget type: 'EWS'. Suggested backoff time 27227 ms. at Microsoft.Exchange.Data.Directory.Budget.CheckOverBudget(CostType costType) at Microsoft.Exchange.Services.Core.PushSubscription.BuildNotification()
Does anyone know what (specifically) 'policy part 'CAS', budget type: 'EWS'.' is referring to?
Thanks
Joseph A Scaravilli
Routing Agent 2013 - how to reroute email to a specific IP address
I am currently working on a Custom routing agent. We are rerouting emails based on a header values etc.
When rerouting messages we are using domains and RoutingDomain, RoutingOverrideclasses. At the end, we are calling SetRoutingOverride method.
I have to filter out certain messages and reroute them to a specific IP address, but I am not sure how to implement this.
Is there an API for rerouting to IP addresses or should I try to resolve IP with the dns resolve and then use that domain with the existing API ?
EWS client built for Exchange 2007 no longer working since moving to Exchange 2013
Hello,
I have an EWS client built in JAVA which calls the GetUserAvailability and CreateItem operations. SOAP requests are sent over HTTPS. A service account is supplied which satisfies authentication challenges.
The client was built against Exchange Server 2007. Now the infrastructure is moving to Exchange 2013. Initially testing has surfaced an issue connecting and fetching FREEBUSY data from Exchange 2013.
Exchange 2013 returns a 400 exception when I attempt to fetch FREEBUSY data for an existing mailbox. The same client returns data when pointed against the 2007 server.
Can someone advise if the SOAP request for Exchange 2013 requires some additional header information ( compared to 2007 request)?
Including a copy of the request i send incase someone sees something which i should change
<?xml version="1.0" encoding="utf-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"><TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types"><Bias>0</Bias><StandardTime><Bias>0</Bias><Time>01:00:00</Time><DayOrder>4</DayOrder><Month>10</Month><DayOfWeek>Sunday</DayOfWeek></StandardTime><DaylightTime><Bias>0</Bias><Time>01:00:00</Time><DayOrder>4</DayOrder><Month>3</Month><DayOfWeek>Sunday</DayOfWeek></DaylightTime></TimeZone><MailboxDataArray><MailboxData xmlns="http://schemas.microsoft.com/exchange/services/2006/types"><Email><Name/><Address>adress@example.com</Address><RoutingType>SMTP</RoutingType></Email><AttendeeType>Required</AttendeeType><ExcludeConflicts>false</ExcludeConflicts></MailboxData></MailboxDataArray><FreeBusyViewOptions xmlns="http://schemas.microsoft.com/exchange/services/2006/types"><TimeWindow><StartTime>2015-08-29T14:00:00.000Z</StartTime><EndTime>2015-08-29T16:00:00.000Z</EndTime></TimeWindow><MergedFreeBusyIntervalInMinutes>30</MergedFreeBusyIntervalInMinutes><RequestedView>FreeBusy</RequestedView></FreeBusyViewOptions></GetUserAvailabilityRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
Exchange server 2010
Good afternoon everyone,
So in our environment we have our domain running on SBS2011 and that is hosting Exchange Server 2010. We are wanting to create a new domain with Server2008R2. I am wanting to know how to migrate the Exchange Server 2010 to the new domain. Can anyone help me?
How to create and get shared folders for calendars
Hi,
I am trying to create a sample calendar there we have a three types of folders for calendars one is My calendars and other two are shared and other calendars folders. I am trying to create and get those folders and i am able to create and get"my calendars". with the help of following link
https://msdn.microsoft.com/en-us/library/office/dd633637(v=exchg.80).aspx
But i am not able to create and get remaining two types of folders i.e., "Shared" and "Other Calendars". How can i get those folders. Any help is appreciated.
Thanks in advance.