ASP.NET "Object reference not set to an instance of an object" error..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snester
    New Member
    • Oct 2008
    • 12

    ASP.NET "Object reference not set to an instance of an object" error..

    Hi,

    I am using visual studio 2005 and recently created a new web service project. I seem to have edited the global config file (inadvertently) somewhere along the line.

    All new projects I have created since the above web service project have generated two errors while debugging. The first error, I believe I have fixed but I cannot fix the second error. I mention the first error below incase it is the cause of the second error..

    1) The initial error I received was:

    No http handler was found for request type 'GET'

    I fixed this by adding the following to the machine.config file:
    <httpHandlers >
    <add verb="*" path="*.aspx" type="System.We b.UI.PageHandle rFactory"/>
    </httpHandlers>

    2) Now the second error which I cannot work out is:

    Object reference not set to an instance of an object.

    Can anyone help?

    Many thanks!



    ~Further detail of error~
    Source Error:


    [No relevant source lines]


    Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\test\707a a381\7394c385\A pp_Web_tkfgqqdr .0.cs Line: 0

    Stack Trace:


    [NullReferenceEx ception: Object reference not set to an instance of an object.]
    System.Web.UI.P age.SetIntrinsi cs(HttpContext context, Boolean allowAsync) +200
    System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context) +14
    System.Web.UI.P age.ProcessRequ est(HttpContext context) +49
    ASP.default_asp x.ProcessReques t(HttpContext context) in c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\test\707a a381\7394c385\A pp_Web_tkfgqqdr .0.cs:0
    System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute() +181
    System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean& completedSynchr onously) +75
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    HI Snester,

    This error is caused my reference to namespaces, check that out.

    Comment

    • snester
      New Member
      • Oct 2008
      • 12

      #3
      Thank you, found the problem..

      I was on the right track but didn't quite get it.. the error was caused within the web.config file located in the Microsoft.NET\F ramework\v2.0.5 0727\CONFIG\ folder. It seems somehow I managed to save over this web.config file with my web services project web.config file.
      I think it is due to the handy feature in Visual Studio which allows the opening of external files into a new tab, on the same screen as a project. Opps.

      Comment

      Working...