User-1063667917 posted
Hi,
Most of popular email clients use autodiscovery to get the mail server configuration calling an xml in a location but passing data as querystring:
https://autoconfig.domain.com/mail/config-v1.1.xml?emailaddress=user@domain.com
And the result must be an xml
So far, I can show autodiscovery.xml and show the xml (eventhough the real file name is autodiscovery.aspx):
<system.webServer>
<rewrite>
<rewriteMaps>
<rewriteMap name="/Autodiscover/Autodiscover.xml">
<add key="/Autodiscover/Autodiscover.xml" value="/Autodiscover/Autodiscover.aspx" />
</rewriteMap>
</rewriteMaps>
<rules>
<rule name="Rewriting to /Autodiscover/Autodiscover.xml">
<match url=".*" />
<conditions>
<add input="{/Autodiscover/Autodiscover.xml:{REQUEST_URI}}" pattern="(.+)" />
</conditions>
<action type="Rewrite" url="{C:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="DetailedLocalOnly" />
</system.webServer>
The problem comes when I pass the querystring, it returns:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
What am I doing wrong? or is there another way to do it and I'm taking the hard way?
Regards