Could not load type global.ascx

Last post 11-26-2008 2:40 AM by MisterFantastic. 10 replies.

Sort Posts:

  • Could not load type global.ascx

    04-13-2006, 6:37 PM
    • Member
      132 point Member
    • osos.bg
    • Member since 10-06-2003, 8:18 AM
    • Posts 27

    Hi All

    i'm trying with my community webservice but when trying to add a web reference i got this error

    -------Error Start-----------

    Parser Error Message: Could not load type 'HHCommunity.Communities.Global'.

    Source Error:

    Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="HHCommunity.Communities.Global" %>
    

    Source File: c:\inetpub\wwwroot\HHCommunity\global.asax    Line: 1
    ---------Error End---------

    how any1 explain how to creat the websertvice and consume it using vs2003?

    1st i created a new web service which is called communityService.asmx

    then i created all the other staff  in the Engine/framework/services

    and Engine/framework/webboxes

    when i tried to add a web reference i fiind the error explained above, i tried to exclued the global.ascx from the project with the same error message :S:S

    is there any mistake i made in the sequence of creating the service or what? can any1 explain in details how to create it with all it's related classes untill to reach to the proxy class?

    knowing that i made no changes in the original code.

    any help will be appriciated.

    thnx alot

  • Re: Could not load type global.ascx

    04-13-2006, 9:16 PM
    • All-Star
      17,453 point All-Star
    • albertpascual
    • Member since 05-23-2003, 2:11 PM
    • Riverside, CA
    • Posts 3,474

    Check if you compiled the application and if there is DLLs on the bin directory

    Al

    Cheers
    Al
    My Blog
    MapStats.NET
    Please click on 'Mark as Answer' if this post answered your question!
  • Re: Could not load type global.ascx

    04-14-2006, 3:05 AM
    • Member
      132 point Member
    • osos.bg
    • Member since 10-06-2003, 8:18 AM
    • Posts 27

    Hi Al

    no i didn't compile the application 'coz there's a dependents in the webboxsx'.cs and some other classes depend on the webcservice proxy class which i can' create yet.

  • Re: Could not load type global.ascx

    04-14-2006, 8:10 AM
    • Participant
      868 point Participant
    • BillKrat
    • Member since 08-19-2003, 7:30 PM
    • Amarillo, tx
    • Posts 176

    <%@ Application Codebehind="Global.asax.cs" Inherits="HHCommunity.Communities.Global" %>

    Find your Global.asax.cs file and ensure that the namespace and class name match your Global.asax file

    namespace

    HHCommunity.Communities
    {
          //*********************************************************************
          //
          // Global Class
          //
          // The Global.asax is used to setup the timer for service subscriptions.
          //
          //*********************************************************************

          public class Global : System.Web.HttpApplication
          { ......
  • Re: Could not load type global.ascx

    04-15-2006, 5:14 AM
    • Member
      132 point Member
    • osos.bg
    • Member since 10-06-2003, 8:18 AM
    • Posts 27
    yes they are the same
  • Re: Could not load type global.ascx

    04-15-2006, 8:26 AM
    • Participant
      868 point Participant
    • BillKrat
    • Member since 08-19-2003, 7:30 PM
    • Amarillo, tx
    • Posts 176
    osos.bg:

    Hi Al

    no i didn't compile the application 'coz there's a dependents in the webboxsx'.cs and some other classes depend on the webcservice proxy class which i can' create yet.

    Since they are the same then there probably will not be much you can do until you compile the application (as albertpascual suggested) so that it can find a reference in the application DLL; you might want to create stubs so that you can compile.

  • Re: Could not load type global.ascx

    04-15-2006, 9:43 AM
    • Member
      132 point Member
    • osos.bg
    • Member since 10-06-2003, 8:18 AM
    • Posts 27

    but how can i compile it although these is alot of dependences as i told u?

    all the skinnes files depends on the webboxes.cs whic depends on the connunityService.cs which is the proxy class of the communityService.ascx  :(

    i found that there's an object on the proxy class called client exists only in the proxy class and is used in the "serviceUtility.cs" in the following path "Engine\Framework\Services\Components"

    in the GetRemoteServiceContent()   and ServiceResponseInfo CallCommunityService()

    i hope i've explaind my problem now.

  • Re: Could not load type global.ascx

    04-16-2006, 7:49 AM
    • Participant
      868 point Participant
    • BillKrat
    • Member since 08-19-2003, 7:30 PM
    • Amarillo, tx
    • Posts 176

    Hi osos.bg,

    Assuming that you cannot compile because you are missing a reference to the Client object; "exists only in the proxy class".  If you'll add the following stub to the bottom of your ServiceUtility.cs file you should be able to compile your code until such time that you replace or remove the Client object's original functionality (password security for web services); it appears that you no longer have the proxy class CommunityService which is located in the  /framework/Services/Components/Client folder.

    namespace

    ASPNET.StarterKit.Communities.Services.Client {
          public class CommunityService {
                public string Url;
                public SecurityHeader SecurityHeaderValue;
                public ServiceResponseInfo GetCommunityContent() {
                      return new ServiceResponseInfo();
                }
          public System.Data.DataSet GetFullCommunityContent(string communityName, string sectionPageType, byte[]  lastTimeStamp ){
                      return new System.Data.DataSet();
                }
          }
       
       public class SecurityHeader {
                public string Password;
       }
    }
  • Re: Could not load type global.ascx

    04-24-2006, 5:59 PM
    • Member
      132 point Member
    • osos.bg
    • Member since 10-06-2003, 8:18 AM
    • Posts 27

    Hi Bill

    sorry for being late i've some work to be done.

    thnx for ur reply it's works finally after addin' this to a new class then rebuilt the proj, it'd some bugs but finally it works fine.

    thnx again

  • Re: Could not load type global.ascx

    09-20-2007, 4:29 AM
    • Member
      2 point Member
    • saikatbiswas82
    • Member since 09-20-2007, 8:25 AM
    • Bhubaneswar
    • Posts 1

     I have performed the following steps and it is working fine.

     Go to Control Panel.

    •     Go to “Administrative Tools”  “Microsoft .NET Framework 1.1 Wizards”.
    •     Click “Adjust .NET Security”.
    •     Select “Make changes to this computer” and click “Next”.
    •     Select “Local Intranet” and drag the security level to “Full Trust” and click “Next”.
    •     Click “Finish” and then restart IIS.

    All the best!!! Smile


    -Thanks & Regards,
    Saikat Biswas.
  • Re: Could not load type global.ascx

    11-26-2008, 2:40 AM
    • Participant
      930 point Participant
    • MisterFantastic
    • Member since 09-21-2008, 1:56 AM
    • Chennai
    • Posts 279

     Hi,

     

    Thanks for the solution.This solved my problem.

     Thanks

    Tao of Jeet Kune Do
Page 1 of 1 (11 items)