"Di" <Di@discussions.microsoft.com> wrote in message
news
B8EFC57-3580-492D-A390-9BE03F12DE85@microsoft.com...
> I have Windows 7 and IE8 and I'm fully up to date with patches. When I try
> to
> open a *.config file with IE it comes in an endless loop where I'm asked
> if I
> want to save or open the file. Chosing Open, I get the same dialog again.
>
> If I rename the config file to *.xml opening with IE is fine.
>
> Why oh why does IE refuse to open .config files? And how can I tell him
> it's
> ok to do so?
>
> Thanks,
> Di
IE uses the file extension to determine it's MIME type, and what application
should handle it. In the case of .config, I checked the registry on my XP
SP3 system and the Content Type is set to application/xml, which is not one
that IE will handle. If you change it to text/xml then IE will open it just
like if it had the .xml file extension, or was delivered over HTTP with the
Content-Type: text/xml header.
You can set the MIME value for .config by running regedit and going to
HKEY_CLASSES_ROOT\.config
There should be a Content Type REG_SZ value, change this from
application/xml to text/xml. If there is no Content Type value, create a new
REG_SZ value inside .config called Content Type (note space in value name!),
and enter text/xml for it's value. IE will then open .config files just like
it opens .xml files.
But I would suggest you take heed of the other replies - the IE XML viewer
is ok, but you'd be better off with an XML editing tool, especially as
invalid XML will mean IE won't display the file contents.
--
Dan