473,662 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("my control.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
nospamscotchy32 000 yahoo com <--- remove nospam and insert a @ and . to mail me.
Nov 18 '05 #1
2 3209
Rad
call support and tell them you need the patch from that Q article you
mentioned..
"Mr Wizard" <an*******@disc ussions.microso ft.com> wrote in message
news:E9******** *************** ***********@mic rosoft.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("my control.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
nospamscotchy32 000 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
4331
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 time-taken value in the IIS log files by I am unclear as to the precise meaning of the value recorded. Using a test WebClass on a development PC (Win2K Pro/SP4) the value recorded in the IIS log files seems to vary:
3
4411
by: Prasad Patil | last post by:
Hi I am trying to understand the article http://msdn.microsoft.com/practices/type/Patterns/Enterprise/DesFrontController/ http://msdn.microsoft.com/practices/type/Patterns/Enterprise/ImpFrontControllerInASP/ [/url which describes Enterprise Solution Patterns Implementing Front Controller in ASP.NET Using HTTPHandler. When i created the web application and tried to run the same It gives me Parser Error Message: Unrecognized configuration...
2
7331
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 LinkButton.CommandArgument string when the LinkButton is clicked. If I use if(!IsPostBack) as in the following code, the MyLinkButton_Click is never fired. If I remove the if(!IsPostBack) then when the LinkButton is clicked the Page_Load is executed (as you would...
1
2162
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 != Request.UrlReferrer.AbsolutePath also. But could not solve the problem
5
1430
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 model Does anyone have any ideas?
2
1865
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 class variable: protected string _result = "No result"; Page Load event has:
17
4881
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 can retrieve the autonum value for the new record. This doesn't occur with SQL Server, which of course causes an error (or at least in this code it does since there's an unhandled NULL value). Is there any way to retrieve this value when I add a...
5
4446
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 in a search box and clicking the corresponding button, the page came empty. Entering the data again and clicking the button always gives results. I wrote a "request sniffer" module that writes a log for all requests that includes the time,...
14
1975
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 severe performance issues whenever multiple users are connected. As simple of a task as appending 100,000 records to a table can easily take over 30 minutes. These performance issues occur on all of databases, regardless of whether they are split...
0
8345
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
8857
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
8768
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
8547
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
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5655
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
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.