473,473 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Page Processing


I have a problem at the moment where an external program writes aspx files
to a server and then allows people to brows to those pages. Each aspx page
is similiar and is written in a single file - the file contains both <%= %>
attributes and <SCRIPT runat=server> code. Each file has a unique name.

After a short time this gets out-off control and the memory of the server
goes through the roof - the performance is also not too good becuase of the
compiling of each page.

If I was to create a code-behind file would this fix my speed and memory
problems? - e.g - The external program only writes unique markup pages and
has an @ directive to referance the same class. The class gets compiled once
- what happens to the markup - does it go and still create another class
based on the code-behind class. Also - if I was to it this this way could I
still use the <%= %> tags to referance the results of functions in the
code-behind class?? Doing it this way would I still end up with the same
problems???

Thanks for your help

--
matthew
Nov 19 '05 #1
3 1278
=?Utf-8?B?bWF0dmRs?= <ma****@discussions.microsoft.com> wrote in
news:F9**********************************@microsof t.com:
I have a problem at the moment where an external program writes aspx
files to a server and then allows people to brows to those pages.
Each aspx page is similiar and is written in a single file - the file
contains both <%= %> attributes and <SCRIPT runat=server> code. Each
file has a unique name.


If you want to write dynamic code... you should take a look at using
CodeDom (just do a google search on dynamic .NET code).

Otherwise, what you're doing will be slow, since .NET has to compile the
code on each run.

Is there a way you can do this without writing dynamic code? It seems very
inefficent... : )

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Hello Matthew

I don't know if my solution will help you or not, but instead of creating
many individual aspx files on the server, I would consider using either an
HttpModule or HttpHandler to access these pages. In this way, these actual
pages do not exist.

I would have a "template" page(s) which render themselves like the
individual aspx pages do, except that it pulls data dynamically from
somewhere. This basically replaces the external program that creates aspx
pages.

The httpModule evaluates the URL to determine how to build the page, and
calls server.transfer to the template page.
For example, say the user goes to:
http://mydomain.com/productlisting/product1.aspx
The HttpModule could convert that to
http://mydomain.com/productdisplay.a...oduct=product1

The user will never see the second URL in their browser.

Above, productdisplay.aspx is the template page, and given enough variables
is able to create the same output that the individual .aspx pages had.

In this way, you are not creating hundreds/thousands of files on your
webserver, and everything is still compiled.

HTH

Steve

"matvdl" <ma****@discussions.microsoft.com> wrote in message
news:F9**********************************@microsof t.com...

I have a problem at the moment where an external program writes aspx files
to a server and then allows people to brows to those pages. Each aspx
page
is similiar and is written in a single file - the file contains both <%=
%>
attributes and <SCRIPT runat=server> code. Each file has a unique name.

After a short time this gets out-off control and the memory of the server
goes through the roof - the performance is also not too good becuase of
the
compiling of each page.

If I was to create a code-behind file would this fix my speed and memory
problems? - e.g - The external program only writes unique markup pages and
has an @ directive to referance the same class. The class gets compiled
once
- what happens to the markup - does it go and still create another class
based on the code-behind class. Also - if I was to it this this way could
I
still use the <%= %> tags to referance the results of functions in the
code-behind class?? Doing it this way would I still end up with the same
problems???

Thanks for your help

--
matthew

Nov 19 '05 #3
every aspx page needs to be compiled. a precompiled codebehind file will
save some time (less code).

-- bruce (sqlwork.com)

"matvdl" <ma****@discussions.microsoft.com> wrote in message
news:F9**********************************@microsof t.com...

I have a problem at the moment where an external program writes aspx files
to a server and then allows people to brows to those pages. Each aspx
page
is similiar and is written in a single file - the file contains both <%=
%>
attributes and <SCRIPT runat=server> code. Each file has a unique name.

After a short time this gets out-off control and the memory of the server
goes through the roof - the performance is also not too good becuase of
the
compiling of each page.

If I was to create a code-behind file would this fix my speed and memory
problems? - e.g - The external program only writes unique markup pages and
has an @ directive to referance the same class. The class gets compiled
once
- what happens to the markup - does it go and still create another class
based on the code-behind class. Also - if I was to it this this way could
I
still use the <%= %> tags to referance the results of functions in the
code-behind class?? Doing it this way would I still end up with the same
problems???

Thanks for your help

--
matthew

Nov 19 '05 #4

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

Similar topics

1
by: Eric Linders | last post by:
Hello, I have a Web form that is filled out on my company's web site. When the submit button is pressed, the form data is posted to a PHP page that (in the background) inserts their information...
2
by: chints | last post by:
Hi, I have a very unique problem, i am submitting from a pdf form, when submitted goes to a asp page, which saves the data and redirects to a different page after saving the data. I am writing a...
3
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
0
by: Santa | last post by:
I am using Fritz Onion's "Asynchronous Pages" approach as mentioned in the article http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx to increase the performance of my ASPX...
0
by: Santa | last post by:
I am using Fritz Onion's "Asynchronous Pages" approach as mentioned in the article http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx to increase the performance of my ASPX...
4
by: PinellasBoy | last post by:
I have an stored procedure which takes long time to execute. So I am trying to execute the procedure in another thread by using the thread start function. After the SP starts processing I want to...
3
by: Shapper | last post by:
Hello, I am working on an ASP.NET/VB web site. I have several links including menu links. Considerer a want to load a page named page.aspx. I can do it using javascript. Or using this code:...
4
by: Jeremy Holt | last post by:
Hi, In a windows.forms application I would BeginInvoke a delegate on the UI thread to collect data from a database. When the call returns to the AsyncCallback, if the Control.InvokeRequired =...
3
by: Shreyas | last post by:
I am a new user writing some scripts to store data entered via a browser into a database. I have several content pages, and one "processing" page. A content page often has a form like this: ...
0
by: JeffJones176 | last post by:
Hello All: I am very new to multi-threaded programming and have a need (I think) to write an application that uses multi-threaded pages. My scenario follows: My business has multiple...
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...
1
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...
0
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...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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...

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.