473,386 Members | 1,943 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,386 software developers and data experts.

Server.Transfer From App1 to App2

Hello,

We have two applications that will reside on the same webserver.

We want to be able to post from pages in App1 to to pages in App2.

We need to pass sensible data, so we cannot use querystring.

We are using server.transfer (needing to reference App2 in App1).

When we call a page in App2 from App1, the ApplicationDomain doesn´t
change when page in App2 loads, being this the one of App1.

When we try to post on the loaded page of App2, we get an execption of
invalid viewstate.

HttpException (0x80004005): El valor de viewstate no es válido para
esta página y puede estar dañado.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain() +423

Is this approach of using server.transfer valid between applications
(web projects)?

Or can you only use it in the same application domain?

Thanks for any guiadance or help.

Manuel
Nov 18 '05 #1
3 2110
As far as I know, Server.Transfer cannot be used between different web
applications.

"Manuel Lopez" <mc*****@terra.es> wrote in message
news:cd*************************@posting.google.co m...
Hello,

We have two applications that will reside on the same webserver.

We want to be able to post from pages in App1 to to pages in App2.

We need to pass sensible data, so we cannot use querystring.

We are using server.transfer (needing to reference App2 in App1).

When we call a page in App2 from App1, the ApplicationDomain doesn´t
change when page in App2 loads, being this the one of App1.

When we try to post on the loaded page of App2, we get an execption of
invalid viewstate.

HttpException (0x80004005): El valor de viewstate no es válido para
esta página y puede estar dañado.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain() +423

Is this approach of using server.transfer valid between applications
(web projects)?

Or can you only use it in the same application domain?

Thanks for any guiadance or help.

Manuel

Nov 18 '05 #2
Hello Troy,

Yes can do a server.transfer to another page , as long as
you reference the dll that contains the codebehind of the
destination page.

The problem is that the application domain of the
destination page is not started, it uses application
domain of the caller page.

So once the destination page is loaded and you try to do
something, you get the invalid viewstate.

This is a big contraint, since you generally have quite a
few web apps that belong to the same webserver and need to
share context between them.

Not to mention that if you are sharing user controls, (by
having virtual directories to destination folder on all
web apps), server.transfer doesn´t work because it
considers that the shared user controls belong to another
application.

I really don´t know what to do???

-----Original Message-----
As far as I know, Server.Transfer cannot be used between different webapplications.

"Manuel Lopez" <mc*****@terra.es> wrote in message
news:cd*************************@posting.google.c om...
Hello,

We have two applications that will reside on the same webserver.
We want to be able to post from pages in App1 to to pages in App2.
We need to pass sensible data, so we cannot use querystring.
We are using server.transfer (needing to reference App2 in App1).
When we call a page in App2 from App1, the ApplicationDomain doesn´t change when page in App2 loads, being this the one of App1.
When we try to post on the loaded page of App2, we get an execption of invalid viewstate.

HttpException (0x80004005): El valor de viewstate no es válido para esta página y puede estar dañado.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium () System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain() +423

Is this approach of using server.transfer valid between applications (web projects)?

Or can you only use it in the same application domain?

Thanks for any guiadance or help.

Manuel

.

Nov 18 '05 #3
Hi, Manuel,

I agree that AppDomain is the real problem here. Usually we don't share
context between web apps. If you really want to do that, maybe it is not a
good idea to maintain context state at the server-side. Have a try to save
viewstate at client side using cookies or something else and use
Response.Redirect() to navigate to another page which belongs to another web
app. I am not sure if viewstate will be correctly maintained through this
kind of redirection since even MSDN documents haven't mentioned that. Good
luck!

Troy

"Manuel" <mc*****@terra.es> wrote in message
news:08****************************@phx.gbl...
Hello Troy,

Yes can do a server.transfer to another page , as long as
you reference the dll that contains the codebehind of the
destination page.

The problem is that the application domain of the
destination page is not started, it uses application
domain of the caller page.

So once the destination page is loaded and you try to do
something, you get the invalid viewstate.

This is a big contraint, since you generally have quite a
few web apps that belong to the same webserver and need to
share context between them.

Not to mention that if you are sharing user controls, (by
having virtual directories to destination folder on all
web apps), server.transfer doesn´t work because it
considers that the shared user controls belong to another
application.

I really don´t know what to do???

-----Original Message-----
As far as I know, Server.Transfer cannot be used between different webapplications.

"Manuel Lopez" <mc*****@terra.es> wrote in message
news:cd*************************@posting.google.c om...
Hello,

We have two applications that will reside on the same webserver.
We want to be able to post from pages in App1 to to pages in App2.
We need to pass sensible data, so we cannot use querystring.
We are using server.transfer (needing to reference App2 in App1).
When we call a page in App2 from App1, the ApplicationDomain doesn´t change when page in App2 loads, being this the one of App1.
When we try to post on the loaded page of App2, we get an execption of invalid viewstate.

HttpException (0x80004005): El valor de viewstate no es válido para esta página y puede estar dañado.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium () System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain() +423

Is this approach of using server.transfer valid between applications (web projects)?

Or can you only use it in the same application domain?

Thanks for any guiadance or help.

Manuel

.


Nov 18 '05 #4

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

Similar topics

1
by: Tim Smith | last post by:
Hi, I have a system which comprises of a number of server side application and services. There is a thread per service or application and some threads may also create their own application...
8
by: Jason Shohet | last post by:
Perhaps an asp.net question but involves c# classes so I'd rather ask this here. Here goes: Lets say I have an asp.net app called Logon. When a user logs on in Logon, a User class is...
3
by: DJT | last post by:
I have 2 applications that are configured to work with ASP.NET (ie. app1.domain.com and app2.domain.com). App1 has been working (with infrequent aspnet_wp recycling) for quite awhile. Recently,...
1
by: mg | last post by:
I have two apps off wwwroot: App1/WebForm1.aspx App2/WebForm1.aspx In the code behind of App1/WebForm1.aspx, I have private void Button1_Click(object sender, System.EventArgs e)
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...
2
by: Oleg | last post by:
Can I pass an object from one web application to another on the same server? I want to kind of post it or something so that I don't have to pass info in the url string.
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: jchau | last post by:
Is anyone has any idea what i need to do if i would like to integrate the IIS with other application server, where the IIS will serves as a front end web server and forward the request to the...
3
by: jasonheath.net | last post by:
I apologize in advance for the length of this post. I wanted to get as much detail as possible in here. We have 1 web app that contains the functionality to do some single sign-on logic. The...
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: 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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.