2012-11-20 2 views
0

C#을 사용하여 Exchange Server 2007의 모든 회의실을 찾으려고합니다.Exchange 2007 용 방 목록 검색을위한 LDAP 문제

불행하게도 http://msdn.microsoft.com/en-us/library/exchange/hh532566(v=exchg.80).aspx

, GetRoomLists()가 어떤 일 경우에는 Exchange Server 2007 내가 바라고 일을하거나 내가 회의를 찾을 수있는 방법을 알고하지 않습니다 나는 EWS 관리 API를 사용하여이 작업을 수행 할 수있는 쉬운 방법을 발견 Exchange Server 2007의 객실은 큰 도움이 될 것입니다. Exchange 서버에서 사용할 수있는 모든 회의실을보고 해당 속성을 사용하려고합니다.

기존 객실을 모두 표시 한 다음 전화/메모 탭 정보와 같은 속성을 사용할 수 있습니까?

LDAP로 작업하고 있었지만 "서버가 작동하지 않습니다"라는 오류 메시지가 나타납니다. 나는 틀린 증명서를 사용하고 있을지도 모른다 생각했다. 따라서 Google과 함께 시도했지만 도움이되지 않았습니다.

내 코드를 찾아주십시오 동봉 : -

 using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://www.google.com/DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption)) 
     { 
      dir2.RefreshCache(); 

      DirectorySearcher adSearch = new DirectorySearcher(dir2); 
      adSearch.Filter = "(&(objectClass=*)(msExchRecipientDisplayType=7))"; 
      SearchResultCollection adResult = adSearch.FindAll(); 

      foreach (SearchResult item in adResult) 
      { 

       ResultPropertyCollection property = item.Properties; 

       ResultPropertyValueCollection name = property["name"]; 
       ResultPropertyValueCollection proxyAddresses = property["proxyAddresses"]; 
       ResultPropertyValueCollection legacyExchangeDN = property["legacyExchangeDN"]; 

       .......... 
     } 
} 

이 동봉 된 코드 나에게 오류를 제공합니다 : - 나는 확실하지 않다 dir2.RefreshCache(); 가, 내가 잘못 뭐하는 거지. using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://ldap.google.com/DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))

using (DirectoryEntry dir2 = new DirectoryEntry("LDAP:///DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))

using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))

을하지만 아무것도 정말 나에게 도움이되지 : - 내가 좋아하는 다른 LDAP 값으로 노력했다.

내가 뭘 잘못하고 있는지 알아? 스택 추적을 찾아주십시오 동봉

:

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) 
    at System.DirectoryServices.DirectoryEntry.Bind() 
    at System.DirectoryServices.DirectoryEntry.RefreshCache() 
    at Test_Exchange.Program.Main(String[] args) in C:\Inetpub\wwwroot\Test Exchange\Test Exchange\Program.cs:line 26 
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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, Boolean ignoreSyncCtx) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
    at System.Threading.ThreadHelper.ThreadStart() 

어떤 도움이나 제안을 크게 감상 할 수있다.

미리 감사드립니다.

+0

컴퓨터가 도메인에 가입되어 있으면 DirectoryEntry dir2 = new DirectoryEntry()를 수행 할 수 있어야합니다. 그게 효과가 있니? –

답변

0

내가 뭘 잘못했는지 생각했습니다. 그것은 다른 사람들을 도울 수 있습니다. 잘 작동합니다. 문제는 잘못된 광고 이름입니다. IT 또는 관리자에게 문의하여 올바른 Active Directory 이름을 사용하고 있는지 확인하십시오.

건배 !!

+1

참고하시기 바랍니다. StackOverflow에서 해당 문제 옆의 체크 표시를 클릭하여 문제를 해결 한 대답을 수락 됨으로 표시해야합니다. 사람들은이 일을하지 않는 사람들의 질문에 답하는 경향이 훨씬 적습니다. –