can anyone help me Read Rss Feeds?

B

bilal

Here is the error that i get. i'm new to Dot Net but have a good
programming background.

Hope someone can help me out... thanks.


Security Exception
Description: The application attempted to perform an operation not
allowed by the security policy. To grant this application the required
permission please contact your system administrator or change the
application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type 'System.Net.WebPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:


Line 31: //XmlTextReader xmlReader = new XmlTextReader(RSSURL);
Line 32: DataSet ds = new DataSet();
Line 33: ds.ReadXml(RSSURL); <<<<<<<<<<<<<<<<<error
Line 34: return ds.Tables[2];
Line 35: }


Source File: d:\users\cahrp\html\Controls\MedicalNewsFeeds.ascx.cs
Line: 33

Stack Trace:


[SecurityException: Request for the permission of type
'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
+166
System.Net.HttpRequestCreator.Create(Uri Uri) +26
System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
+373
System.Net.WebRequest.Create(Uri requestUri) +28
System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials) +33
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +1868336
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role,
Type ofObjectToReturn) +51
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +44
System.Threading.CompressedStack.runTryCode(Object userData) +54

System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData) +0
System.Threading.CompressedStack.Run(CompressedStack
compressedStack, ContextCallback callback, Object state) +174
System.Xml.XmlTextReaderImpl.OpenUrl() +199
System.Xml.XmlTextReaderImpl.Read() +50
System.Xml.XmlTextReader.Read() +12
System.Xml.XmlReader.MoveToContent() +70
System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
+196
System.Data.DataSet.ReadXml(String fileName) +62
Controls_MedicalNewsFeeds.getRssFeed(String RSSURL) in
d:\users\cahrp\html\Controls\MedicalNewsFeeds.ascx.cs:33
Controls_MedicalNewsFeeds.Page_Load(Object sender, EventArgs e) in
d:\users\cahrp\html\Controls\MedicalNewsFeeds.ascx.cs:18
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object
o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.controls_default_aspx.ProcessRequest(HttpContext context) in
App_Web_a5puntvq.2.cs:0

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +64
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top