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

ConnectFailure (Connection timed out)

$
0
0

I've written a client in c# which uses EWS Managed API to communicate with Exchange Server.

After couple of hours of run, it starts giving weird issues. The response time of API calls starts going up i.e the API which takes <10 secs - afterwards takes > 1min.

Randomly I see connect issues in my logs;

Error: The request failed. Error: ConnectFailure (Connection timed out),   at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.BuildEwsHttpWebRequest () [0x00000] in <filename unknown>:0  at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest (IEwsHttpWebRequest& request) [0x00000] in <filename unknown>:0  at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute () [0x00000] in <filename unknown>:0  at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1[Microsoft.Exchange.WebServices.Data.ServiceResponse].Execute () [0x00000] in <filename unknown>:0  at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems (IEnumerable`1 items, Microsoft.Exchange.WebServices.Data.FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode, ServiceErrorHandling errorHandling)
 [0x00000] in <filename unknown>:0  at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItem (Microsoft.Exchange.WebServices.Data.Item item, Microsoft.Exchange.WebServices.Data.FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode) [0x00000] in<filename unknown>:0  at Microsoft.Exchange.WebServices.Data.Item.InternalCreate (Microsoft.Exchange.WebServices.Data.FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode) [0x00000] in <filename unknown>:0  at Microsoft.Exchange.WebServices.Data.Appointment.Save (WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode) [0x00000] in <filename unknown>:0  at ...



vin14976@hotmail.com TechCenter Forums



How does one get support from Microsoft for Exchange Server 2013 / EWS?

$
0
0

Are there special phone numbers or email addresses or something?

I raised a Severity A support incident Friday morning (expected response time 2hrs) and despite two phone calls to the support line today trying to get some response I'm still just sitting here in the dark with no contact back from them.

Any tips greatly appreciated!


Can we query Conference Room (resource mailbox settings) like BookinPolicy using EWS in Exchange 2010 ?

$
0
0
Can we query Conference Room (resource mailbox settings) like BookinPolicy using EWS in Exchange 2010 ?

Mat

Exchange 2010 to 2016 migration question

$
0
0

I am having the following issue with an Exchange 2010 to 2016 migration in a lab environment. A mailbox that was created on a 2016 database will not connect: here is the screen shot of the error. It will just hang on the logging onto the mail server section.

Here are the details of the lab environment:

Exchange 2010: 2 CAS Server configured in a CASARRAY using the Windows Network Load Balancing program.

4 Mailbox servers configured in a DAG.

Exchange 2016:

1 File Share Witness server.

4 multi role servers in a DAG.

This is built inside of a VMWare environment.

What is working:

All 2010 mailboxes, OWA, and outlook anywhere connections that are still housed on the 2010 MBX servers.

The 2016 mailbox that was migrated OWA is working for it.

The name space is set on all servers to be the same mail.test.com,

This is set for OWA, ECP, and etcetera for internal and external.

This lab does not have any connection to the internet.

I have also restarted the WebAppPool MSExchangeAutodiscoverAppPool on all 2016 servers.

Please lend any insight or suggestion to resolve this.

Thank you

disable mailbox are gone after installing exchange 2016

$
0
0

Hi,

We have an Exchange 2013 and try to upgrade to Exchange 2016 , but after the installation of Exchange Server 2016 mailboxes disabled users that we wrote down before installing Exchange 2016 are gone, how could find them New ? it's possible?

Thanks in advance!

Public Folder

$
0
0

Hi,<o:p></o:p>

I had upgraded
from Exchange 2003 to 2010 few months ago so I have moved the Public
folder database to exchange 2010 and decommissioned exchange 2003. I am
using outlook 2010 client so I don't need the public folder. <o:p></o:p>

I have
check through the EMC in exchange 2010, I can see two sub folder within Public Folder.<o:p></o:p>

Public
folder<o:p></o:p>

1. Default
public folder<o:p></o:p>

2. System
Public folder<o:p></o:p>

Within the
system public folder there are few subfolder i.e. event root, store events etc.<o:p></o:p>

How do I
delete all these folder from exchange 2010?<o:p></o:p>

Cheers!<o:p></o:p>


Accepting meeting request and reading data of that meeting from EWS

$
0
0

Here i assigned a email delegation of an Resource (Room) to an email address.

So Whenever the resource is being used by clients, i am getting an email to accept or reject the allocation of room to them.

What i am trying to do was, to store that meeting request information into database like meeting attendees and time etc..

and i want to send them an acceptance by using EWS.

How can this be done? any examples are appreciated.

Looking forward for your valuable suggestion.

Thanks in advance.

EWS: Confirming Room response (Accepted/Declined) when creating appointment where room is invited

$
0
0

Hello,

I have a problem when I book a room using the EWS API. I would like to create an appointment and book (invite) a room. Is there a good way to confirm that the room said yes?

Today we do pretty much this:

  • Create appointment
  • Wait for room to respond (sleep)
  • Check if room accepted booking

Today we have a sleep call in our code because the room status is Unknown for quite some time...

Why does it take around 4s to get the room response? (I have heard it's because the room is really a mailbox?)

There must be a better way, right?

I would be super thankful for any ideas how to do this better, Thanks!

// Henrik

ExchangeService service = exchange.create_service(data.username, data.usermail, data.password);

meeting = new Appointment(service);

DateTime time_start = DateTime.ParseExact(data.time_start,
                        "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
                DateTime time_end = DateTime.ParseExact(data.time_end,"yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);

meeting.Subject = data.subject;
meeting.Start = time_start;
meeting.End = time_end;
meeting.Location = data.location;
meeting.Resources.Add(data.roommail);
meeting.Save(SendInvitationsMode.SendOnlyToAll);

// Allow room to respond
 Thread.Sleep(4000);

Appointment appointment = Appointment.Bind(service, meeting.Id);

PropertySet propset = new PropertySet(BasePropertySet.IdOnly,
                                                       AppointmentSchema.Resources,
                                                        AppointmentSchema.Start,
                                                        AppointmentSchema.End,
                                                        AppointmentSchema.Organizer);

appointment.Load(propset);

// Verify room status
verify_resource(appointment.Resources, data);



porting mapi API based client to EWS manged API

$
0
0

Hi 

we have client which implemented  using  MAPI API for example (IProfAdmin->DeleteProfile, CreateProfile) , now we want to write same client using EWS managed API but i not getting equivalent EWS managed API for Mapi API .

any pointer or help will be appreciated.

thanks 

[E2007][E2010][EWSMA][C#]Clear work days and GetUserAvailability fails with NullReferenceException

$
0
0

When a user has unticked all work days in the Calendar options in Outlook and then call GetUserAvailability() the function will fail with a NullReferenceException.

The function is called with AvailabilityOptions.RequestedFreeBusyView=FreeBusy, TimeWindow of 40 hours and AvailabilityData FreeBusy.

It occurs with both Managed API 1.1 and 1.2.

Code to reproduce:

string emailAddress = "testUser@testspot.local";

ExchangeService ews = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
exchService.AutodiscoverUrl(emailAddress);

AttendeeInfo[] attendees = new AttendeeInfo[1] { new AttendeeInfo(emailAddress) };

AvailabilityOptions options = new AvailabilityOptions();
options.RequestedFreeBusyView = FreeBusyViewType.FreeBusy;

DateTime startDate = DateTime.Today;
TimeWindow timeWindow = new TimeWindow(startDate, startDate.AddDays(7));

// NullReferenceException when calling following function
ews.GetUserAvailability(attendees, timeWindow, AvailabilityData.FreeBusy, options);

StackTrace of the NullReferenceException:

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Microsoft.Exchange.WebServices"
  StackTrace:
       at Microsoft.Exchange.WebServices.Data.EwsUtilities.ParseEnumValueList[T](IList`1 list, String value, Char[] separators)
       at Microsoft.Exchange.WebServices.Data.WorkingPeriod.TryReadElementFromXml(EwsServiceXmlReader reader)
       at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func`2 readAction)
       at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
       at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
       at Microsoft.Exchange.WebServices.Data.WorkingHours.TryReadElementFromXml(EwsServiceXmlReader reader)
       at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func`2 readAction)
       at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
       at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
       at Microsoft.Exchange.WebServices.Data.AttendeeAvailability.LoadFreeBusyViewFromXml(EwsServiceXmlReader reader, FreeBusyViewType viewType)
       at Microsoft.Exchange.WebServices.Data.GetUserAvailabilityRequest.ParseResponse(EwsServiceXmlReader reader)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader)
       at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(HttpWebResponse response)
       at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()
       at Microsoft.Exchange.WebServices.Data.GetUserAvailabilityRequest.Execute()
       at Microsoft.Exchange.WebServices.Data.ExchangeService.GetUserAvailability(IEnumerable`1 attendees, TimeWindow timeWindow, AvailabilityData requestedData, AvailabilityOptions options)
       at ExchangeAutodiscover.Form1.button2_Click(Object sender, EventArgs e) in C:\My Projects\Visual C#\ExchangeAutodiscover\Form1.cs:line 72
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at ExchangeAutodiscover.Program.Main() in C:\My Projects\Visual C#\ExchangeAutodiscover\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Scripting to add prompt for Profile additional account and having the additional account as default

$
0
0


I need to find a way to modify an account creation script such that
6 or more users can have the additional group mailbox added to their profile. Make sure that they are prompted for which group mailbox to choose when they logon to their account.
Also to have their personal mailbox as a subsidiary of the group mailbox when you open the outlook pro

Lastly their group mailbox should be the default.

But I have found advise on automating the mapping of a shared mailbox http://www.stevieg.org/2010/08/auto-mapping-shared-mailboxes-in-exchange-2010-sp1-with-outlook-2010/

------------When you add full mailbox permissions on Exchange 2010 SP1 and SP2 to a new or existing shared mailbox that’s also on SP1, Exchange now updates an Active Directory attribute on the shared mailbox itself, named msExchDelegateListLink. This is a multi-value attribute containing a list of DNs (Distinguished Names) of the other mailboxes that have full access to the mailbox and should auto-map that mailbox:

----------------------------------------------------------------------------------------------------------

But its only some part of the answer.  Is there a way to script to PRF file when creating an account that would allow me to have what I need, or user the Office Customisation tool ( don’t know how this work with Virtual desktops,
Is there a possibility to develop a Exchange module which would allow for easier  scripting tasks to turn on/off some of the GUI options in outlook.
Or arranging for outlook to have API that would allow what which to achieve what I need.
Any suggestions are welcome for me to solve the issue.

How to setup Exchange 2016 multi-tenancy ?

$
0
0

Hi All,

How to setup Exchange 2016 multi-tenancy? do you need any third party software ? 

Regard,

Jack

Long term test leading to request failure - "Error writing headers"

$
0
0

Hello,

My app (c# using EWS Managed API) is conducing some stability tests, which is failing in a overnight test.

What is the issue here?

"error": "The request failed. Error writing headers", "stacktrace": "

at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse (IEwsHttpWebRequest request) [0x00000] in <filename unknown>:0 \n

at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest (IEwsHttpWebRequest& request) [0x00000] in <filename unknown>:0 \n

at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute () [0x00000] in <filename unknown>:0 \n

at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1[Microsoft.Exchange.WebServices.Data.FindItemResponse`1[Microsoft.Exchange.WebServices.Data.Item]].Execute () [0x00000] in <filename unknown>:0 \n

