locked
Assemblies won't load from network folder RRS feed

  • Question

  • User-1093164954 posted

     Hi,

    We have a VS2005 web-application solution located on XP machine.  The
    project is done by several team members. Assemlies are defined in
    web.config under <compilation> and namespaces under
    <pages><namespaces>.
    All the computers use sourcesafe 2005 and open the project from
    sourcesafe.
    Everything works fine on the local machine.

    A network machine with XP Pro lists many errors such as "Type
    'SqlDataReader' is not defined", "Type 'StringBuilder' is not
    defined", and so on. The namespaces are defined in web.config so there
    might be a parameter missing there that prevent it being loaded on to
    the network machines.

    Another network machine with Win2k has also error of type (in addition
    to above mentioned errors):
    "ASP.NET runtime error: Could not load file or assembly
    'Microsoft.Practices.ObjectBuilder, Version=1.0.51205.0,
    Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Failed to grant minimum permission requests. (Exception from HRESULT:
    0x80131417)"
    In addition, VS cannot populate the ASP.NET component dropdown-list
    and its associated events that are normally located on the .vb pages
    under the toolbar. The Intellisense does not work for the ASP.NET
    components as well.

    Note also that the bin directory for the assemblies was configured
    with PolicyLevel=FullTrust in Microsoft .NET Framework 2.0
    Configuration (this was suggested by some posts).

    Thanks in advance.

    eelis
    Friday, June 8, 2007 8:09 AM

Answers

All replies

  • User-1363174918 posted

    Are you trying to load assemblies from a network share? Network locations are not considered trusted by default. You either should deply assemblies locally or adjust trust policy using CasPol utility.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 8, 2007 12:12 PM
  • User-1093164954 posted

     Thanks Mikhail.

    I'm actually trying to work on a .NET 2.0 web application that's located on another machine (WinXP). My machine is Win2K and I didn't have these kind of errors when I opened a project from another Win2K machine. We used the .NET Framework  2.0 Configuration to grant full-trust to the assemblies.

    I didn't find many posts about that so I guess it is not that common.
     

    Monday, June 11, 2007 1:41 AM
  • User97050314 posted

     Hi,

     I am having the same kind of problem.

     Basically most of our projects are stored on a mapped network drive, to access and work on a solution, we just navigate to the required web app and double click the solution file so we work on it directly from the network.

     However the problems we get are with the designer throwing errors in regards to referenced assemblies in the project saying something along the lines of Element 'CustomControlName' is not a known element. This can occur if there is a compilation error in the Web site. Yet the site compiles and runs fine, its just an annoying error and also I get no intellisense on the control.

    But this seems to be a network only problem as if I copy the same project to my local site it runs fine and I get no errors.

     While this might not seem like a big problem we use a lot of precompiled assemblies and utility classes that have a lot of custom controls that we use in every project so the warnings/errors get very annoying after a while.

    I notice a lot of artcles say it is a trust issue but do not go on about how to fix it, if someone could actually post details on what to do, both as a client and on the server, that would be great.

    Thanks for any help as it is very appreciated.

     

    Tuesday, August 28, 2007 9:41 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 28, 2007 9:50 PM
  • User97050314 posted

     I tried the caspol trust update and still have the same problem :(

     I did a check on the assembly using caspol and here is the trust associated with the assembly:

     

     

    Level = Enterprise
    
    Code Groups:
    
    1.  All code: FullTrust
    
    
    Level = Machine
    
    Code Groups:
    
    1.  All code: Nothing
       1.3.  Zone - Internet: FullTrust
       1.6.  Url - file:////\\chief\sites\*: FullTrust (Exclusive)
    
    
    Level = User
    
    Code Groups:
    
    1.  All code: FullTrust
    
    Success
    
    C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0>
    
    
    
    
    
    
    
     







     
    Tuesday, August 28, 2007 10:09 PM