Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Autodiscover for exchange returns error 600 unable to retrieve the server name

$
0
0

Hi

I'm trying to do autodiscover the domain. i'm getting 600 as the error code.

How to get the exact exchange url onces POX autheticates. i'm trying to do this from a store app.

i'm using the code

           String EWSURL = null;
String auDisXML = "<Autodiscover xmlns=\"http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006\"><Request>" +
      "<EMailAddress>" + "ttt@domain.com" + "</EMailAddress>" +
      "<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>" +
      "</Request>" +
      "</Autodiscover>";
               NetworkCredential creditinal = new NetworkCredential
            {
                UserName = "XXX"
                Password = "XXXX"
                Domain = "XXX"
            };

System.Net.HttpWebRequest adAutoDiscoRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("https://autodiscover.domain.com/AutoDiscover/AutoDiscover.xml");
adAutoDiscoRequest.ContentType = "text/xml";
adAutoDiscoRequest.Method = "Post";
adAutoDiscoRequest.Credentials = creditinal;

byte[] bytes = Encoding.UTF8.GetBytes(auDisXML);

Stream rsRequestStream = await adAutoDiscoRequest.GetRequestStreamAsync();
rsRequestStream.Write(bytes, 0, bytes.Length);


WebResponse adResponse = await adAutoDiscoRequest.GetResponseAsync();
Stream rsResponseStream = adResponse.GetResponseStream();
byte[] resp = new byte[adResponse.ContentLength];
await adResponse.GetResponseStream().ReadAsync(resp, 0, (int)adResponse.ContentLength);
string xml = System.Text.Encoding.UTF8.GetString(resp, 0, (int)adResponse.ContentLength);

response

"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Autodiscover xmlns=\"http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006\">\r\n  <Response>\r\n    <Error Time=\"17:36:08.8597772\" Id=\"4272682333\">\r\n      <ErrorCode>600</ErrorCode>\r\n      <Message>Invalid Request</Message>\r\n      <DebugData />\r\n    </Error>\r\n  </Response>\r\n</Autodiscover>"


Autodiscover Account Settings
XML response:
<?xml version="1.0"?>
<Autodiscover xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
<Culture>en:us</Culture>
<User>
<DisplayName>XXXXXXXX</DisplayName>
<EMailAddress>testi@domain.com</EMailAddress>
</User>
<Action>
<Settings>
<Server>
<Type>MobileSync</Type>
<Url>https://mail.xxx.com/Microsoft-Server-ActiveSync</Url>
<Name>https://mail.xxx.com/Microsoft-Server-ActiveSync</Name>
</Server>
</Settings>
</Action>
</Response>
</Autodiscover>

this is the result i got by using https://testconnectivity.microsoft.com

1)I'm getting error code as 600. and why?

2)Is this not possible to get using POX ??

3)How can i get the details like the url name and the account details.


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>