// Exchangeservice service = new exchangeservice (); Exchangeservice service = New Exchangeservice (exchangeversion. exchange2010_sp2 ); Service. Credentials = New Networkcredential ( " Test1 " , " Abcdefg " , " ABC " ); Service. url = New Uri ( " Https://mail.abc.local/ews/Exchange.asmx " ); /* // Service. autodiscoverurl ("aa@aa.net.cn", validateredirectionurlcallback); SearchFilter Sf = new SearchFilter. exists (emailmessageschema. subject); // search for inbox and add filter conditions. The result is 10 finditemsresults <item> findresults = NULL; try {findresults = service. finditems (wellknownfoldername. inbox, SF, new itemview (10);} catch (exception ex) {console. writeline (ex. message);} foreach (item in findresults. items) {emailmessage email = emailmessage. BIND (Service, item. ID); console. writeline (email. subject );} */ // Get caldndar // VaR _ Cal = new Microsoft. exchange. webServices. data. folderid (Microsoft. exchange. webServices. data. wellknownfoldername. calendar, new Microsoft. exchange. webServices. data. mailbox (_ otheraddress )); VaR _ Cal = New Microsoft. Exchange. WebServices. Data. folderid (Microsoft. Exchange. WebServices. Data. wellknownfoldername. calendar ); VaR _ Calendarview = New Microsoft. Exchange. WebServices. Data. calendarview (system. datetime. Now. addmonths (- 2 ), System. datetime. Now. Date. adddays ( 1 )); Foreach (Microsoft. Exchange. WebServices. Data. Appointment appointmentitem In Service. findappointments (_ Cal, _ calendarview) {console. writeline (appointmentitem. Subject );}
Public Static Void Mytest2 () {exchangeservice Service = New Exchangeservice (exchangeversion. exchange2010_sp2); service. Credentials =New Networkcredential ( " Test3 " , " Abcd1234 " , " DSPP " ); // Service. url = new uri (" Https://han013.dspp.local/ews/Exchange.asmx "); Service. url = New Uri ( " Https://hano.dspp.local/ews/Exchange.asmx " ); // Service. Credentials = new networkcredential ("Administrator", "abcd1234", "Temp "); // Service. url = new uri (" Https://cas.temp.local/ews/Exchange.asmx "); VaR Rootfolder =Folder. BIND (Service, wellknownfoldername. publicfoldersroot); rootfolder. Load (); Foreach (Folder folder In Rootfolder. findfolders ( New Folderview ( Int . Maxvalue ))){ If (! String . Isnullorempty (Folder. displayname) {console. writeline (Folder. displayname ); Try { Foreach (Folder F1 In Folder. findfolders ( New Folderview ( Int . Maxvalue ))){ If (F1.displayname. tolower () = " Kalender " ) {Console. writeline ( " --------- " ); VaR _ Cal = F1.id; VaR _ Calendarview = New Microsoft. Exchange. WebServices. Data. calendarview (system. datetime. Now. addmonths (- 2 ), System. datetime. Now. Date. adddays ( 1 )); Foreach (Microsoft. Exchange. WebServices. Data. Appointment appointmentitemIn Service. findappointments (_ Cal, _ calendarview) {console. writeline (appointmentitem. Subject);} console. writeline ( " --------- " );} Console. writeline ( " ++ " + F1.displayname ); Foreach (Folder F2In F1.findfolders ( New Folderview ( Int . Maxvalue) {console. writeline ( " ++ " + F2.displayname );}}} Catch (Exception ex) {console. writeline ( " -- " + Ex. Message );}}}}
Http://stackoverflow.com/questions/3631531/extract-exchange-2007-public-calendar-appointments-using-exchange-web-services-a
Http://msdn.microsoft.com/en-us/library/exchange/jj220501 (V = exchg.80). aspx
Http://www.dotnetfunda.com/codes/code1268-display-calendar-view-using-sharepoint-in-csharp-script.aspx
Http://www.c-sharpcorner.com/Blogs/9396/programmatically-add-an-event-to-sharepoint-2010-calendar.aspx
EWS
Http://msdn.microsoft.com/en-us/library/exchange/dd633710 (V = exchg.80). aspx
Http://www.microsoft.com/en-us/download/details.aspx? Id = 35371
Http://msdn.microsoft.com/en-us/library/exchange/dd633710 (V = exchg.80). aspx
Http://msdn.microsoft.com/en-us/library/exchange/dd633709 (V = exchg.80). aspx
Http://code.msdn.microsoft.com/Exchange-2013-101-Code-3c38582c/view/SamplePack/3? Sortby = popularity