473,840 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net find Page Size

Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database

TIA
Nov 2 '07 #1
7 4689
On Nov 2, 12:31 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database

TIA
Well,

I never thought of that, but I believe you can override the OnRender
method of the page and after calling the base.OnRender method check
the Response.Output Stream.Length and that should have the size in
bytes of the whole stream sent to the client.

However it does not include any outside file, i.e. scripts referenced
by <script src="">, images, or anything but the HTML sent by the asp
page.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

Nov 2 '07 #2
Thanks Paul can I also ask, as the approach I have just found was to set a
filter on the Response object, and then query the stream size there, do you
know if this has the external file content in? Thanks in advance..
protected void Application_Beg inRequest(Objec t sender, EventArgs e)
{

Response.Filter = new GetSizeFilter(R esponse.Filter) ;
}

"PJ on Development" wrote:
On Nov 2, 12:31 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database

TIA

Well,

I never thought of that, but I believe you can override the OnRender
method of the page and after calling the base.OnRender method check
the Response.Output Stream.Length and that should have the size in
bytes of the whole stream sent to the client.

However it does not include any outside file, i.e. scripts referenced
by <script src="">, images, or anything but the HTML sent by the asp
page.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

Nov 2 '07 #3
You can create your own filter and attach it to Response.Filter .
It will count bytes/characters outputted to browser

George
"Rob Thomson" <Ro********@dis cussions.micros oft.comwrote in message
news:E4******** *************** ***********@mic rosoft.com...
Hi is there a way in asp.net 1.1 to in code behind query the page size
that
is generated, I realise IIS does it as it has that data in the logs, I
would
like to capture this data so that I can create a log for performance on
our
site that is all held in the database

TIA

Nov 2 '07 #4
Paul, Ive tried your approach but am getting method not supported, is there
something I need to set on the response object to enable the length property,
I have checked I have an output stream....TIA

"PJ on Development" wrote:
On Nov 2, 12:31 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database

TIA

Well,

I never thought of that, but I believe you can override the OnRender
method of the page and after calling the base.OnRender method check
the Response.Output Stream.Length and that should have the size in
bytes of the whole stream sent to the client.

However it does not include any outside file, i.e. scripts referenced
by <script src="">, images, or anything but the HTML sent by the asp
page.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

Nov 2 '07 #5
Unfortunally there is no way to get the size of external references
within tha page, because for each external reference the browser will
gnerate a new Request to download the required file.

Just out of curiosity, why do you need to know the size of the page
sent to the browser?

Anyway, like I said, I never tried to do such thing, and it seems that
the underlieing stream of the Response object does not allow seek,
which invalidade the Length property.

I've tried to create a custom filter to count the bytes sent to the
Response, but so far I was unsuccessful.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 2, 1:55 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Paul, Ive tried your approach but am getting method not supported, is there
something I need to set on the response object to enable the length property,
I have checked I have an output stream....TIA

"PJ on Development" wrote:
On Nov 2, 12:31 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database
TIA
Well,
I never thought of that, but I believe you can override the OnRender
method of the page and after calling the base.OnRender method check
the Response.Output Stream.Length and that should have the size in
bytes of the whole stream sent to the client.
However it does not include any outside file, i.e. scripts referenced
by <script src="">, images, or anything but the HTML sent by the asp
page.
Regards,
Paulo Santos
http://pjondevelopment.50webs.com- Hide quoted text -

- Show quoted text -

Nov 4 '07 #6
Thanks for your reply, the explanation on external references was useful

I want to get the size of the page so that I can put in logging information.
We have a badly performing application and the page size is dynamic, so when
I turn on logging I want to store this in a database for ease of querying and
to put the page size and querystring, so I can see whats going on

To get the custom filter working if you try this url the code there will work
http://www.codeproject.com/aspnet/WhitespaceFilter.asp

Regards

"PJ on Development" wrote:
Unfortunally there is no way to get the size of external references
within tha page, because for each external reference the browser will
gnerate a new Request to download the required file.

Just out of curiosity, why do you need to know the size of the page
sent to the browser?

Anyway, like I said, I never tried to do such thing, and it seems that
the underlieing stream of the Response object does not allow seek,
which invalidade the Length property.

I've tried to create a custom filter to count the bytes sent to the
Response, but so far I was unsuccessful.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 2, 1:55 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Paul, Ive tried your approach but am getting method not supported, is there
something I need to set on the response object to enable the length property,
I have checked I have an output stream....TIA

"PJ on Development" wrote:
On Nov 2, 12:31 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database
TIA
Well,
I never thought of that, but I believe you can override the OnRender
method of the page and after calling the base.OnRender method check
the Response.Output Stream.Length and that should have the size in
bytes of the whole stream sent to the client.
However it does not include any outside file, i.e. scripts referenced
by <script src="">, images, or anything but the HTML sent by the asp
page.
Regards,
Paulo Santos
>http://pjondevelopment.50webs.com- Hide quoted text -
- Show quoted text -


Nov 5 '07 #7
Thanks for the article.

I'll look into it soon, and try to implement something that can
measure a page size on the fly.

The article will be useful, and what it implements could be useful for
me in some future projects. Of course, after a MAJOR overhaul on that
code. ;-)

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 5, 3:36 am, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Thanks for your reply, the explanation on external references was useful

