Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. access microsoft exchange server users inbox data using asp.net

access microsoft exchange server users inbox data using asp.net

Scheduled Pinned Locked Moved ASP.NET
databasecsharphtmlasp-netsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1087931
    wrote on last edited by
    #1

    i am software developer my client want to access exchange server users data through web application I create asp.net application on the same machine where exchange server is install the follwoi8ng code ,applied in application ================================================ Dim cURL As String Sub FindMsgsFrom(ByVal sender, ByVal Conn) Const adErrNoCurrentRecord = 3021 Dim FolderURL As String FolderURL = "Inbox" Dim strq As String Dim rs As ADODB.Recordset rs = CreateObject("ADODB.Recordset") 'construct the SQL query, note the scope for deep traversal strq = "SELECT ""urn:httpmail:subject"" " strq = strq & "FROM scope('shallow traversal of """ & FolderURL & """ ')" ' strq = strq & "WHERE ""urn:schemas:httpmail:sendername"" = '" & sender & "'" rs.Open(strq, Conn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockReadOnly, -1) 'If empty recordset, return error 'If successful call DoResults routine passing the recorset If rs.EOF = True Then On Error Resume Next Err.Raise(adErrNoCurrentRecord) Response.Write("No items found, run another query.") Else Response.Write("Success! Found " & rs.RecordCount) DoResults(rs) End If rs.Close() End Sub Function DoResults(ByVal Rs As ADODB.Recordset) 'If empty recordset, return error Dim f As ADODB.Field If Rs.EOF = True Then 'On Error Resume Next 'Err.Raise(adErrNoCurrentRecord) Response.Write("
    No items found, run another query.

    ") Else Rs.MoveFirst() Do Until Rs.EOF 'Create a HTML table for each record, make table headings stand out Response.Write("") Response.Write("") Response.Write("") For Each f In Rs.Fields 'for every field in the record Response.Write("

    Property

    Value

    ") Response.Write(f.Name) Response.Write("

    ") 'accommodate null and multivalued properties If Not IsD

    M 1 Reply Last reply
    0
    • U User 1087931

      i am software developer my client want to access exchange server users data through web application I create asp.net application on the same machine where exchange server is install the follwoi8ng code ,applied in application ================================================ Dim cURL As String Sub FindMsgsFrom(ByVal sender, ByVal Conn) Const adErrNoCurrentRecord = 3021 Dim FolderURL As String FolderURL = "Inbox" Dim strq As String Dim rs As ADODB.Recordset rs = CreateObject("ADODB.Recordset") 'construct the SQL query, note the scope for deep traversal strq = "SELECT ""urn:httpmail:subject"" " strq = strq & "FROM scope('shallow traversal of """ & FolderURL & """ ')" ' strq = strq & "WHERE ""urn:schemas:httpmail:sendername"" = '" & sender & "'" rs.Open(strq, Conn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockReadOnly, -1) 'If empty recordset, return error 'If successful call DoResults routine passing the recorset If rs.EOF = True Then On Error Resume Next Err.Raise(adErrNoCurrentRecord) Response.Write("No items found, run another query.") Else Response.Write("Success! Found " & rs.RecordCount) DoResults(rs) End If rs.Close() End Sub Function DoResults(ByVal Rs As ADODB.Recordset) 'If empty recordset, return error Dim f As ADODB.Field If Rs.EOF = True Then 'On Error Resume Next 'Err.Raise(adErrNoCurrentRecord) Response.Write("
      No items found, run another query.

      ") Else Rs.MoveFirst() Do Until Rs.EOF 'Create a HTML table for each record, make table headings stand out Response.Write("") Response.Write("") Response.Write("") For Each f In Rs.Fields 'for every field in the record Response.Write("

      Property

      Value

      ") Response.Write(f.Name) Response.Write("

      ") 'accommodate null and multivalued properties If Not IsD

      M Offline
      M Offline
      manishgour
      wrote on last edited by
      #2

      hi, try to run the aspnet process with system permission (by changing the processmodel setting in the machine.config file) and see it it works. -Manish

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups