Re: Assembly probing for Web app with subfolders

Discussion in 'ASP .Net' started by Stan, Oct 17, 2003.

  1. Stan

    Stan Guest

    Jacob,

    Here is what different in my situation.
    There are two web applications on the server, App1 and App2 in the separate
    virtual directory below it. App1 loads pages of App2 in IFRAME.

    So, maybe this IFRAME makes a difference and causes runtime to change the
    way it probes for the assmblies, so that it first looks for App1 and only
    then in App2?




    "Jacob Yang [MSFT]" <> wrote in message
    news:...
    > Hi Stan,
    >
    > I am sorry if there is any misunderstanding but I am not sure about why

    the
    > runtime looks App1\Bin and then App2\Bin on your side when the App2 is a
    > virtual directory. Would you please tell me your testing process step by
    > step? I certainly appreciate your time.
    >
    > The followings are my testing steps:
    >
    > 1. Create the directories like the followings under wwwroot
    >
    > App1
    > Bin
    > App2
    > Bin
    >
    > 2. In IIS, create App1 and App2 as the web application. (Make them be the
    > virtual directories)
    >
    > 3. Create a simple customer control (version 1) as the following:
    >
    > Imports System
    > Imports System.Web
    > Imports System.Web.UI
    >
    > Namespace SimpleControlSamples
    >
    > Public Class SimpleVB : Inherits Control
    >
    > Protected Overrides Sub Render(ByVal Output As HtmlTextWriter)
    > Output.Write("<H2>Welcome to Control Development!</H2>")
    > End Sub
    > End Class
    > End Namespace
    >
    > 4. Build the solution and copy the assembly file - SimpleControl.dll to
    > App1/bin.
    >
    > 5. Change version 1 to version 2:
    >
    > Imports System
    > Imports System.Web
    > Imports System.Web.UI
    >
    > Namespace SimpleControlSamples
    >
    > Public Class SimpleVB : Inherits Control
    >
    > Protected Overrides Sub Render(ByVal Output As HtmlTextWriter)
    > Output.Write("<H2>Welcome to sub directory App2</H2>")
    > End Sub
    > End Class
    > End Namespace
    >
    > 6. Build the solution and copy the assembly file (Version 2 now) -
    > SimpleControl.dll to App1/App2/bin.
    >
    > 7. Write a testing page - Simple.aspx:
    >
    > <%@ Register TagPrefix="SimpleControlSamples"
    > Namespace="SimpleControl.SimpleControlSamples" Assembly="SimpleControl" %>
    >
    > <html>
    >
    > <body>
    >
    > <form method="POST" action="Simple.aspx" runat=server>
    >
    > <SimpleControlSamples:SimpleVB id="MyControl" runat=server/>
    >
    > </form>
    >
    > </body>
    >
    > </html>
    >
    > 8. Copy the same testing page Simple.aspx to both /App1 and /App1/App2.
    >
    > 9. Open the IE window. Test the following page:
    >
    > http://localhost/App1/Simple.aspx
    >
    > We can see the result is:
    >
    > Welcome to Control Development!
    >
    > 10. Test the following page:
    >
    > http://localhost/App1/App2/Simple.aspx
    >
    > We can see the result is:
    >
    > http://localhost/App1/App2/Simple.aspx
    >
    > For how to create a simple custom control, please refer to the following
    > URL:
    >
    > Authoring Custom Controls
    >

    http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx#si
    > mplectrl
    >
    > Does it answer your question? If I have misunderstood your concern, please
    > feel free to let me know.
    >
    > Best regards,
    >
    > Jacob Yang
    > Microsoft Online Partner Support
    > Get Secure! ¨C www.microsoft.com/security
    > This posting is provided "as is" with no warranties and confers no rights.
    >
     
    Stan, Oct 17, 2003
    #1
    1. Advertising

  2. Hi Stan,

    Thank you for your update.

    In my original testing sample, I created the virtual directory App2 under
    the virtual directory App1. As I understand, you created the virtual
    directory App2 under the "default web site". The virtual directory App2 is
    at the same level as the virtual directory App1. Then we have two paths to
    access the simple.aspx under the App2 directory.

    1. http://localhost/App1/App2/Simple.aspx

    The result is:

    Welcome to Control Development!

    The assembly in App1/Bin is used.

    2. http://localhost/App2/Simple.aspx

    The result is:

    Welcome to sub directory App2

    The assembly in App1/App2/Bin is used.

    Does it answer your question? If I have misunderstood your concern, please
    feel free to let me know.

    Best regards,

    Jacob Yang
    Microsoft Online Partner Support
    Get Secure! ¨C www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Jacob Yang [MSFT], Oct 20, 2003
    #2
    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. Replies:
    2
    Views:
    1,949
    Jim Lewis
    Dec 20, 2004
  2. Pavils Jurjans

    Assembly probing does not work

    Pavils Jurjans, May 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,282
    Pavils Jurjans
    May 12, 2004
  3. Jiho Han

    <probing> element in Web.config

    Jiho Han, Jun 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,062
    Jiho Han
    Jun 8, 2004
  4. =?Utf-8?B?VHlydmVu?=

    Resource Probing Issue - Troubleshooting help?

    =?Utf-8?B?VHlydmVu?=, Mar 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    516
    =?Utf-8?B?VHlydmVu?=
    Mar 27, 2005
  5. pkellner
    Replies:
    0
    Views:
    505
    pkellner
    Apr 27, 2007
Loading...

Share This Page