Problem with rendering list RSS feed in iPhone Safari

Eng Soon Cheah 81 Reputation points
2020-11-03T05:46:31.7+00:00

When I retrieve the RSS data from SharePoint On Premise ,

when display at company laptop its work, but display at iPhone Safari its can't retrieve the data.

I had try different method, but at the end can't display the result.

Here with my source code.

string url = string.Format("{0}?List={1}", SPUrlUtility.CombineUrl(web.Url, "_layouts/15/listfeed.aspx"), list.ID);
    var request = (HttpWebRequest)WebRequest.Create(url);
    request.Credentials = CredentialCache.DefaultNetworkCredentials;
    var response = (HttpWebResponse)request.GetResponse();
    if (response.StatusCode == HttpStatusCode.OK)
    {
        using (var stream = response.GetResponseStream())
        {
            using (var reader = new StreamReader(stream))
            {
                result = reader.ReadToEnd();
            }
        }
        result = Regex.Replace(result, @"<enclosure.+?/>", string.Empty);
    }

The problems is happen at request.Credentials = CredentialCache.DefaultCredentials;,
any suggestion for authentication method, not the Network Credential method,
because its does not secure by using Network Credential.

Method I had use:

  1. CredentialCache.DefaultNetworkCredentials; - the status code "OK" but not display the result
  2. CredentialCache.DefaultCredentials; - the status code "OK" but not display the result
  3. NetworkCredential - this method not allowed in development & Production.
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,605 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-11-04T02:14:18.55+00:00

    The phone cannot add domains, so DefaultCredentials does not work, usually we can only use System.Net.NetworkCredential to get Credentials on the phone.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.