.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

Getting the exact page causing an error using Server.GetLastError

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
 
Using vb.net/asp.net 2005.in the global.asax page in the application error page I am getting the exception information as follows: Dim CurrentException As Exception = Server.GetLastError() Dim ErrorDetails As String = CurrentException.Message.ToString & "<br><br>" & CurrentException.ToString() To find out when there are any exceptions when users are using the system, then the ErrorDetails are being auto-emailed to members on the IT team to help in troubleshooting.The problem is this:  I want to find out what page is the user is on when the exception happens, sometimes the stacktrace does not list the aspx page.  Does anyone know how to get this information?thanksMC


View Complete Post


More Related Resource Links

causing 500 server error :(

  

So, I'm just learning ASP.NET with C#, but this code just makes the page display a "500 - server error page"


the webpage is here: hereswhereyourewrong.net/aspnettest.aspx


the code is as follows:


<%@ Page Language="C#" AutoEventWireup="true" %>
<!-- This program throws up an Error 500: Server Error -->
<!-- I'm not sure why, it compiles just fine. -->
<!-- The last time it was because I had asp:TextBox fields not in a form -->
<!-- but here I just don't know -->
<html>
    <head runat="server" >
        <title>ASP.NET With C# Test</title>
        
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e)
            {
                timeText.Text = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss");
            }

            public void updateTime(object sender, EventArgs e)
            {
                timeText.Text = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss");
            }
        </script>    
    </head>
    <body>
        <div style="text-align: center;">
            <form runat="server" ID="timerForm">
                <asp:ScriptManager ID=

Internal server error exception on search results page when no language is set in browser

  
We have some users who receive an internal server error exception when they enter a search query on our SPS 2010 site. The SharePoint log shows the following: Internal server error exception: System.ArgumentNullException: Value cannot be null.  Parameter name: The property RequestedLanguage cant not set to NULL     at Microsoft.Office.Server.Search.Query.Location.set_RequestedLanguage(CultureInfo value)     at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.CreateLocationList()     at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.SetPropertiesOnQdra()     at Microsoft.Office.Server.Search.WebControls.SearchResultsBaseWebPart.EnsureWebpartReady() System.ArgumentNullException: Value cannot be null.  Parameter name: The property RequestedLanguage cant not set to NULL     at Microsoft.Office.Server.Search.Query.Location.set_RequestedLanguage(CultureInfo value)     at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.CreateLocationList()     at Microsoft.Office.Server.Search.WebControls.CoreResultsDatasourceView.SetPropertiesOnQdra()     at Microsoft.Office.Server.Search.WebControls.SearchResultsBaseWebPart.EnsureWebpartReady() After some more diggin

Server error: is checked out or locked for editing by ... but page does not exist

  

I tried to rename a page in the source variation of a Publishing Site using Site Content and Structure tool, let's call it "newpage". This threw an HTTP 500 error. I then tried to rename it in SharePoint Designer. I got two message prompts, the first said:

"A file with the name Pages/newpage.aspx already exists. Do you want to replace this file?"

There is no file of that name in the Pages list in either the source or target variation. I said "Yes" and got the following error:

"Server error: The file <path>/newpage.aspx is checked out or locked for editing by ."

No user name was given in the message. I can successfully rename the page in the target variation to have the new name.

I also cannot create a new page in the source variation called newpage.aspx, I get an error saying that there is already a page of that name ... but there isn't. I have cleared the site and site collection recycle bins.


Server Error Page: Some part of your SQL statement is nested too deeply.

  

Hello.  I've come across this error page with a Sharepoint Server 2007.  I've seen a few forums that say that Microsoft was going to fix this issue in its next major version, but I couldn't find out what version that was.  Is the 2007 version without a fix for this?  Is there a patch I could get, or is this part of a bigger issue?

I should mention, I've received this error page after simply editing html code in a web part.  There was no editing of sql statements.  Thanks in advance.


Server Error in '/' Application on a personalised sharepoint page

  

Hi,

I have a login to a sharepoint subsite where the default.aspx has been modified to show a personalised page. Unfortunatley it is now showing an error relating to a datasource for a report. This has been fixed but the personalized page stillthrows an error on login so I cannot get to the settings to remove the problem.

 

Is it possible to remove the personalised page via the back end? Either via the sharepoint database or by Sharepoint Desiginer.

 

Thank you.


URL Rewriter causing a "500 Internal Server Error"

  

Hi All-

