CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: Date Entered: 11/15/2007 10:07:27 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 5 Views: 670 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
"anjanforum" <>
NewsGroup User
How to solve:"The remote server returned an error: (500) Internal Server Error. "11/15/2007 10:07:27 AM

0

 I am working On asp.net2.0(c#)

In creating rss i used a user control by writing xml dynamically.

It is working well in my personal server but in my client server it is producing error such that..

Server Error in '/GetReception' Application.

The remote server returned an error: (500) Internal Server Error.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[WebException: The remote server returned an error: (500) Internal Server Error.]
   System.Net.HttpWebRequest.GetResponse() +1529755
   System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials) +61
   System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) +1865280
   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.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +145
   System.Xml.XmlDocument.Load(XmlReader reader) +96
   System.Xml.XmlDataDocument.Load(XmlReader reader) +190
   System.Xml.XmlDocument.Load(String filename) +157
   System.Xml.XmlDataDocument.Load(String filename) +17
   GetReception.UI.Controls.RssReader.DoBinding() +118
   GetReception.UI.Controls.RssReader.Page_Load(Object sender, EventArgs e) +5
   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) +1061


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

 

I am used the user control  :RssReader.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RssReader.ascx.cs" Inherits="GetReception.UI.Controls.RssReader" %>

<div class="sectiontitle">

<asp:HyperLink ID="lnkRss" runat="server" ToolTip="Get the RSS for this content">

<asp:Image runat="server" ID="imgRss" ImageUrl="~/Images/rss.gif" AlternateText="Get RSS feed" />

</asp:HyperLink>

<asp:Literal runat="server" ID="lblTitle"/>

</div>

<asp:DataList id="dlstRss" Runat="server" EnableViewState="False">

<ItemTemplate>

<small><%# Eval("PubDate", "{0:d}") %></small>

<br>

<div class="sectionsubtitle"><asp:HyperLink Runat="server" ID="lnkTitle"

NavigateUrl='<%# Eval("Link") %>' Text='<%# Eval("Title") %>' /></div>

<%# Eval("Description") %>

</ItemTemplate>

</asp:DataList>

<p style="text-align: right;"><small><asp:HyperLink Runat="server" ID="lnkMore" /></small></p>

 In RssReader.cs

public partial class RssReader : BaseWebPart

{

public RssReader()

{

this.Title = "RSS Reader";

}

 

[
WebBrowsable,

WebDisplayName("Rss Url"),

WebDescription("The Url of the RSS feed")]public string RssUrl

{

get { return lnkRss.NavigateUrl; }

set { lnkRss.NavigateUrl = value; }

}

 

[
WebBrowsable,

WebDisplayName("Header Text"),

WebDescription("The header's text")]public string HeaderText

{

get { return lblTitle.Text; }

set { lblTitle.Text = value; }

}

 

[
WebBrowsable,

WebDisplayName("Number of columns"),

WebDescription("The grid's number of columns")]public int RepeatColumns

{

get { return dlstRss.RepeatColumns; }

set { dlstRss.RepeatColumns = value; }

}

 

[
WebBrowsable,

WebDisplayName("More Url"),

WebDescription("The Url of the link pointing to more content")]public string MoreUrl

{

get { return lnkMore.NavigateUrl; }

set { lnkMore.NavigateUrl = value; }

}

 

[
WebBrowsable,

WebDisplayName("More Text"),

WebDescription("The text of the link pointing to more content")]public string MoreText

{

get { return lnkMore.Text; }

set { lnkMore.Text = value; }

}

protected void Page_Load(object sender, EventArgs e)

{

DoBinding();

}

protected void Page_PreRender(object sender, EventArgs e)

{

DoBinding();

}

protected void DoBinding()

{

//try

//{

if (this.RssUrl.Length == 0)

throw new ApplicationException("The RssUrl cannot be null.");

// create a DataTable and fill it with the RSS data,

// then bind it to the Repeater control

XmlDataDocument feed = new XmlDataDocument();

string s = GetFullUrl(this.RssUrl);

feed.Load(GetFullUrl(this.RssUrl));

 

XmlNodeList posts = feed.GetElementsByTagName("item");

DataTable table = new DataTable("Feed");

table.Columns.Add("Title", typeof(string));

table.Columns.Add("Description", typeof(string));

table.Columns.Add("Link", typeof(string));

table.Columns.Add("PubDate", typeof(DateTime));

foreach (XmlNode post in posts)

{

DataRow row = table.NewRow();

row["Title"] = post["title"].InnerText;

row["Description"] = post["description"].InnerText.Trim();

row["Link"] = post["link"].InnerText;

row["PubDate"] = DateTime.Parse(post["pubDate"].InnerText);

table.Rows.Add(row);

}

dlstRss.DataSource = table;

dlstRss.DataBind();

//}

//catch (Exception ex)

//{

// string s = ex.Message;

// //this.Visible = false;

//}

}

private string GetFullUrl(string url)

{

if (url.StartsWith("/") || url.StartsWith("~/"))

{

 

string ur = this.Request.ApplicationPath;if (ur.EndsWith("/"))

 

url = ur + url;

else

url = ur + "/" + url;

url = url.Replace("~/", "");

url= this.Request.Url.AbsoluteUri.Replace(this.Request.Url.PathAndQuery, "") + url;

}

return url;

}

}

