Parse error: "could not load type"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike S

    #1

    Parse error: "could not load type"

    I'm hoping someone can explain the following.

    I have installed Visual Studio 2003. Setup several web application
    projects, compliled and ran them with no problem. All of this was
    accomplished with my local server. The default or root directory for
    my local IIS server is my "C:\" drive. (c:\inetpub\www root)

    Now I would like to change my root or default directory for my local
    IIS server to be a network drive (x:\inputpub\ww wroot). (This will
    gaurantee me daily backups). After changing the directory property
    for my local IIS server (and running IISRESET) I created a new Visual
    Studio web application just like before, no problem. I put a single
    line of static text on the form and then "built" the solution, just
    like before. However, when I try to view the application in my
    browser I get the following error.

    Parser Error Message: Could not load type 'testproject4.G lobal'.

    I don't understand why pointing the directory to a network drive would
    cause the application to act differently. I have full rights to the
    network drive. I can create, modify and delete files in that
    directory.

    Any help with this problem would be appreciated.

    Thanks
  • Mike S

    #2
    Re: Parse error: "could not load type"

    Thanks for you response.

    The application is a web application consisting of a single aspx page
    with 1 line of static text.

    I'm not sure I understand your theory. Would this still hold true for
    a web application? What specifically should I be checking for in
    terms of security settings? Recall, I have full rights to the network
    shared drive that I am refering to.

    Any suggestions would be appreciated.

    Mike S

    "John Saunders" <john.saunders@ surfcontrol.com > wrote in message news:<up4$08sVD HA.3924@tk2msft ngp13.phx.gbl>. ..[color=blue]
    > Mike,
    >
    > I haven't tried this with ASP.NET applications, but perhaps this is an issue
    > with Code Access Security? If this were a Windows Forms application, for
    > instance, the assembly containing your type would be in a different zone,
    > with less trust than if it had come from a local disk.
    > --
    > John Saunders
    > Internet Engineer
    > john.saunders@s urfcontrol.com
    >
    > "Mike S" <cmsuser@hotmai l.com> wrote in message
    > news:c2e26e6b.0 307300709.40f49 fe2@posting.goo gle.com...[color=green]
    > > I'm hoping someone can explain the following.
    > >
    > > I have installed Visual Studio 2003. Setup several web application
    > > projects, compliled and ran them with no problem. All of this was
    > > accomplished with my local server. The default or root directory for
    > > my local IIS server is my "C:\" drive. (c:\inetpub\www root)
    > >
    > > Now I would like to change my root or default directory for my local
    > > IIS server to be a network drive (x:\inputpub\ww wroot). (This will
    > > gaurantee me daily backups). After changing the directory property
    > > for my local IIS server (and running IISRESET) I created a new Visual
    > > Studio web application just like before, no problem. I put a single
    > > line of static text on the form and then "built" the solution, just
    > > like before. However, when I try to view the application in my
    > > browser I get the following error.
    > >
    > > Parser Error Message: Could not load type 'testproject4.G lobal'.
    > >
    > > I don't understand why pointing the directory to a network drive would
    > > cause the application to act differently. I have full rights to the
    > > network drive. I can create, modify and delete files in that
    > > directory.
    > >
    > > Any help with this problem would be appreciated.
    > >
    > > Thanks[/color][/color]

    Comment

    • John Saunders

      #3
      Re: Parse error: &quot;could not load type&quot;

      Mike, I'd first suggest you check in the documentation on "Code Access
      Security".
      http://msdn.microsoft.com/library/de...l/THCMCh09.asp
      looks interesting, and applies to ASP.NET.
      --
      John Saunders
      Internet Engineer
      john.saunders@s urfcontrol.com

      "Mike S" <cmsuser@hotmai l.com> wrote in message
      news:c2e26e6b.0 307310528.54f96 8a8@posting.goo gle.com...[color=blue]
      > Thanks for you response.
      >
      > The application is a web application consisting of a single aspx page
      > with 1 line of static text.
      >
      > I'm not sure I understand your theory. Would this still hold true for
      > a web application? What specifically should I be checking for in
      > terms of security settings? Recall, I have full rights to the network
      > shared drive that I am refering to.
      >
      > Any suggestions would be appreciated.
      >
      > Mike S
      >
      > "John Saunders" <john.saunders@ surfcontrol.com > wrote in message[/color]
      news:<up4$08sVD HA.3924@tk2msft ngp13.phx.gbl>. ..[color=blue][color=green]
      > > Mike,
      > >
      > > I haven't tried this with ASP.NET applications, but perhaps this is an[/color][/color]
      issue[color=blue][color=green]
      > > with Code Access Security? If this were a Windows Forms application, for
      > > instance, the assembly containing your type would be in a different[/color][/color]
      zone,[color=blue][color=green]
      > > with less trust than if it had come from a local disk.
      > > --
      > > John Saunders
      > > Internet Engineer
      > > john.saunders@s urfcontrol.com
      > >
      > > "Mike S" <cmsuser@hotmai l.com> wrote in message
      > > news:c2e26e6b.0 307300709.40f49 fe2@posting.goo gle.com...[color=darkred]
      > > > I'm hoping someone can explain the following.
      > > >
      > > > I have installed Visual Studio 2003. Setup several web application
      > > > projects, compliled and ran them with no problem. All of this was
      > > > accomplished with my local server. The default or root directory for
      > > > my local IIS server is my "C:\" drive. (c:\inetpub\www root)
      > > >
      > > > Now I would like to change my root or default directory for my local
      > > > IIS server to be a network drive (x:\inputpub\ww wroot). (This will
      > > > gaurantee me daily backups). After changing the directory property
      > > > for my local IIS server (and running IISRESET) I created a new Visual
      > > > Studio web application just like before, no problem. I put a single
      > > > line of static text on the form and then "built" the solution, just
      > > > like before. However, when I try to view the application in my
      > > > browser I get the following error.
      > > >
      > > > Parser Error Message: Could not load type 'testproject4.G lobal'.
      > > >
      > > > I don't understand why pointing the directory to a network drive would
      > > > cause the application to act differently. I have full rights to the
      > > > network drive. I can create, modify and delete files in that
      > > > directory.
      > > >
      > > > Any help with this problem would be appreciated.
      > > >
      > > > Thanks[/color][/color][/color]


      Comment

      • Mike S

        #4
        Re: Parse error: &quot;could not load type&quot;

        John,

        Thanks for the suggestion. At first glance of the article, it looks
        like I'm already running in "FULL" access mode. I'll continue to dig.

        Thanks again,

        Mike S

        Comment

        • Mike S

          #5
          Re: Parse error: &quot;could not load type&quot;

          John,

          THANK YOU !!! Thanks for working through this problem with me. I
          appreciate it.

          Your suggestions and recommendation solved the problem. I ran the
          configuration utility that you mentioned and changed the security
          level of the "local intranet zone" to "full access". (Based on my
          environment, this level is acceptable.)

          For others who may want to know, the steps I went through were:

          1) run ".NET Framework Configuration Utility" (under programs->admin
          tools)
          2) select "Runtime Security Policy" (left side of dialog)
          3) select "Adjust Zone Security" (right side of dialog)
          4) select "Local Intranet Zone"
          5) adjust mode to "Full Access" (for me this was appropriate)

          After making these changes I was able to run the app from a network
          share. I am also able to step through and debug the application as
          well.

          NOTE: The one thing that I noticed was that if I changed the security
          for a specific assembly (by name) those changes were lost when I
          rebuilt the solution. So my recommendation would be to change the
          settings at a higher level than a specific assembly, unless it is your
          final build.


          Thanks again John for all your help.

          Mike S



          "John Saunders" <john.saunders@ surfcontrol.com > wrote in message news:<#1rJbJEWD HA.2212@TK2MSFT NGP12.phx.gbl>. ..[color=blue]
          > Mike, if the .dlls are coming from a network share, they probably do NOT
          > have full access. I believe such assemblies are in the Local Intranet zone.
          >
          > Take a look at ".Net Framework Configuration" in "Administra tive Tools'
          > under "Control Panel". You could grant full rights to the specific
          > assemblies you care about.
          > --
          > John Saunders
          > Internet Engineer
          > john.saunders@s urfcontrol.com
          >
          >
          >
          > "Mike S" <cmsuser@hotmai l.com> wrote in message
          > news:c2e26e6b.0 308010715.60d1e eee@posting.goo gle.com...[color=green]
          > > John,
          > >
          > > Thanks for the suggestion. At first glance of the article, it looks
          > > like I'm already running in "FULL" access mode. I'll continue to dig.
          > >
          > > Thanks again,
          > >
          > > Mike S[/color][/color]

          Comment

          Working...