Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7081343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:54:33+00:00 2026-05-28T06:54:33+00:00

we have strange problem, we have single signon and we are trying to fetch

  • 0

we have strange problem, we have single signon and we are trying to fetch unread email count from Exchange ews webservice, the problem is it always gets same count for all user which is actually for server user.

'it should now get for current user who requested the page 
'but its always for server user where sharepoint is installed
Public Sub GetUnreadEmailCount()
    Dim errormsg As String = String.Empty
    Dim UnreadCount As Integer = 0
    Dim esb As New ExchangeServiceBinding

    Try
        esb.RequestServerVersionValue = New RequestServerVersion
        esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1
        esb.UseDefaultCredentials = True
        esb.Url = Domain + "/EWS/Exchange.asmx"

        ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf CertificateValidationCallBack)


        Dim biArray(1) As BaseFolderIdType
        Dim dfFolder As New DistinguishedFolderIdType
        dfFolder.Id = DistinguishedFolderIdNameType.inbox
        biArray(0) = dfFolder
        Dim geGetFolder As New GetFolderType
        geGetFolder.FolderIds = biArray
        geGetFolder.FolderShape = New FolderResponseShapeType
        geGetFolder.FolderShape.BaseShape = DefaultShapeNamesType.AllProperties
        Dim gfResponse As GetFolderResponseType = esb.GetFolder(geGetFolder)

        Dim rmta As ResponseMessageType() = gfResponse.ResponseMessages.Items
        Dim rmt As FolderInfoResponseMessageType = DirectCast(rmta(0), FolderInfoResponseMessageType)
        If rmt.ResponseClass = ResponseClassType.Success Then
            Dim folder As FolderType = DirectCast(rmt.Folders(0), FolderType)
            UnreadCount = folder.UnreadCount

        End If

        Label1.Text = vbCrLf + "Unread email count : " + UnreadCount.ToString
        ' Return UnreadCount
    Catch ex As Exception
        If Not ex.Message Is Nothing Then errormsg = ex.Message
        Try
            If Not ex.InnerException.Message Is Nothing Then errormsg = errormsg + " : " + ex.InnerException.Message
        Catch e As Exception

        End Try
    Finally
        If esb IsNot Nothing Then esb.Dispose() : esb = Nothing
        If Not errormsg = String.Empty Then
            Label1.Text = vbCrLf + "Error : " + errormsg
        End If
    End Try

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:54:34+00:00Added an answer on May 28, 2026 at 6:54 am

    We were actually having the same problem, although we were not using single sign on. So I’m not sure this is exactly what you are experiencing.

    The problem is that you can not have a user on Machine A give their credentials to Machine B (SharePoint?) and then have Machine B send those credentials on to Machine C

    It’s referred to as the “Double Hop” problem and is a security feature, however I’m not really into the technical side of it. Our solution was to use Kerberos.

    I hope this helps you, if not, that it helps you rule out this specific issue 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem that is only happening in a single location. I
I have strange problem with receiving data from socket. On client im using air
I have a strange problem with my PictureBox controls where I am trying to
I have a strange problem: htmlspecialchars(with ENT_QUOTES) and mysql_real_escape_string functions aren't translating single quote
i have strange problem doing reporting: i have numerous clients with different issued invoices.
I have a strange problem that I've never encountered before, I have data in
I have a strange problem that I can't get my head around: I have
I have a strange problem with Facebook Connect on one of my sites. It
I have a strange problem (strange if you ask me). Im using a NSNumber
I have this strange problem parsing XML document in PHP loaded via cURL. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.