How ian get aroun that problem.Please reply me.

Thanks for early reply.

 


anjan kumar maity
"das_pratim" <>
NewsGroup User
Re: How to solve:"The remote server returned an error: (500) Internal Server Error. "11/15/2007 10:24:17 AM

0

I think this is server specific error. is appear  the  same error at all server? Smile


--- Pratim Kumar Das
( Web Developer)
"anjanforum" <>
NewsGroup User
Re: How to solve:"The remote server returned an error: (500) Internal Server Error. "11/15/2007 10:28:02 AM

0

But is not hapening on my server. It is happening on my client server.

How can i solve?

Thanks for reply.


anjan kumar maity
"HostingASPNet"
NewsGroup User
Re: How to solve:"The remote server returned an error: (500) Internal Server Error. "11/15/2007 10:28:19 AM

0

Hello,

Try to give write access permission (of the XML file) to the ASP.NET user.

Regards


Hosting ASP.NET | Top ASP.NET Hosting Providers
"anjanforum" <>
NewsGroup User
Re: How to solve:"The remote server returned an error: (500) Internal Server Error. "11/15/2007 10:41:50 AM

0

How to give access permission to xml file? here i am writing xml file dynamically through asp.net 2.0 in a .aspx page.....

 thanks. 


anjan kumar maity
"das_pratim" <>
NewsGroup User
Re: How to solve:"The remote server returned an error: (500) Internal Server Error. "11/16/2007 9:13:59 AM

0

You may right click on your project folder; In security tab, you give write permission to Users.. try it..
--- Pratim Kumar Das
( Web Developer)
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:













how can a method be called on clicking an embed tag in asp.net

how do you display products like this in a web page

asp.net 2.0 printing in server

working with authorization and authentication

oledb not in c#??

any recommended communication tools for web applicaitons

integrate paypal with asp

refreshing page after post to database without re-post

tooltips help

helper class - urgent

windows media player - web application

ftp out from godaddy

data structures

object reference not set to an instance of an object. - label

how to add a querystring variable and reload the page to use it without loosing the checked checkboxes?

stylesheet does not get displayed right in firefox

creating a xbap wpf application for use in a shared hosting environment

vb .net app vs. asp .net -- where to draw the line?

i need editable dropdown list in vb.net is it possible??

working with dates

label text not showing outside of page_load

missing variable

viewing sql string passed to db

comment post on web page

bulletedlist problem

problems with view state and different forms

application_end event is not being fired

system.nullreferenceexception: object reference not set to an instance of an object.

copy project in vs.net returns error.

objectspace is missing ..!

encoding problem

new to asp.net

iexplore.exe-application error

how to capture video from the web cam using c#(.net)

how to handle events in controls , which are loaded at runtime

classic asper attempting simple db tasks in asp.net!

how can i create a dll from a module in vb.net

registry access asp.net/vb.net

accessing the serial port using asp

what's the difference between the cache and session object ?

executereader requires an open and available connection. the connection's current state is closed.

frontpage extension help plz

free subscription of newsletter??

browsing asp.net 2.0 pages with axwebbrowser .net control problems

about asp.net1.1

please help!!! destination page question.

question about drop down list (asp.net v2)

newbie object question

set and let commands

reading a list of files from a directory

   
  Privacy | Contact Us
All Times Are GMT