Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2003
    Location
    Tulsa, Ok, USA
    Posts
    1
    Rep Power
    0

    Parser Error Message: Could not load type


    I have seen this error reported numerous times in different forums, but haven't found the solution to my particular problem yet. I have created a few sample ASP.net apps, from a book I am studying, and haven't had any trouble compiling and running my apps, until recently. Now I get the following error when I create a new ASP.NET Web Application (VB.net) in VS.net, and "Start" the application.

    -----------------------------------------------------------
    Parser Error
    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load type 'WebApplication2.Global'.

    Source Error:

    Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="WebApplication2.Global" %>

    Source File: c:\inetpub\wwwroot\WebApplication2\global.asax Line: 1
    ---------------------------------------------------------------

    It doesn't matter whether I add web controls to the form or not. I haven't knowingly changed anything about my environment since I was previously able to compile and run ASP.NET apps. And I'm not changing any of the default code that is generated by VS.NET before I attempt to start the application.

    The suggestion solution to this error usually contains a warning that the application has not been built or is not located in the bin subdirectly of the virtual directory. But my app IS being built (WebApplication2.dll) and IS located in the bin subdirectly of my virtual directory.

    I would appreciate any suggestions.
  2. #2
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2003
    Posts
    27
    Rep Power
    0

    IIS Application?


    Is WebApplication2 configured as an application in IIS?
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2003
    Location
    Texas
    Posts
    7
    Rep Power
    0

    Question Setting IIS Application Not Solving Problem


    I am having the same problem, but setting the IIS application variable does not resolve the problem. Any other suggestions?
  6. #4
  7. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2003
    Location
    Iran
    Posts
    1
    Rep Power
    0
    Hi
    Oh, I had this problem for new web forms added to solution, but after a short navigating in VS menu I found the solution --> Ctrl +Shift +B you should "rebuild solution" from "Build" menu.

    Regards
  8. #5
  9. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2003
    Posts
    2
    Rep Power
    0
    I found that by moving your global files into the bin folder within the project, this problem is taken care of. In the solution explorer click on "show all files" and drag the global files into the foler.
  10. #6
  11. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2003
    Posts
    27
    Rep Power
    0

    Don't do this


    All it achieves is to remove the page (Global.asax) that asks the application for an instance of YourApp.Global. As it's not in the application's root any more it won't be invoked at the beignning of any request. It's bound to remove the error since the class will never be loaded. You may as well delete Global.asax to achieve this result.

    It doesn't address the class loader issue, just stops the class being loaded at all.
  12. #7
  13. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2003
    Posts
    1
    Rep Power
    0

    Thumbs up


    I had the same problem with one of my projects. After searching on Internet I found on Microsoft site this article http://support.microsoft.com/default...;EN-US;Q306155.
    I have tried to build the solutions ( VS) but nothing worked. Finally I deleted the 'dll' from bin folder and I compiled again.
    Worked !
    Last edited by daprodu; September 25th, 2003 at 10:45 PM.
  14. #8
  15. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2003
    Posts
    3
    Rep Power
    0
    Thanks daprodu

    This error out of the blue started occuring for me I pulled my hair out until I tried all sorts, rebuilding restarting services, blah blah, until after reading your post I deleted the dlls and rebuilt the app it started working again. Sounds like VS got its nickers in a twist!

    Thanks again, hopefully my hair will start to grow back!

    R
  16. #9
  17. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2003
    Posts
    1
    Rep Power
    0
    In case anybody else encounters this error, I felt I should post my solution. I have been trying for two days to solve it, and the tip someone gave on one of the forums helped me out.

    We have a very large application and our clients are using various versions. When they encounter a bug that we cannot pinpoint right away on an older version, we have to load it on out dev platforms in order to debug it. The simplest method we've found to do this, is to modify the relevant paths in IIS and reload and compile in VS.NET.

    So I recently had to do this, and when I finished, I tried to reload the newest dev version. Everything compiled ok, but one of the projects returned this error. Someone posted a tip about problems in the Project properties dialog. So I opened it up and found that the file share path under Web Settings had an extra slash that had not been there before.

    That is, the path was:
    D:\Dir1\Dir2\IISRoot\\SolutionDir\ProjectDir

    Removing the extra slash, closing the studio, reopening and compiling solved the problem.

    Hope that helps.
  18. #10
  19. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2004
    Location
    Islamabad
    Posts
    1
    Rep Power
    0
    Hi

    The same error was occuring, i tried many things as discussed above when i finally noticed that my bin directory was named cgi-bin. When i renamed it to bin, site started working.

  20. #11
  21. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0

    Unhappy


    I have been trying for two days to resolve this same problem - please anyone I'm really getting desperate!

    Things I've tried
    Rebuild Project - many times
    Rebuild Solution - many times
    delete dll from bin & rebuild - 3 times
    delete entire bin dir & rebuild - 2 times
    Rebuild solutions and project - 10 more times
    remove problem file from solution, rebuild, add problem file back rebuild - 2 times
    Change dir to application in IIS
    remove application - different error
    change back to application - same error

    have read tech notes referred to in this thread - either not applicable or did not help at all. e.g. rebuild project....

    Help please!
  22. #12
  23. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0

    my solution to the problem


    I had the same problems while i was developing a webapplication and a webservice.
    My cause of the problem was that i changed the Output Path in the project properties for the Debug and Release configuration.
    I thought i was handy to build the Debug version of the dll's to \bin\Debug and the Release version of the dll's to \bin\Release.
    But for some reason IIS and/or VS does not understand to not only look in the \bin directory but also in the other directories.

    I guess the general solution is to see if your latest build dll's are in the correct bin directory right under the directory where global.asax is.

    Good luck
  24. #13
  25. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Mar 2004
    Location
    Canada
    Posts
    1
    Rep Power
    0

    I found another answer


    Hi, just thought I'd share my answer to this frustrating problem.

    Basically what I found was that for some reason, the class names that my .aspx pages where inheriting from were wrong. What happened
    was that when checking the project in to source control, I had actually named my solution "Something.Net". This meant that all my
    code behind inheritance directives said "Something.Net.class". (i.e. Something.Net._default) This may have been a problem.

    When I noticed that, I recreated the solution as just "Something" and copied the files from the old solution. I then had to go in to the .aspx files
    and change the page directives so that the pages inherited from Something._default.

    After that it worked fine.

    Good luck.
  26. #14
  27. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2003
    Location
    Highland, IN
    Posts
    5
    Rep Power
    0

    Machine.Config


    I had the same problem today and wanted to thank you for posting what resolutions everyone came up with. Mine however; did not work using any of the above suggestions. Instead; I had to copy the file C:\WINNT\MICROSOFT.NET\FRAMEWORK\VER....\CONFIG\MA CHINE.CONFIG from the production server (which was working fine) to the developer server (which somehow got corrupted)

    I tried adding a reference to SYSTEM.WINDOWS.FORMS.DLL and found it didnt work so when I removed the reference; that is when I started getting the error message.


    Best,
    KaptKos
  28. #15
  29. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    May 2004
    Posts
    2
    Rep Power
    0

    Thumbs up I got solution at last.


    I too faced the same problem and finally looking over this thread , I found that the problem lies in the configuration of the project in folder in IIS. After fixing it, application is running like a horse.
Page 1 of 2 12 Last
  • Jump to page:

Similar Threads

  1. Replies: 8
    Last Post: January 28th, 2009, 03:32 AM
  2. MSXML unable to load file
    By nineone in forum ASP Development
    Replies: 2
    Last Post: January 20th, 2004, 09:33 AM
  3. ASPNET Parser Error on Server
    By codyc in forum .NET Development
    Replies: 6
    Last Post: May 27th, 2003, 04:41 AM
  4. Replies: 0
    Last Post: July 27th, 2000, 02:12 AM
  5. Replies: 0
    Last Post: July 27th, 2000, 02:12 AM

IMN logo majestic logo threadwatch logo seochat tools logo