I want to get the size of the page so that I can put in logging information.
We have a badly performing application and the page size is dynamic, so when
I turn on logging I want to store this in a database for ease of querying and
to put the page size and querystring, so I can see whats going on

To get the custom filter working if you try this url the code there will workhttp://www.codeproject .com/aspnet/WhitespaceFilte r.asp

Regards

"PJ on Development" wrote:
Unfortunally there is no way to get the size of external references
within tha page, because for each external reference the browser will
gnerate a new Request to download the required file.
Just out of curiosity, why do you need to know the size of the page
sent to the browser?
Anyway, like I said, I never tried to do such thing, and it seems that
the underlieing stream of the Response object does not allow seek,
which invalidade the Length property.
I've tried to create a custom filter to count the bytes sent to the
Response, but so far I was unsuccessful.
Regards,
Paulo Santos
http://pjondevelopment.50webs.com
On Nov 2, 1:55 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Paul, Ive tried your approach but am getting method not supported, is there
something I need to set on the response object to enable the length property,
I have checked I have an output stream....TIA
"PJ on Development" wrote:
On Nov 2, 12:31 pm, Rob Thomson <RobThom...@dis cussions.micros oft.com>
wrote:
Hi is there a way in asp.net 1.1 to in code behind query the page size that
is generated, I realise IIS does it as it has that data in the logs, I would
like to capture this data so that I can create a log for performance on our
site that is all held in the database
TIA
Well,
I never thought of that, but I believe you can override the OnRender
method of the page and after calling the base.OnRender method check
the Response.Output Stream.Length and that should have the size in
bytes of the whole stream sent to the client.
However it does not include any outside file, i.e. scripts referenced
by <script src="">, images, or anything but the HTML sent by the asp
page.
Regards,
Paulo Santos
http://pjondevelopment.50webs.com-Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -

Nov 7 '07 #8

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

Similar topics

1
1724
by: Anna K. | last post by:
Hi Experts, I'm new to JavaScript and web-based apps development, so I'll tell you right off that I don't really know my way around it as of yet. I'm trying to create a code library set with JavaScript (in DreamweaverMX) to display "buttons" with which to select pages in a gallery. I'm trying to "grey out" (and disable) the button for the current page when it is displayed. (This isn't rocket science here, but it's something that I...
3
8113
by: Bob Stearns | last post by:
I changed a varchar(255) to varchar(3000) an started receiving: Warning: odbc_exec(): SQL error: SQL1585N A system temporary table space with sufficient page size does not exist. SQLSTATE=54048 , SQL state 54048 in SQLExecDirect in /var/www/html/GEM/animalEdit/animals_priv.php on line 207 Where do I find out more about the attributes of my temporary table space and how to change them? Just RTFM is insufficient given the size of TFM.
27
4634
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res = $doc->loadHTMLFile("./aBasicSearchResult.html"); if ( $res == true ) { $zip = $doc->getElementById('zipRaw_id')->value; if ( 0 != $zip ) {
17
2660
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I find the size of a browser window? ----------------------------------------------------------------------- Where supported in NN: (>NN4.0) var winWidth = window.innerWidth; var winHeight = window.innerHeight; Where supported in IE: (>IE4.0)
2
3794
by: leo.hou | last post by:
Hi experts, I am new to linux and all the type definitions are driving me mad. What is the best way to check a type definition in linux? When I use man page to check some function definition, I may come across new types. How do you guys look up their definitions? I tried to lookup ssize_t, what I do is trace (grep in glibc source code) to 'typedef __ssize_t ssize_t;', then '__STD_TYPE __SSIZE_T_TYPE __ssize_t;' then '#define...
1
13311
nateraaaa
by: nateraaaa | last post by:
While working on a recent project I discovered how useful the CommandArgument property can be. I needed to determine the record_id of a row displayed in my datagrid. When the user clicked the Edit ImageButton I needed to redirect the user to the Edit page where the data on the page would be prepopulated with data from the database. I tried several things without success then discovered that the CommandArgument property could be used for this...
1
4668
by: amiparna | last post by:
There is two frame in my form.In d first frame there is a text box,and i give some word in the text box.I want to search the word from a file from the location(http://45.12.09.31...........) and if the word is found any file of that location, the file will display in second frame. main problem is arise in the following line. txt = s.document.body.createTextRange(); here the code is : <html>
5
4555
by: YaoBao | last post by:
Is any ColdFusion script I can put on my webpage that will create a search bar so people can type keywords to match it on the current page in my website? It will be exactly like the finder search bar that comes with your browser window, IE; click edit, then find on this page, which brings up the search box. I know that JavaScript can do this. I tried to insert JavaScript to my .cfm page. It doesn't work. Any help will be appreciated. Here...
0
5093
by: nimjerry | last post by:
i am using db2 udb V 9 on aix 5.3 and in db2diag.log alwas has this error occurr below is sample message 2008-03-03-09.45.34.366406+420 I306667A443 LEVEL: Warning PID : 835622 TID : 1 PROC : db2stmm (WEBEDIDB) INSTANCE: db2inst1 NODE : 000 DB : WEBEDIDB APPHDL : 0-8 APPID: *LOCAL.db2inst1.080229022428 AUTHID : DB2INST1 FUNCTION: DB2 UDB, Self tuning memory...
0
9860
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
9699
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
10603
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
10660
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
10301
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...
0
9440
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
7023
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();...
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3138
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.