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

IsPostBack value incorrect using Server.Transfer in Front Controller plus Visual Inheritance

I am going through the front controller http://msdn.microsoft.com/library/de...ollerInASP.asp and all works well except when the server.transfer occurs. I get invalid IsPostBack results which I believe can fixed using the patch in KB:821156. How do I get this patch?

Another question in the same pattern is when using LoadConrol to load a .ascx file I get "maps to another application, which is not allowed" error which is because the file I have is truly in another application. The problem is this to use the design pattern above it is not useful if I cannot load a control in another application but can infact load a page from another site.

Suppose I had three applications shown below. I only want to have files in the applications that are different from each other (Visual Inheritance). I know, I know you cant inherit a html page, yea, yea, yea read on. Lets assume that Application1 is our base application and all other applications inherit from it. For example Application1 login.aspx, Application2 login.aspx are different from each other.

IIS
|
|-Application1
| |
| |-default.aspx
| |-mycontrol.ascx
| '-login.aspx
|
|-Application2
| |
| '-default.aspx
|
'-Application3
|
'-login.aspx

Using the design pattern I can load default.aspx from Application1 using Server.Transfer when the user goes to http://localhost/Application3/default.aspx because I have an HttpHandler which says if the user attempts to access Application3/*.aspx transfer them to Application1/default.aspx if Application3 does not contain the requested *.aspx page. This in fact works quite nicely.

However if Application1's default.aspx says to LoadControl("mycontrol.ascx") I get the "maps to another application, which is not allowed" error which in fact is also true BUT if I can Server.Transfer to another page then I should be able to load a control that is in the same directory as that page "Another application" or not. It appears that even though the pattern says in can implement a model-view-controller it doesn't do so well with the "view" part.

I attempted to trick IIS into thinking that the control is in a virtual directory under Application3 but this only works to a certain extent. If I want to override mycontrol.ascx in Application3 then I need to remove the virtual directory and copy the structure entirely. This does not meet my first requirement to not duplicate files across applications (and I have a lot of directories). I am two seconds shy from hacking together my own LoadControl but I REALLY don't want to do this.

Now if anyone has a suggestion on an alternative to this I am listening. I am trying to get a visual inheritance methodology to work as we have many customers and don't want to duplicate the entire site for each one. I only want to change pages that are customer specific.

To send me an email
nospamscotchy32000 yahoo com <--- remove nospam and insert a @ and . to mail me.
Nov 18 '05 #1
2 3177
Rad
call support and tell them you need the patch from that Q article you
mentioned..
"Mr Wizard" <an*******@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com...
I am going through the front controller http://msdn.microsoft.com/library/de...ollerInASP.asp
and all works well except when the server.transfer occurs. I get invalid
IsPostBack results which I believe can fixed using the patch in KB:821156.
How do I get this patch?
Another question in the same pattern is when using LoadConrol to load a ..ascx file I get "maps to another application, which is not allowed" error
which is because the file I have is truly in another application. The
problem is this to use the design pattern above it is not useful if I cannot
load a control in another application but can infact load a page from
another site.
Suppose I had three applications shown below. I only want to have files in the applications that are different from each other (Visual Inheritance).
I know, I know you cant inherit a html page, yea, yea, yea read on. Lets
assume that Application1 is our base application and all other applications
inherit from it. For example Application1 login.aspx, Application2
login.aspx are different from each other.
IIS
|
|-Application1
| |
| |-default.aspx
| |-mycontrol.ascx
| '-login.aspx
|
|-Application2
| |
| '-default.aspx
|
'-Application3
|
'-login.aspx

Using the design pattern I can load default.aspx from Application1 using Server.Transfer when the user goes to
http://localhost/Application3/default.aspx because I have an HttpHandler
which says if the user attempts to access Application3/*.aspx transfer them
to Application1/default.aspx if Application3 does not contain the requested
*.aspx page. This in fact works quite nicely.
However if Application1's default.aspx says to LoadControl("mycontrol.ascx") I get the "maps to another application, which
is not allowed" error which in fact is also true BUT if I can
Server.Transfer to another page then I should be able to load a control that
is in the same directory as that page "Another application" or not. It
appears that even though the pattern says in can implement a
model-view-controller it doesn't do so well with the "view" part.
I attempted to trick IIS into thinking that the control is in a virtual directory under Application3 but this only works to a certain extent. If I
want to override mycontrol.ascx in Application3 then I need to remove the
virtual directory and copy the structure entirely. This does not meet my
first requirement to not duplicate files across applications (and I have a
lot of directories). I am two seconds shy from hacking together my own
LoadControl but I REALLY don't want to do this.
Now if anyone has a suggestion on an alternative to this I am listening. I am trying to get a visual inheritance methodology to work as we have many
customers and don't want to duplicate the entire site for each one. I only
want to change pages that are customer specific.
To send me an email
nospamscotchy32000 yahoo com <--- remove nospam and insert a @ and . to

mail me.
Nov 18 '05 #2
Thanks for the information. I am still, however, looking for an answer to the problem below. I find it hard to believe no one has attempted this type of model before.
Nov 18 '05 #3

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

Similar topics

1
by: Simon Wadsworth | last post by:
My application uses VB6 WebClasses to handle the UI, so all requests come in via a stub ASP page. I would like to know the time taken for the request to be processed. I am trying to use the...
3
by: Prasad Patil | last post by:
Hi I am trying to understand the article http://msdn.microsoft.com/practices/type/Patterns/Enterprise/DesFrontController/...
2
by: patrick_a | last post by:
Hi, I'm having trouble with using !IsPostBack. I want to create a linkbutton within a table when the page loads the first time and then have the page redirect based on the...
1
by: Mathana g | last post by:
Hi, I am getting Ispostback property value as true even the page loads very first time(used Server.Transfer for navigation) Even I tried with Request.Url.AbsolutePath !=...
5
by: garethdjames | last post by:
A while ago I read news about ASP.Net 2.0 having support for the Front Controller model, In all the reports I have read and in the latest beta download I can see no implicit support for this...
2
by: Alex | last post by:
Hello, Quick question and I would really appreciate if anybody could helps me. Here are the steps to reproduce the problem. Create simple ASP.Net application. In code behind added protected...
17
by: Rico | last post by:
Hello, I am in the midst of converting an Access back end to SQL Server Express. The front end program (converted to Access 2003) uses DAO throughout. In Access, when I use recordset.AddNew I...
5
by: Diego Mijelshon | last post by:
I've been debugging an issue we have in an asp.net 2.0 application for several days. The initial report of the bug was that, after waiting for some minutes with an open page, entering a number...
14
by: jmaltese | last post by:
I need some suggestions. We had previously been running our multi-user Access 2002 applications on a Novell server. Since switching to Windows 2003 servers a few months ago, we've been having...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.