Aspx/Rss feed – failed to open stream: Redirection limit reached

The problem is most likely with the address you are trying to fetch, and it is extremely unlikely it relates directly to your code.

You should check what url is being passed to file_get_contents to make sure it is the one you actually tried in the browser. If they are the same, it might relate to to other server doing different things based on user agent.

Side note: you are reinventing the wheel twice, Why don’t you use the WordPress RSS API or at least the HTTP API?

Update per comment:

if all you need is to parse a standard RSS feed, then you should consider using the fetch_feed function. This function fetches the feed, parses it and caches the result for 12 hours by default.