I've set up URL Rewriting per Scott Guthrie's guidance (Scott's blog -  Approach 3: Using an HTTP module to perform extension-less url rewriting with IIS7)  and I'm using Url Rewriter.

OK, so it was a piece of cake to setup and everything runs perfectly on the dev server (cassini).  I was all excited and put it on the production server and it immediately choked -  the site won't even load and instead gives a "500 internal server error" 

Production server is a shared hosting environment running IIS 7 in integrated mode , ASP.net 3.5  and SSL.

I have another HTTP module installed called Security Switch , which I disabled to remove it from the equation.  I don't think that affects anything since it was already running fine on the dev server and prod server, but I'm not 100% sure and wanted to throw it out there if that helps diagnose.

I've followed the setup instructions precisely, triple checked everything in web.config and I can't figure out what I'm doing wrong.  I'm guessing it must be getting stuck in the IIS 7 pipeline somewhere.  I've read through all the installation docume

Server Error after Trying to Upload New Master Page

  

I edited our master page in SharePoint Designer 2007 and uploaded the new version.

The new version never made it to the server, and I can no longer authenticate in to make changes. I receive a 404 error - telling me "The file /Local%20Settings/Temporary%20Internet%20Files/Content.IE5/EMWCDP71/_controltemplates/DesignModeConsole.ascx does not exist."

All of our other users can still authenticate, I am the only one receiving this error.

I found posts about tildes being stripped in Designer (which they were in the file I attempted to upload)

Changed the file and reuploaded and I am still the only one who is receiving the server error.

Any ideas would be appreciated.

 


Handling 404 page not found with Error page

  

Hi,

      How do i handle 404 page not found?


Sys.Net.WebServiceFailedException: The server method '' failed with the following error:

  

 Hello...

Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

[WebMethod]
        public static string aaa(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

        [WebMethod]
        public static string aaa1(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

 

 

<div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        </asp:ScriptManager>
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

urlrouting - page not found error

  

I have a dynamic data site setup and running locally fine from vs 2008.

When i deploy to a remote windows 2003 server (IIS6), all the pages also work ok apart from one page/table.  I can access it's list page,  but the edit and insert pages throw 404 errors.

I'm thinking it's a url routing/hosting issue as i've copied back the database from the remote server and it all works fine on my local machine.

Is there anything i can do to debug this behaviour?

Below is my register routes entry from the global.asax

Any suggestions greatly appreciated as, i've been stuck on this for days :(


public static void RegisterRoutes(RouteCollection routes)
{
    MetaModel model = new MetaModel();
    model.FieldTemplateFactory = new AdvancedFieldTemplateFactory();

    model.RegisterContext(typeof(Sponsorship.Data.Entities), new ContextConfiguration() { ScaffoldAllTables = false });
    model.DynamicDataFolderVirtualPath = "~/admin/DynamicData";

    routes.Add(new DynamicDataRoute("admin/{table}/{action}.aspx")
    {
        Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),

Error upgrading SQL Server 2008

  

i was normally using VS2005 and SQL server 2005...

i upgraded to SQL Server 2008... and then...

i could not build my project anymore... because of this 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.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source Error: 

Very Basic Question - Error message running first page

  

Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!

 

I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).

 

Appreciate any help I can get!

Thankyou!

 

 


Page not found using ASP.NET Development server

  

Hi to all forum members

I got this problem. When I try to run a test project I receive "Page not found" in browser opened by ASP.NET Development server. I am logged as administrator to my WIN XP. And I am using VS2005. I had VWD and ASP.NET 2.0 before but  removed everything before installing VS2005. Do you hav eany idea why is this happening.

p.s. I do not use any firewall only nod32 as antivirus program

I will be very glad is someone can help me.


Error Handling: Throwing Custom Exception Types from a Managed COM+ Server Application

  

Exception handling semantics in .NET are based on type, so you can create custom exceptions that have their own properties and methods. In .NET, exceptions are first-class citizens, and since they're the built-in error handling mechanism, all .NET-compliant languages must support exceptions. In addition, COM+ services are available to .NET code as Enterprise Services, so you can leverage exceptions in your Enterprise Services design.In this article the author describes custom exceptions, throwing exceptions across COM interop boundaries, and working with Enterprise Services.

Bob DeRemer

MSDN Magazine March 2004


Page.FindControl Causing Null Reference Exception

  

Hi guys,

I developed a page in VWD 2008 and it works perfectly locally, but when I deployed it on the server every Page.FindControl() call is causing the NullReference Exception "Object reference not set to an instance of an object. " Can anyone help me out? Code is below

Cheers,

Mike Marshall

            For i As Integer = 1 To 10
                If (CType(Page.FindControl("last_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("first_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("dob_" & i), TextBox).Text.Length > 0) Then
                    Dim person_entry(7) As String
                    person_entry(0) = info_list.Count - 1
                    person_entry(1) = CType(Page.FindControl("last_" & i), TextBox).Text
                    person_entry(2) = CType(Page.FindControl("first_" & i), TextBox).Text
                    person_entry(3) = CType(Page.FindControl("dob_" & i), TextBox).Text
                    person_entry(4) = CType(Page.FindControl("appear_" & i), TextBox).Text
                    person_entry(5) = CType(Page.FindControl("mental_" & i), TextBox).Text
                    person_entry(6) = CType(Page.FindControl("behave_" & i), TextB

All my server-controls became unrecognized!!! like there's compilation error or web.config missing!

  

hi!

please help - the problem is in post subject.

I have lots of warnings with following text:

"Warning 10 Element 'HyperLink' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. C:\Users\Pavel\Documents\Visual Studio 2010\WebSites\BioWebSite\ToScientist.aspx 26 18 C:\...\BioWebSite\" 

But web.confg is there! And there's no compilation error!

Site builds just fine. And If I upload it to my hoster - it works!

 

But with all these errors I cant add controls to pages - VS2010 adds hyperlink without ID, and intelisens stoped to work.

Strange, but in my other project (web-application) I have no such difficuty.


sql server agent - job schedule 22022 error

  

Hi ! I have scheduled a job in sql server 2008 to send birthday e-mails. I run the script and it looks wroking but in agent schedule it doesn't. I am getting the below error; what is the problem?


TITLE: Microsoft.SqlServer.Smo
------------------------------
Start failed for Job 'Sending_transferdb_birthdate_e-mails'. 
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Start+Job&Link
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend