locked
The remote server returned an error: (500) Internal Server Error RRS feed

  • Question

  • User-1293988505 posted

    hi all,

    I dont know is it the currect forum,

    I am new in asp.net and my company had a project and all of this project devolopers leave from here , no one know about the project. I need to update it.

    Actually all are configured locally in my windowsXP system. database ,iis,project file all are here.

     

    while I am using webrequest I get an error

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

    the error and code are here

    Please help me

    The error is

     

    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 50:         End If
    Line 51:
    Line 52: wResp = wr.GetResponse
    Line 53: sr = New System.IO.StreamReader(wResp.GetResponseStream)
    Line 54: Shtml = sr.ReadToEnd


    Source File: F:\Prajeesh\ava-006\lead.report.aging.aspx.vb    Line: 52

    Stack Trace:

    [WebException: The remote server returned an error: (500) Internal Server Error.]
    System.Net.HttpWebRequest.GetResponse() +5375997
    ava_006.lead_report_aging.GetReport(String strFormat, String strWeek) in F:\Prajeesh\ava-006\lead.report.aging.aspx.vb:52
    ava_006.lead_report_aging.btnView_Click(Object sender, EventArgs e) in F:\Prajeesh\ava-006\lead.report.aging.aspx.vb:73
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +107
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3436



    Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618

    AND the code I use is

     

    <pre lang="vb">Function GetReport(ByVal strFormat As String, ByVal strWeek As String) As String

            Dim wr As WebRequest

            Dim wResp As WebResponse

            Dim sr As StreamReader

            Dim Shtml As String

            If InStr(Request.ServerVariables(&quot;path_info&quot;), &quot;ava-006&quot;) &gt; 0 Then

                wr = HttpWebRequest.Create(&quot;http://&quot; &amp; Request.ServerVariables(&quot;server_name&quot;) &amp; &quot;/ava-006/lead.report.agingsub.aspx?pFormat=&quot; &amp; strFormat &amp; &quot;&amp;pWeek=&quot; &amp; strWeek)

            Else

                wr = HttpWebRequest.Create(&quot;http://&quot; &amp; Request.ServerVariables(&quot;server_name&quot;) &amp; &quot;/lead.report.agingsub.aspx?pFormat=&quot; &amp; strFormat &amp; &quot;&amp;pWeek=&quot; &amp; strWeek)

            End If

            wResp = wr.GetResponse

            sr = New System.IO.StreamReader(wResp.GetResponseStream)

            Shtml = sr.ReadToEnd

            GetReport = Shtml

        End Function</pre>

    Please help me why this error occur and how it solve.

    Friday, June 24, 2011 8:48 AM

Answers

  • User-1359474226 posted

    Hi

    Try cleaning the solution and Rebuil after it. There may be many reasons for this error. Use fiddler to debug and get the http response and see where it is failing. What is the event log saying.

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 24, 2011 10:17 AM

All replies