473,383 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

server.transfer scope

I have 2 ASP.Net solutions/projects. I want to use Server.Transfer in one
solution/project to call the aspx webform in the second solution/project.
When I try it I get an error message. My call is straightforward:

Server.Transfer("/ServerTransferUtility/Server.aspx")

The call finds my target page but errors out on its first line:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="Server.aspx.vb" Inherits="ServerTransferUtility.Henrico.Server"
%>

The inner generated is: "Parser Error: Could not load type
'ServerTransferUtility.Henrico.Server'." This is the error spewed out in the
browser window. The other error generated in the client page's code-behind
page is: "Error executing child request for
/ServerTransferUtility/Server.aspx" which is thrown as a result of the first
error.

Any clues on how I can work through this problem? Searching around I've
picked up some hints that Server.Transfer may be restricted to an
"application" level scope though the reason for this restriction isn't
intuitively obvious.

Thanks in advance for your help.


Nov 19 '05 #1
1 1952
Well the reason could be as you mentioned, Server.transfer is application
level scope. When you do Server.Transfer, I guess asp.net executes the
target webform and returns the result to the browser. In .NET each
application is run under its own application domain. I think Server.Transfer
is restricted to application level scope, because one application domain can
not access the code of another application domain.Where as
Response.Redirect, involves two round trips, the second one does a HTTP Get
request. So, you can do Response.Redirect without any restrictions

--
Kumar Reddi
http://kumarreddi.blogspot.com

"Craig Banks" <ba***@co.henrico.va.us> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
I have 2 ASP.Net solutions/projects. I want to use Server.Transfer in one
solution/project to call the aspx webform in the second solution/project.
When I try it I get an error message. My call is straightforward:

Server.Transfer("/ServerTransferUtility/Server.aspx")

The call finds my target page but errors out on its first line:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="Server.aspx.vb" Inherits="ServerTransferUtility.Henrico.Server" %>

The inner generated is: "Parser Error: Could not load type
'ServerTransferUtility.Henrico.Server'." This is the error spewed out in the browser window. The other error generated in the client page's code-behind
page is: "Error executing child request for
/ServerTransferUtility/Server.aspx" which is thrown as a result of the first error.

Any clues on how I can work through this problem? Searching around I've
picked up some hints that Server.Transfer may be restricted to an
"application" level scope though the reason for this restriction isn't
intuitively obvious.

Thanks in advance for your help.



Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Marco J.L. | last post by:
Hello, how can I transfer a variable from a function to the part after the function? thnx, Marco J.L.
3
by: JT | last post by:
is there a way to clear out the request.form collection, or the entire request object, for that matter?? im using server.transfer and this can be troublesome in cases where you need the...
0
by: JT | last post by:
ok here is my scenario - using model, vew , controller architecture: -- user submits the view page to the controller -- controller issues a server.execute on a model page to update the changed...
6
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web...
4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
9
by: Mark | last post by:
Hello I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop) The problem is that the...
5
by: Guadala Harry | last post by:
I've been reading up on Server.Transfer as well as doing some testing, and it appears to always raise the ThreadAbortException error. On one hand I've read a bunch of promotional-type material...
11
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.