473,597 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ApplicationDoma in 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.P age.LoadPageSta teFromPersisten ceMedium()
System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain() +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 2130
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.goog le.com...
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 ApplicationDoma in 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.P age.LoadPageSta teFromPersisten ceMedium()
System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain() +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.goo gle.com...
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 ApplicationDoma in 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.P age.LoadPageSta teFromPersisten ceMedium () System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain() +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.Redire ct() 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.goo gle.com...
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 ApplicationDoma in 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.P age.LoadPageSta teFromPersisten ceMedium () System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain() +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
1384
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 threads. ServerApplication.exe ----------Controller Thread ---------App1 ---------App2
8
1426
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 populated with his / her name, department etc. After the user has logged in I present him with a page that lets him go to other websites -- app1 & app2. The problem is when he is redirected over to app1 or app2, I want that User class to come with...
3
1313
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, I added app2 and now neither works properly. Whichever application is started first, the other application cannot be started. The error states that it cannot find the application or I'll get a Server Application Unavailable error. I must...
1
1199
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
6016
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 falls into an infinite loop and later a StackOverflow Exception. I need to do this and not a Response.Redirect or a transfer with the bool in false. My problem is that this KB is saying that this problem should be solved with ServicePack 1 of...
2
1146
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
3884
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 need to avoid the extra round-trip to the client. I've tried Passing the page name, the full URL, and the instance of the handler class to the Transfer method, but everything gets me the same error 500. Any help would be appreciated.
1
2752
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 different applications running on the application server. For example: (Two websites - www.app1.com and www.app2.com) If the user browsing the www.app1.com, then the IIS will forward the request to the application called 'app1' deployed on the...
3
3518
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 flow is 1. Welcome page 2. Login Page (where the SSO actually occurs) 3. Welcome page 4. Default page
0
7977
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7894
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8276
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8044
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6705
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5437
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3936
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.