How to configure my application to recognize the bin directory?

Discussion in 'ASP .Net' started by peelman, Feb 11, 2005.

  1. peelman

    peelman Guest

    Hi,

    I have a web server (IIS 6 on Windows 2003) and just ported over my web
    app from IIS 5. Everything used to work on IIS 5 but now on IIS 6 my
    scripts cannot find the namespace compipiled in the dll in my bin
    directory. It crashes at:

    MyNameSpace.MyClass var = new MyNameSpace.MyClass();

    I get the standard "are you missing a using directive or assembly
    reference" asp.net error in the browser. But the dll is in the bin
    directory. I have no virtual directories and only one site running at
    inetpub\www\, and the bin is inetpub\www\bin\. So why isn't ASP.NET
    looking in this bin directory? Do i have to add some configuration
    option to the web.config or something?

    Regards,
     
    peelman, Feb 11, 2005
    #1
    1. Advertising

  2. peelman

    Scott Allen Guest

    Do you see this error at runtime? This looks more like a compiler
    error.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On 11 Feb 2005 11:31:08 -0800, "peelman" <>
    wrote:

    >Hi,
    >
    >I have a web server (IIS 6 on Windows 2003) and just ported over my web
    >app from IIS 5. Everything used to work on IIS 5 but now on IIS 6 my
    >scripts cannot find the namespace compipiled in the dll in my bin
    >directory. It crashes at:
    >
    >MyNameSpace.MyClass var = new MyNameSpace.MyClass();
    >
    >I get the standard "are you missing a using directive or assembly
    >reference" asp.net error in the browser. But the dll is in the bin
    >directory. I have no virtual directories and only one site running at
    >inetpub\www\, and the bin is inetpub\www\bin\. So why isn't ASP.NET
    >looking in this bin directory? Do i have to add some configuration
    >option to the web.config or something?
    >
    >Regards,
     
    Scott Allen, Feb 11, 2005
    #2
    1. Advertising

  3. peelman

    peelman Guest

    It is a compiler error. But it occurs because ASP.NET is not looking
    in my directory and finding my code. But I know the code works fine
    (and used to work on IIS 5), so my isues is an ASP.NET configuration
    one. Why doesn't it find the bin directory. According to the
    documentation I have read it should do automatically.
     
    peelman, Feb 11, 2005
    #3
  4. peelman

    Scott Allen Guest

    Do you have a reference to the DLL in the ASP.NET project?

    Is the root of the web site configured as an application?
    (IIS MMC -> Right click and select Properties -> Home Directory). Look
    under application settings and if there is a "Create" button, then
    click to configure the root as an app.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On 11 Feb 2005 12:24:00 -0800, "peelman" <>
    wrote:

    >It is a compiler error. But it occurs because ASP.NET is not looking
    >in my directory and finding my code. But I know the code works fine
    >(and used to work on IIS 5), so my isues is an ASP.NET configuration
    >one. Why doesn't it find the bin directory. According to the
    >documentation I have read it should do automatically.
     
    Scott Allen, Feb 11, 2005
    #4
  5. Is the root directory of your web application configured as an Application?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "peelman" <> wrote in message
    news:...
    > It is a compiler error. But it occurs because ASP.NET is not looking
    > in my directory and finding my code. But I know the code works fine
    > (and used to work on IIS 5), so my isues is an ASP.NET configuration
    > one. Why doesn't it find the bin directory. According to the
    > documentation I have read it should do automatically.
    >
     
    Kevin Spencer, Feb 11, 2005
    #5
  6. Two things to check for...and a suggestion

    1.
    Check to see if the Network Service account
    has read permission to the /bin directory.

    2.
    Check to see if you're using
    <%@ Import Namespace = "YourAssemblyName" %>
    in your aspx page. ( I know, that's doh!...but... )

    3.
    Try adding <add assembly="*"> to your web.config.

    <configuration>
    <compilation>
    <assemblies>
    <add assembly="*"/>
    </assemblies>
    </compilation>
    </configuration>



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en EspaƱol
    =====================

    "peelman" <> wrote in message
    news:...
    > It is a compiler error. But it occurs because ASP.NET is not looking
    > in my directory and finding my code. But I know the code works fine
    > (and used to work on IIS 5), so my isues is an ASP.NET configuration
    > one. Why doesn't it find the bin directory. According to the
    > documentation I have read it should do automatically.
    >
     
    Juan T. Llibre, Feb 11, 2005
    #6
  7. peelman

    peelman Guest

    OK here's the thing....

    ....it works. Infact, it just decided to start working. I did not
    change the assembly, the config file, the web pages, nothing. Weird.
    All of the recommendations given above were always true though - hence
    my reason for the post because i was out of ideas.

    thanks anyway people.
     
    peelman, Feb 11, 2005
    #7
    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:
    1,023
    Wim Hollebrandse
    Oct 19, 2003
  2. HS1
    Replies:
    0
    Views:
    480
  3. John Salerno
    Replies:
    30
    Views:
    2,025
    Stephan Kuhagen
    Aug 10, 2006
  4. =?Utf-8?B?aG5nbzAx?=

    Re-configure the /BIN directory

    =?Utf-8?B?aG5nbzAx?=, Dec 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    589
    Juan T. Llibre
    Dec 8, 2006
  5. anne001
    Replies:
    1
    Views:
    586
Loading...

Share This Page