472,374 Members | 1,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 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 2040
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: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.