ASPNET and bin directory.

Discussion in 'ASP .Net' started by Al, Jan 29, 2004.

  1. Al

    Al Guest

    Hello,
    I am trying to create a simple asp.net application, then rename the bin
    directory and/or create another subdirectory with a bin folder.

    I then add the following to the web.config file

    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <probing privatePath="subdir\bin;bin2"/>
    </assemblyBinding>
    </runtime>

    When I browse the site, all I get is
    Parser Error Message: Could not load type 'TestAspNet.Global'.

    Source Error:

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



    IOW, I can't seem to get the probing to work.
    Am I forced to use the bin directory under IIS application or is there
    some way to reference another directory?

    Al...
     
    Al, Jan 29, 2004
    #1
    1. Advertising

  2. Hi AI,


    Thanks for posting in the community!
    From your description, you'd like to use the <probing> element in
    web.config so as to specify a customized sub directory for the ASP.NET
    runtime to locate the private assemblies. However, you found the setting
    didn't work, the runtime still couldn't locate the assemblies via the
    correct setting, yes?
    If there is anything I misunderstood, please feel free to let me know.

    As for this problem, it is because the ASP.NET runtime AppDomain's
    "RelativeSearchPath" is always "bin" no matter how we set in the
    web.config. To confirm this, you may try output the Runtime AppDomain's
    RelativeSearchPath attribute via the following code:

    Response.Write("AppDomain.CurrentDomain.RelativeSearchPath: " +
    AppDomain.CurrentDomain.RelativeSearchPath);

    We'll find that the value is "bin" though we set the web.config as:
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <probing privatePath="MyBin;Bin" />
    </assemblyBinding>
    </runtime>

    BTW, would you like to try using the "codebase" to specify the runtime
    location for the assemblies, since the codebase element will work for
    ASP.NET application?

    Please check out my suggestions. If you feel anything unclear, please feel
    free to post here.



    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Jan 30, 2004
    #2
    1. Advertising

  3. Hi AI,


    Have you had a chance to check out my suggestions in the last reply or have
    you got any further progress on this issue?
    If you need any assitance, please feel free to let me know.



    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Feb 4, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Mitchell

    Can "bin" be changed to "cgi-bin" for asp.net

    Kevin Mitchell, Oct 19, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    850
    Wim Hollebrandse
    Oct 19, 2003
  2. John Salerno
    Replies:
    30
    Views:
    1,970
    Stephan Kuhagen
    Aug 10, 2006
  3. sweety
    Replies:
    9
    Views:
    1,029
    Richard Heathfield
    Feb 7, 2006
  4. Yves Dorfsman

    #!/usr/bin/env python vs. #!/usr/bin/python

    Yves Dorfsman, May 2, 2008, in forum: Python
    Replies:
    27
    Views:
    2,011
    Tim Roberts
    May 10, 2008
  5. anne001
    Replies:
    1
    Views:
    478
Loading...

Share This Page