Server.Transfer between 2 different Web Apps

G

Guest

I have 2 seperate web applications A and B. During the execution of A, I
want to do a Server.Transfer to a page in application B. This works fine if
A has a reference to B, but without the reference, I get the following error:

Parser 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 'B.WebForm1'.

Source Error:
Line 1: <%@ Page language="c#" Codebehind="B.aspx.cs"
AutoEventWireup="false" Inherits="B.WebForm1" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3: <HTML>

Source File: c:\inetpub\wwwroot\B\B.aspx Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

It seems to be looking for B.dll in the path for application A, and can't
find it. Because of the specifics of this project I am unable to set a
reference, or even include a <codeBase> element in the config file. Is there
any way to force the runtime to look in the path of the target application
instead of the launching app?
 
B

bruce barker

that correct. a server transfer does not cross application. it works by
creating an instance of the page and calling the methods on it. so if you
add a reference to the other project (the other projects code will be copied
to the local bin) you can tranfer to that page, but it will run in the
current appdomain (vdir). as .net does not allow crossed references, you can
only go one way (a call b or b call a).

-- bruce (sqlwork.com)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top