at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems[Item] (IEnumerable`1 parentFolderIds, Microsoft.Exchange.WebServices.Data.SearchFilter searchFilter, System.String queryString, Microsoft.Exchange.WebServices.Data.ViewBase view, Microsoft.Exchange.WebServices.Data.Grouping groupBy, ServiceErrorHandling errorHandlingMode) [0x00000] in <filename unknown>:0 \n

at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems (Microsoft.Exchange.WebServices.Data.FolderId parentFolderId, Microsoft.Exchange.WebServices.Data.ViewBase view) [0x00000] in <filename unknown>:0 

...



vin14976@hotmail.com TechCenter Forums

Migrate SBS 2008 (Exchange 2007 SP3 RU18) to Exchange 2013 CU12

$
0
0
We migrated80%ofthemailboxeswithoutproblem.Thenreboottheserversforgeneralmaintenanceandwanttomigrateothermailboxes,doso,butneithersaysanything.
They arealwaysinsyncing.

I findnoerrorsoralertsthatinformwhathappens.

SBS 2008 (exchange 2007)

Windows 2012 R2 - Exchange 2013

regards

gracias


Alejandro | Especialista en Infraestructura Microsoft y Fortinet|

Language in messages room mailbox.

$
0
0

Hi,

We have a sharepoint application used by users to make appointments in a room mailbox of an Exchange 2010 server.

All servers in our organization are in English. The room mailbox and all user's mailboxes are configured in Spanish with cmdlets Set-Mailbox and Set-MailboxRegionalSettings.

The Sharepoint application uses EWS to date the appointments, and uses impersonation.

When a user makes an appointment with Outlook, he receives the answer from autoatendant in Spanish. When that user makes the appointment with Sharepoint application, he receives the same answer, but in English.

Here is the code of the application making the appointment:

System.Net.ServicePointManager.DefaultConnectionLimit = 20;

            ExchangeService result = null;

            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                using (SPSite elevatedSite = new SPSite(idSite))
                {
                    result = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
                    result.Timeout = 300000;
                    ServicePointManager.ServerCertificateValidationCallback = (RemoteCertificateValidationCallback)Delegate.Combine(ServicePointManager.ServerCertificateValidationCallback, new RemoteCertificateValidationCallback(ExchangeConnect.RemoteCertificateValidationHandler));

                    NetworkCredential credentials = SecureStoreConnect.GetServiceCredentials(elevatedSite, Definitions.Exchange.SecureStoreName);
                    result.Credentials = credentials;
                    result.Url = new System.Uri(Definitions.Exchange.ExchangeServer);

                    if (SPContext.Current != null && SPContext.Current.Web != null && !string.IsNullOrEmpty(SPContext.Current.Web.CurrentUser.Email))
                    {
                        result.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, SPContext.Current.Web.CurrentUser.Email);
                    }
                }
            });

            return result;

We need to receive the autoatendant message in Spanish.

So I need your help.


How to get UserIDs and Profile Pictures of meeting attendees

$
0
0

Right now i am using user account xyz@exchange.com and gave all permisions to impersonate a Room(Resource) calendar.

By doing this i am able get  the fallowing information like : meetings times,Duration, Attendees email address,organizer ID.

There are few other things which i want to retrive like Attendees profile pictures and UserId's. What can be done in order to obtain this information.

Check the following code:

      private static void GetRoomCalander(ExchangeService service)
        {
            DateTime StartDate = DateTime.Now;
            DateTime EndDate = DateTime.Today.AddMonths(2);
            CalendarView cv = new CalendarView(StartDate, EndDate);
            //Using the room email address to get access to its calendar
            FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar);
            FindItemsResults<Appointment> fapts = service.FindAppointments(CalendarFolderId, cv);
            if (fapts.Items.Count > 0)
            {
                DateTime Start, End;
                TimeSpan Duration;
                string Attendees, organizer;

                foreach (Appointment Appoint in fapts)
                {
                    
                    Start = Appoint.Start;
                    End = Appoint.End;
                    Duration = Appoint.Duration;
                    Attendees = Appoint.DisplayTo;
                    var id = Appoint.Id;
                    var orgid = Appoint.Organizer;
                    organizer = Appoint.Subject;
                    Console.WriteLine();
                    Console.WriteLine("Meeting ID {0}", id);
                    Console.WriteLine("Meeting ID {0}", Appoint.RequiredAttendees);
                    Console.WriteLine("Starting Time of Meeting {0}", Start);
                    Console.WriteLine("End time {0}", End);
                    Console.WriteLine("Total Duration of Meeting {0} ", Duration);
                    Console.WriteLine("Organizer by Id{0}", orgid);
                    SplitAttendee(organizer);
                    SplitAttendee(Attendees);
                    Console.WriteLine();
                    Console.WriteLine();

                }
            }
        } //To split the string of attendee list private static void SplitAttendee(string attn) { string strToSplit = attn; string[] arrStr = strToSplit.Split(';'); foreach (string s in arrStr) { FindEmail(s); } } //To find email address from display names private static void FindEmail(string name) { NameResolutionCollection resolvedNames = service.ResolveName(name); // Outputs the list of candidates. foreach (NameResolution nameRes in resolvedNames) { Console.WriteLine("e-mail address: " + nameRes.Mailbox.Address); //ImpersonatedUserId impersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, nameRes.Mailbox.Address); //service.ImpersonatedUserId = impersonatedUserId; string Fullname = nameRes.Mailbox.Name; Console.WriteLine("Full Name: {0}", Fullname); //Console.WriteLine("User ID{0}: ", userID); } }

And i found some example code to getcontactphoto but for using this code i need ItemId but i am confused how to obtain this

 private static void GetContactPhoto(ExchangeService service, string ItemId)
        {
            // Bind to an existing contact by using the ItemId passed into this function.
            Contact contact = Contact.Bind(service, ItemId);
            // Load the contact to get access to the collection of attachments.
            contact.Load(new PropertySet(ContactSchema.Attachments));
            // Loop through the attachments looking for a contact photo.
            foreach (Attachment attachment in contact.Attachments)
            {
                if ((attachment as FileAttachment).IsContactPhoto)
                {
                    // Load the attachment to access the content.
                    attachment.Load();
                }
            }
            FileAttachment photo = contact.GetContactPictureAttachment();
            // Create a file stream and save the contact photo to your computer.
            using (FileStream file = new FileStream(photo.Name, FileMode.Create, System.IO.FileAccess.Write))
            {
                photo.Load(file);
            }
        }


how to add Data Classification in Exchange server...

$
0
0

Hello,

how to add data classification in outlook Web Access..any tool to use make our User interface.i wont to make a pop in send button and make our classification in mail.

 kindly help me...

E mail Account

$
0
0

i have had an Hotmail account for years now but now i am unable to log into it it keeps saying "Something went wrong and we can't sign you in right now. Please try again later" for days now can i get some help.

Thank You

Recovering old junk email

$
0
0

Please help - I need to recover my junk mail from May 2, 2016; but, it is now well past the three week time frame during which I can still look through the junk mail folder.  PLEASE HELP ME - IS THERE A JUNK ARCHIVE THAT I CAN ACCESS??  TICKETS TO MY DAUGTHER"S BALLET RECITAL ARE IN THERE!!!

Forward email using the original "From" address in the forwarded email "From" address

$
0
0
We have an exchange server mailbox to which customers (both internal and external) send mail.  We have a service (call it service 1) that handles these emails by subscribing to the notify event.  There is a separate application (call it application 1), outside our organization, that monitors another mailbox and generates an auto reply for every mail message it receives.  We would like service 1 to forward emails it cannot handle to application 1 mailbox so that it can generate the appropriate auto reply.  In order for this to work the forwarded email would have to look like it came from the original sender.  How do you do that?
Viewing all 7132 articles
Browse latest View live


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