My company has an office 365 team site. Within it is a secured SharePoint blog. I want to access the RSS feed for the blog from our ASP.NET (3.5) intranet web site to show it as a news feed on our internal home page. The code below works for unsecured RSS feeds but I'm unable to get it to work with our office 365 Sharepoint blog and I'm using a username and password that has full control of the blog site. I get the following error: "The remote server returned an error: (403) Forbidden". I've tried both basic digest for authtype. Any suggestions would be greatly appreciatated. Here is the code:
Dim strURL As String = "url"
Dim MyRssRequest As WebRequest = WebRequest.Create(strURL)
Dim mycache As New CredentialCache
mycache.Add(New Uri(strURL), "Basic", New NetworkCredential("username", "pwd"))
MyRssRequest.Credentials = mycache
Dim MyRssResponse As WebResponse = MyRssRequest.GetResponse()
Dim MyRssStream As Stream = MyRssResponse.GetResponseStream()
Dim MyRssDocument As XmlDocument = New XmlDocument()
Dim MyRssList As XmlNodeList = MyRssDocument.SelectNodes("rss/channel/item")
'process the xml etc.