can anyone help me Read Rss Feeds?

Discussion in 'ASP .Net Security' started by bilal, Aug 12, 2006.

  1. bilal

    bilal Guest

    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




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42;
    ASP.NET Version:2.0.50727.42
    bilal, Aug 12, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick Olurotimi Ige
    Replies:
    2
    Views:
    473
    Patrick Olurotimi Ige
    May 5, 2005
  2. =?Utf-8?B?U3RlcGhhbmU=?=

    No I need to start a thread to read RSS feeds?

    =?Utf-8?B?U3RlcGhhbmU=?=, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    295
    sloan
    Jan 25, 2006
  3. Al Dykes
    Replies:
    1
    Views:
    342
    Anders Eriksson
    Sep 4, 2003
  4. Motta
    Replies:
    1
    Views:
    502
    Andy Dingley
    Jun 9, 2004
  5. Jonathan Groll
    Replies:
    1
    Views:
    248
    Kouhei Sutou
    Jun 27, 2009
Loading...

Share This Page