Site as virtual directory

Discussion in 'ASP .Net' started by Lintie, Mar 22, 2005.

  1. Lintie

    Lintie Guest

    Hi,

    I have 2 websites. Now I want to run one site as a virtual site of the
    other in IIS 5 (Win 2000).

    Like this :
    Website 1
    \--Website 2 (Virtual directory)

    1) If I create the virtual directory and don't create an application
    on it, I get the following error:

    Description: An error occurred during the parsing of a resource
    required to service this request. Please review the following specific
    parse error details and modify your source file appropriately.

    Parser Error Message: Could not load type 'BoekenB2C.Transport'.
    Source Error:
    Line 1: <%@ Page language="c#" Codebehind="Transport.aspx.cs"
    AutoEventWireup="false" Inherits="BoekenB2C.Transport"
    Culture="NL-nl"%>
    Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    >

    Line 3: <HTML>

    2) If I create a application on the virtual directory, it works, but
    my session is lost.

    The only solution I heve yet found is rewriting all the code to not
    use code behind, but this is not an option for me. Is there any other
    solution?

    Thanks in advance,

    Patrick
    Lintie, Mar 22, 2005
    #1
    1. Advertising

  2. Lintie,

    Be sure that you have placed your website2 DLL file into the website1 BIN
    folder. Because you don't have website2 as an application, it is using
    website1 as the application root, and not finding the DLL file to load type
    BoekenB2C.Transport.

    Also, if you want to maintain website2 as its own application, you can
    transfer the session between applications using the following solution
    (assuming same domain between applications 1 and 2):
    http://www.iansuttle.com/articles/sessiontransfer.aspx
    If you do use this, just replace the code in the ASP Classic page to be done
    in ASP.Net.

    I recommend using the first solution however, as this will keep both
    projects within the same session.

    Regards,
    Ian Suttle
    http://www.IanSuttle.com

    "Lintie" wrote:

    > Hi,
    >
    > I have 2 websites. Now I want to run one site as a virtual site of the
    > other in IIS 5 (Win 2000).
    >
    > Like this :
    > Website 1
    > \--Website 2 (Virtual directory)
    >
    > 1) If I create the virtual directory and don't create an application
    > on it, I get the following error:
    >
    > Description: An error occurred during the parsing of a resource
    > required to service this request. Please review the following specific
    > parse error details and modify your source file appropriately.
    >
    > Parser Error Message: Could not load type 'BoekenB2C.Transport'.
    > Source Error:
    > Line 1: <%@ Page language="c#" Codebehind="Transport.aspx.cs"
    > AutoEventWireup="false" Inherits="BoekenB2C.Transport"
    > Culture="NL-nl"%>
    > Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    > >

    > Line 3: <HTML>
    >
    > 2) If I create a application on the virtual directory, it works, but
    > my session is lost.
    >
    > The only solution I heve yet found is rewriting all the code to not
    > use code behind, but this is not an option for me. Is there any other
    > solution?
    >
    > Thanks in advance,
    >
    > Patrick
    >
    =?Utf-8?B?SWFuIFN1dHRsZQ==?=, Mar 22, 2005
    #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. Jack Wright
    Replies:
    1
    Views:
    454
    sonikchopra
    Apr 19, 2005
  2. Steve Singer
    Replies:
    0
    Views:
    521
    Steve Singer
    Feb 15, 2005
  3. Dave
    Replies:
    1
    Views:
    9,711
    Steven Cheng[MSFT]
    Oct 24, 2005
  4. =?Utf-8?B?SmVmZiBCZWVt?=

    physical path to virtual path under virtual directory

    =?Utf-8?B?SmVmZiBCZWVt?=, Aug 1, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    1,013
    Eliyahu Goldin
    Aug 1, 2007
  5. rockdale

    include virtual in virtual directory?

    rockdale, Sep 3, 2008, in forum: ASP General
    Replies:
    3
    Views:
    426
    rockdale
    Sep 4, 2008
Loading...

Share This Page