The Autodiscover service couldn't be located.

Status
Not open for further replies.
C

cshenbagaraj

Please help me out sruggling in this for a long time..

error: The Autodiscover service couldn't be located.
my code is
try
{
// Connect to Exchange Web Services as user1 at contoso.com.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
service.Credentials = new WebCredentials(" ews@MydomainName.com" , " password" );
//service.UseDefaultCredentials = true;
service.AutodiscoverUrl(" ews2@MydomainName.com" , ValidateRedirectionUrlCallback);
//service.Url = new Uri(" https://serverName.DomainName.com/ews/Exchange.asmx" );

// Create the e-mail message, set its properties, and send it to user2@contoso.com, saving a copy to the Sent Items folder.
EmailMessage message = new EmailMessage(service);
message.Subject = " Interesting" ;
message.Body = " The proposition has been considered." ;
message.ToRecipients.Add(" ews1@MydomainName.com" );
message.SendAndSaveCopy();
// Write confirmation message to console window.
//Console.WriteLine(" Message sent!" );
//Console.ReadLine();
}
catch (Exception ex)
{
//Console.WriteLine(" Error: " + ex.Message);
//Console.ReadLine();
}
i browsed- https://MyserverName.DomainName.com/autodiscover/autodiscover.xml
it displays
<?xml version=" 1.0" encoding=" utf-8" ?>
- <Autodiscover xmlns=" http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" >
- <Response>
- <Error Time=" 17:35:23.3125000" Id=" 3155127929" >
<ErrorCode>600</ErrorCode>
<Message>Invalid Request</Message>
<DebugData />
</Error>
</Response>
</Autodiscover>

please give me a right solution for this as soon as faster
 
S

Steve Goodman

Hiya,

Do you have an autodiscover DNS record, such as autodiscover.domainname.com with an appropriate SSL certificate?

Steve

Steve Goodman
Check out my Blog for more Exchange info or find me on Twitter
 
C

cshenbagaraj

how do i check this whether it has autodiscover DNS record with appropriate SSL certificate?

As im new to this i don have much knowlwdge in this

please help me out

shenbagaraj
 
S

Steve Goodman

Hi Shenbagaraj,

A good first point of call is the Exchange Remote Connectivity Analyser.

You should be able to test autodiscover, and it will let you know what doesn't look correct and why.

Steve

Steve Goodman
Check out my Blog for more Exchange info or find me on Twitter
 
C

cshenbagaraj

Hi steve
Its working well for me now i can programmatically send and receive mails.

but when i tried to create users using powershell scripts WsManConnectioninfo class in missing in System.Management.Automation ...

i uninstall it in GAC now im receiving error " mmc could not create snapin " and could not open the exchange server and powershell can u help me out.. very urgent :-(

shenbagaraj
 
C

cshenbagaraj

i uninstall System.management.Automation from GAC and reinstall the dll which is in reference folder but now exchange server itself is not opening.shenbagaraj
 
N

Novak Wu

Hi,

Is there any error message when trying to open Exchange server or EMC?

At this stage, I suggest you back up Exchange server database and try to reinstall .Net Framework 3.5 on the problematic machine.

If there is any error message, please post it here for research. Also, please open Event Viewer and check whether there is any Event error. If so, please post it here.

Thanks.

Novak


 
A

Amonra

Can you please provide the sample code of connection with Exchange Server....

That will be a gr8 help for me..
 
S

Steve Goodman

Can you please provide the sample code of connection with Exchange Server....

That will be a gr8 help for me..

Probably best to try a new thread in the Exchange development forums, and to be a little more specific with regards to what you're trying to achieve.
Steve

Steve Goodman
Check out my Blog for more Exchange info or find me on Twitter
 
Status
Not open for further replies.
Top