Monday, March 26, 2012

Site as virtual directory

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: <%@dotnet.itags.org. 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,
PatrickLintie,
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
>

0 comments:

Post a Comment