How to solve:"The remote server returned an error: (500) Internal Server Error. "

 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
0
anjanforum
11/15/2007 10:07:27 AM
asp.net.personalization 3779 articles. 0 followers. Follow

5 Replies
658 Views

Similar Articles

[PageSpeed] 45

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


--- Pratim Kumar Das
( Web Developer)
0
das_pratim
11/15/2007 10:24:17 AM

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

How can i solve?

Thanks for reply.


anjan kumar maity
0
anjanforum
11/15/2007 10:28:02 AM

Hello,

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

Regards


Windows Hosting ASP.NET | Top ASP.NET Hosts | Dedicated Windows Hosting
0
HostingASPNet
11/15/2007 10:28:19 AM

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
0
anjanforum
11/15/2007 10:41:50 AM
You may right click on your project folder; In security tab, you give write permission to Users..
 try it..
--- Pratim Kumar Das
( Web Developer)
0
das_pratim
11/16/2007 9:13:59 AM
Reply:

Similar Artilces:

Message="The remote server returned an error: (500) Internal Server Error."
 HI,when I try to call a simple web method with parameters using HTTP Post I am getting this error "Message="The remote server returned an error: (500) Internal Server Error.""  This My Web Method [WebMethod]        public string getDataWithParm1(string aaa)        {            string ss= "yytry";            ss =ss + " asdfg" ;            r...

System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
I have written a web service and tested it and it works fine from the .asmx test page. However, when I attempt to call it with a post I get this error:  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: Line 164: myStream.Close() ...

Web Service Error : The remote server returned an error: (500) Internal Server Error
Hi i am getting an error when trying a simple web service. if i run both the web service and the client .aspx page on the same server it works fine, But when i put it on a different server it doesnt work at all and gives me this error"System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at HttpUtils.HttpPost(String URI, String Parameters) in e:\Websites\C#\Live\CMS\Trunk\App_Code\siteFunctions\HttpUtils.cs:line 35"UserApi.asmx  [WebMethod] public string HelloName(string name) { ...

The remote server returned an error: (500) Internal Server Error
Hi  String strUrl = "http://catalogues.cataloguecentral.com.au/global/search/search.aspx?";              // Create a request using a URL that can receive a post.         WebRequest request = WebRequest.Create(strUrl);        // Set the Method property of the request to POST.        request.Method = "POST";        // Create POST data and convert it to a byte array. &...

remote server returned an error: (500) Internal Server Error.
Hi Frnds, I have Using HTTP Post Method ,Already create Webconfig fine(  <webServices>      <protocols>        <add name="HttpGet"/>        <add name="HttpPost"/>      </protocols>    </webServices> )But i got  remote server returned an error: (500) Internal Server Error. i am not using SOAP.. public void Post()        {      ...

he remote server returned an error: (500) Internal Server Error.
Hi, I would like to connect a webservice. But I don't want to use "add web reference" -------------------------------------------------------------------------------------------- string strSoapMessage = "<?xml version='1.0' encoding='UTF-8'?>" + "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"+ "<soap:Body>"+ "<GenerateSessionKey xmlns='http://www.artwork-systems.com/webway/sessions'>"+ "<login>test</login>"+ "<auth>test<...

The remote server returned an error: (500) Internal Server Error
I have a VB.Net application where I am posting to an HTTP server that has a classic asp page and I am getting the following exception (it's throwing the exception on line 13).  Does anyone know how to troubleshoot this?  thanks  : <EXCEPTION> The remote server returned an error: (500) Internal Server Error </EXCEPTION> 1                            PostData = "externalID=" ID2 Dim strPath As ...

The remote server returned an error: (500) Internal Server Error.
When I remote access in website by application on window to extract data I have error : The remote server returned an error: (500) Internal Server Error. This is my code : Dim PostData As String = _ "__VIEWSTATE=" & tmpvs & _ "&txtUserName=" & UserID & _ "&txtPassword=" & PWord & _ "&chkPersistant=1" & _ "&btnSignIn=SignIn" '& _ Dim Data() As Byte = encoding.GetBytes(PostData) Dim LoginReq As Net.HttpWebRequest = Net.WebRequest.Create(loginURL) With LoginReq .KeepAlive = Fals...

The remote server returned an error: (500) Internal Server Error.
 System.Net.WebException: The remote server returned an error: (500) Internal Server Error.     i implemented the search functionality in the website searchdotnet some application i got ,i inegrated it ,it works fine localhost but on server i created some problemMark As Answer If my reply helped you. It means that an exception occured , you can specify in the web.config to show the exact exception to remote hosts.what is the <customErrors> configuration in your web.config ?   J.W.Please click "Mark as Answer" on this post if it helps you...

The remote server returned an error: (500) Internal Server Error. #3
I am trying to access a web site using below snippet HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse webResponse = (HttpWebResponse)httpWebRequest.GetResponse(); This is occuring for particular web site and rest of the web site working fine.  Error:  The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() -532459699...  Also, i tried with below options 1. Adding Credential likeNetworkCredential networkCredential = new NetworkCredential("user name", "pwd", &qu...

The remote server returned an error: (500) Internal Server Error. #2
I am testing a utility program that loops through my localhost and pulls out all of the meta tag information and page titles.   After I do a recursive directory search and have all of the pages i convert the directory path's to urls and call the pages using the following code WebClient wc = new WebClient(uri); string page = wc.DownloadString(uri); This seems to work fine for the first few sites, however at a certain point i start getting (The remote server returned an error: (500) Internal Server Error.).  Nothing is wrong with the URI however it just seems to st...

The remote server returned an error: (500) Internal Server Error #2
Hello, I'm trying to send the request from site A to site B in localhost but get an error "The remote server returned an error: (500) Internal Server Error" in programatically.  The code below used to work for me and all of a certain it fails to send the request to site B (order site). The order site by itself is still up and running but when I try to send the request to this site in the code, it fails because of (500) Internal Server Error.  I also tried to restart the IIS but still doesn't work.  Does anyone knows why?  mReqUrl =...

IIS7 + HttpModule = "HTTP Error 500
I am trying to implement an HttpModule to run under IIS7 on Vista Beta 2, but cannot seem to get it to work. I have implemented a simple .aspx page to verify that it isn't a Framework issue and the page works fine.I have written an exeedingly simple HttpModule to verify the issue:using System;using System.Web;namespace Spike.Web{    public class DocumentModule : IHttpModule    {        public void Dispose()        { }        public void Init(HttpApplication c...

Only Firefox Get "Error code 500. Message: Internal Server Error"
I just started having a problem in Firefox 1.5.07, but not Opera or IE, when every I get to a site where where I'm directed to an htpps page, I get this diagnostic: Error code 500. Message: Internal Server Error. I've uninstalled and reinstalled Firefox and have cleared all personal data, cookies, files, directories, etc. I'm stuck! What can I do? Thanks a lot for your help. Trish Trish wrote: > I just started having a problem in Firefox 1.5.07, but not Opera or > IE, when every I get to a site where where I'm directed to an htpps > page, I g...

Web resources about - How to solve:"The remote server returned an error: (500) Internal Server Error. " - asp.net.personalization

Resources last updated: 12/9/2015 10:49:59 AM