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. Database & SysAdmin
  3. System Admin
  4. Autodiscover service couldn't be located

Autodiscover service couldn't be located

Scheduled Pinned Locked Moved System Admin
helpsysadminsharepoint
8 Posts 3 Posters 52 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.
  • J Offline
    J Offline
    Johan Hakkesteegt
    wrote on last edited by
    #1

    Hi, I have a simple test application that allows me to send an email message through an Office 365 account. When I run this application from say my home PC it works fine, but when I run it from any machine on my company's network, it doesn't work. The application allows for two different methods of sending a message, a simple smtp server address and a webservice. When running the application I get a different error for each method: - smtp server:

    Quote:

    No connection could be made because the target machine actively refused it

    - webservice:

    Quote:

    Autodiscover service couldn't be located

    Our system administrator tells me our firewall is not blocking the port, and has not been able to suggest anything else. We only recently switched from third party Exchange 2010 to Office 365 and our on-premise AD is synced to it. MS Outlook works fine. Our office scanner also cannot send scans to email anymore, which it could through Exchange 2010's smtp server. I am at a loss, and any help with this issue will be much appreciated. Regards, Johan

    My advice is free, and you may get what you paid for.

    J 1 Reply Last reply
    0
    • J Johan Hakkesteegt

      Hi, I have a simple test application that allows me to send an email message through an Office 365 account. When I run this application from say my home PC it works fine, but when I run it from any machine on my company's network, it doesn't work. The application allows for two different methods of sending a message, a simple smtp server address and a webservice. When running the application I get a different error for each method: - smtp server:

      Quote:

      No connection could be made because the target machine actively refused it

      - webservice:

      Quote:

      Autodiscover service couldn't be located

      Our system administrator tells me our firewall is not blocking the port, and has not been able to suggest anything else. We only recently switched from third party Exchange 2010 to Office 365 and our on-premise AD is synced to it. MS Outlook works fine. Our office scanner also cannot send scans to email anymore, which it could through Exchange 2010's smtp server. I am at a loss, and any help with this issue will be much appreciated. Regards, Johan

      My advice is free, and you may get what you paid for.

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      Quote:

      No connection could be made because the target machine actively refused it

      Try to get the original error message send by the "target" (an SMTP error message or an ICMP message from a router/firewall at the target). It should be helpful.

      J 1 Reply Last reply
      0
      • J Jochen Arndt

        Quote:

        No connection could be made because the target machine actively refused it

        Try to get the original error message send by the "target" (an SMTP error message or an ICMP message from a router/firewall at the target). It should be helpful.

        J Offline
        J Offline
        Johan Hakkesteegt
        wrote on last edited by
        #3

        Hi, Thanks for your reply. I set the application to specifically show smtp errors, but the error remains the same:

        Quote:

        System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 40.101.88.18:587

        Quote:

        (an SMTP error message or an ICMP message from a router/firewall at the target)

        The application works fine when I run it on any machine that is not on our network. Wouldn't that suggest that the error is caused by our own network, but somehow is not interpreted as a remote error? I can ping 40.101.88.18 normally. Regards, Johan

        My advice is free, and you may get what you paid for.

        J 1 Reply Last reply
        0
        • J Johan Hakkesteegt

          Hi, Thanks for your reply. I set the application to specifically show smtp errors, but the error remains the same:

          Quote:

          System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 40.101.88.18:587

          Quote:

          (an SMTP error message or an ICMP message from a router/firewall at the target)

          The application works fine when I run it on any machine that is not on our network. Wouldn't that suggest that the error is caused by our own network, but somehow is not interpreted as a remote error? I can ping 40.101.88.18 normally. Regards, Johan

          My advice is free, and you may get what you paid for.

          J Offline
          J Offline
          Jochen Arndt
          wrote on last edited by
          #4

          Quote:

          No connection could be made because the target machine actively refused it

          That means that there is no service listening on the specified port or a firewall is blocking the request (at the target side). When you can connect from other systems (did you use the same server name and port number 587 there?), it must be a firewall that is blocking requests by the source IP (IP is black listed or not white listed). 40.101.88.18 belongs to Microsoft. Which SMTP server name have you specified?

          J 1 Reply Last reply
          0
          • J Jochen Arndt

            Quote:

            No connection could be made because the target machine actively refused it

            That means that there is no service listening on the specified port or a firewall is blocking the request (at the target side). When you can connect from other systems (did you use the same server name and port number 587 there?), it must be a firewall that is blocking requests by the source IP (IP is black listed or not white listed). 40.101.88.18 belongs to Microsoft. Which SMTP server name have you specified?

            J Offline
            J Offline
            Johan Hakkesteegt
            wrote on last edited by
            #5

            My first guess was also that the problem is in our firewall, but I only asked our admin about a port being blocked. I will have to ask again about a possible black/white listing. Thanks for that suggestion. As for the SMTP server, per MickeySoft's instructions I use smtp.office365.com and port 587 or 25. I suppose that address has its own autodiscover protocol. nslookup gives me the specific smtp server name outlook-emeaeast3.office365.com and 9 different IP addresses. What I have been wondering about is, how MS Outlook contacts exchange online. Why is it not having any problem connecting?

            My advice is free, and you may get what you paid for.

            J L 2 Replies Last reply
            0
            • J Johan Hakkesteegt

              My first guess was also that the problem is in our firewall, but I only asked our admin about a port being blocked. I will have to ask again about a possible black/white listing. Thanks for that suggestion. As for the SMTP server, per MickeySoft's instructions I use smtp.office365.com and port 587 or 25. I suppose that address has its own autodiscover protocol. nslookup gives me the specific smtp server name outlook-emeaeast3.office365.com and 9 different IP addresses. What I have been wondering about is, how MS Outlook contacts exchange online. Why is it not having any problem connecting?

              My advice is free, and you may get what you paid for.

              J Offline
              J Offline
              Jochen Arndt
              wrote on last edited by
              #6

              The error message indicates that a target / remote side refuses the connection. This is usually a system behind the first router (the first router should send a different message when he blocks outgoing attempts). I don't think that MS is blocking accesses from your company. Because it works on other sites, it is most probably sourced somewhere in your company network or your companies internet provider. Many companies block outgoing SMTP except for white listed source IPs (e.g. only a local forwarding SMTP server is allowed to talk SMTP to the net). The network admin in your company is the responsible person to contact. Even if he tells you that there are no filter rules, he might help better because he should know the toplogy of the company network.

              1 Reply Last reply
              0
              • J Johan Hakkesteegt

                My first guess was also that the problem is in our firewall, but I only asked our admin about a port being blocked. I will have to ask again about a possible black/white listing. Thanks for that suggestion. As for the SMTP server, per MickeySoft's instructions I use smtp.office365.com and port 587 or 25. I suppose that address has its own autodiscover protocol. nslookup gives me the specific smtp server name outlook-emeaeast3.office365.com and 9 different IP addresses. What I have been wondering about is, how MS Outlook contacts exchange online. Why is it not having any problem connecting?

                My advice is free, and you may get what you paid for.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                So you have the correct SMTP Server - smtp.office365.com and correct Port - 587, what Encryption are you using? Microsoft says to use TLS and I bet Outlook is set to use it but have you set it in your code?

                Michael Martin Australia "I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004

                J 1 Reply Last reply
                0
                • L Lost User

                  So you have the correct SMTP Server - smtp.office365.com and correct Port - 587, what Encryption are you using? Microsoft says to use TLS and I bet Outlook is set to use it but have you set it in your code?

                  Michael Martin Australia "I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004

                  J Offline
                  J Offline
                  Johan Hakkesteegt
                  wrote on last edited by
                  #8

                  Hi Michael, Thanks for your response. My apologies, I posted about this problem on another forum as well, and forgot to update this one. As it turns out, our firewall wasn't blocking any ports, it was just not allowing other SMTP traffic than specified, and nothing was specified. Anyway my code was good, including TLS, so the question remains, how come Outlook was not blocked by our firewall, when my code was. Regards, Johan

                  My advice is free, and you may get what you paid for.

                  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