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

  • Home
  • SEARCH
  • 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 5847775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:45:58+00:00 2026-05-22T12:45:58+00:00

Here is my code: using System; using System.Net; using MailListClient.MailListServiceReference; using Microsoft.Exchange.WebServices.Autodiscover; using Microsoft.Exchange.WebServices.Data;

  • 0

Here is my code:

using System;
using System.Net;
using MailListClient.MailListServiceReference;
using Microsoft.Exchange.WebServices.Autodiscover;
using Microsoft.Exchange.WebServices.Data;

namespace MailListClient
{
   class Program
   {
       static void Main(string[] args)
       {
           var service = GetBinding();

           ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true;

           try
           {
               FindItemsResults<Item> findResults = service.FindItems(
                   WellKnownFolderName.Inbox,
                   new ItemView(10));

               foreach (Item item in findResults.Items)
                   Console.WriteLine(item.Id);
           }
           catch (Exception ex)
           {
               Console.WriteLine("Error: " + ex.Message);
               Console.ReadLine();
           }
       }

       static ExchangeService GetBinding()
       {
           ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
           service.Credentials = new WebCredentials("zxzxzxzxzx@email.com", "password");
           try
           {
               service.Url = new Uri("https://email.com/AutoDiscover/AutoDiscover.xml");
           }
           catch (AutodiscoverRemoteException ex)
           {
               Console.WriteLine("Exception thrown: " + ex.Error.Message);
           }
           return service;
       }
   }
}

But I get Exception: The request failed. The remote server returned an error: (404) Not Found.
What is the problem?

  • 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-22T12:45:59+00:00Added an answer on May 22, 2026 at 12:45 pm

    Your URL may be wrong. Here is the URL format I am using in code which is definitely working in a few applications (2007 and 2010):

    https://[fully qualified domain name]/EWS/Exchange.asmx
    

    The rest of your code looks correct at a cursory level.

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

Sidebar

Related Questions

Here is the entire code for my class: using System; using System.Collections.Generic; using System.Linq;
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared
Here is a sample code to retrieve data from a database using the yield
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
This code doesn't work :- using System; using System.Collections.Generic; using System.Linq; using System.Net; using
I am using pseudo-code here, but this is in JavaScript. With the most efficient
I'm looking for something like break for loops. Here's some example code (using Symfony's
I'm using an HTML sanitizing whitelist code found here: http://refactormycode.com/codes/333-sanitize-html I needed to add
I am using the jquery tooltip and here is the code for it Javascript
I have got the following code from here to read an Excel file using

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.