I get the following error when trying to load an RSS feed:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
My code works fine from my local host, error only occurs when i upload it to my dedicated server!
Here is the code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim signJ As String = DropDownList1.SelectedValue
If signJ <> "" Then
Try
Dim xmlDoc As XmlDocument = New XmlDocument
Dim xdsData As XmlDataSource = New XmlDataSource
Dim xpath_path As String = String.Empty
Dim RSS_Feed As String = String.Empty
xpath_path = "rss/channel/item[title='" & signJ & "']"
RSS_Feed = "http://feedurl.."
xmlDoc.Load(RSS_Feed)
xdsData.Data = xmlDoc.OuterXml
xdsData.XPath = xpath_path
rptData.DataSource = xdsData
rptData.DataBind()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End If
End Sub
Error occurs on this line: xmlDoc.Load(RSS_Feed)
Real stuck on this one! cheers
We had the same behaviour as Todd Smith mentions. After the upgrade to .Net 3.5 SP1 we got this error.
In our case the reason was the protection / obfuscation of our DLLs with Remotesoft Protector.
This is most likely only our problem and not a solution for anyone else. Nevertheless I thought I'd mention it here cause it did cost us some hours to find out.
If you protect, obfuscate your DLLs: disabling that might be worth a try.
I'm not familiar with this error but have you verified that your security/permissions are set correctly on the dedicated server?
Also you might want to confirm that you can access the feed directly from a browser on the dedicated server.
This link may be helpful.
I get the
Attempted to read or write protected memory
Error when I install .NET 3.5 SP1 (so I can develop asp.net mvc apps).
Downgrading to .NET 3.5 without the service pack fixes the error but of course prevents me from doing mvc development. Time to dust off the virtual machine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.