Showing posts with label couple. Show all posts
Showing posts with label couple. Show all posts

Thursday, March 29, 2012

Performance questions

Hi;

Got a couple of performance questions.

1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?

2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?

3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htmHi Dave,

Regarding on the question you mentioned, here are some of my understanding:

1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.

2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?

3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================

..NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:

#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Hi;

1) I use WebDeployment and have it set to "NOT allow to be updatable",
"merge all pages and control outputs to a single assembly", APTCA. Should
this take time to run the first time? And if so, is there a way in IIS to
tell it to load and JIT compile everything?

2) I will try to create a sample.

3) perfect - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:

Quote:

Originally Posted by

Hi Dave,
>
Regarding on the question you mentioned, here are some of my understanding:
>
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
>
>
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
>
>
>
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
>
.NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
>
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
>
Hope this helps.
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
>
==================================================
>
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
>
>
>
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.
>
==================================================
>
>
>
This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
>
>
>
>
>


Thanks for your reply Dave,

there is no built-in means to make the entire ASP.NET site JIT compiled,
you may need to programmatically visit all those pages so as to make them
JIT compiled. For the "merge all pages and control outputs to a single
assembly", I dont think this is the cause of the slow performance.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,

Any further progress on this issue? Please feel free to post here if there
is anything else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Performance questions

Hi;
Got a couple of performance questions.
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htmHi Dave,
Regarding on the question you mentioned, here are some of my understanding:
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi;
1) I use WebDeployment and have it set to "NOT allow to be updatable",
"merge all pages and control outputs to a single assembly", APTCA. Should
this take time to run the first time? And if so, is there a way in IIS to
tell it to load and JIT compile everything?
2) I will try to create a sample.
3) perfect - thanks
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:

> Hi Dave,
> Regarding on the question you mentioned, here are some of my understanding
:
> 1) My app is pre-compiled but when I bounce IIS and then go to a page for
> the first time, it takes a couple of seconds to get that page. Subsequent
> hits are fast. Why?
> ==========================
> How did you precompile your web application, full mode(non-updatable) or
> partial mode(updatable)? For partial precompile, the ASP.NET runtime still
> need to do a slim precompile to merge the aspx and the class in the
> pregenerated assembly. Also, even if you fully precompile the site, you
> should still take the JIT compile into account.
>
> 2) Even after hitting all pages involved, if I logout and then go to login
> again - it takes 5 - 10 seconds. The login page uses the standard login
> control and the ASP.NET membership classes so it's not my code at all. Any
> ideas why it's slow?
> ==============================
> This seems a bit unexpected. Can you repro the behavior through a very
> simple forms authentication secured web project?
>
> 3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
> using System.Diagnostics.Trace. This does not show up in the trace.axd
> details at all. How can I get that in there too?
> ============================
> .NET framework 2.0 does provide means for you to do redirection between
> "Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentione
d
> the steps to do so:
> #Tracing Enhancements in ASP.NET 2.0
> l]
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> [url]http://msdn.microsoft.com/subscriptions/support/default.aspx." target="_blank">http://www.extremeexperts.com/Net/A...t/default.aspx.
> ========================================
==========
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
>
>
>
>
Thanks for your reply Dave,
there is no built-in means to make the entire ASP.NET site JIT compiled,
you may need to programmatically visit all those pages so as to make them
JIT compiled. For the "merge all pages and control outputs to a single
assembly", I dont think this is the cause of the slow performance.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
Any further progress on this issue? Please feel free to post here if there
is anything else we can help.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 26, 2012

Permalink Structure

I have been creating a personal blog engine for the last couple of ws
because I am tired of using WordPress and I don't have a SQL server
back-end. I have successfully created a working URL rewriting engine
(via Global.asax) that cleans illegal characters from the post title,
uses Regular Expressions to grab the entryID (ie 13), rewrite the path
(entry.aspx?entryID=13).
My current permalink structure is as follows:
root/blog/testing-post-example-00013.aspx
I have noticed that some blog engines have the following schemas for
their permalink structures:
root/blog/testing-post-example/00013.aspx
I have tried to create this structure programmatically with the
following code:
string EntryTitle = "testing-post-example";
string PermaLink = EntryTitle + "/" + "000" + EntryID + ".aspx";
When I try to run this I get the error that the file can't be found,
obviously. There must be a way to create this link structure without
having to physically create the directories. I can't imagine that all
of these bloggers login and create a directory for each post and place a
"showEntry.aspx" file in there.
Any suggestions?
- Will
*** Sent via Developersdex http://www.examnotes.net ***Nevermind!
Original RewritePath
httpContext.RewritePath("entry.aspx?entryID=" + pageID);
New RewritePath
httpContext.RewritePath("/entry.aspx?entryID=" & pageID)
No wonder it was FILE NOT FOUND (enry.aspx). Instead of looking in the
root directory (actual location) for entry.aspx it was looking for
entry.aspx in the dynamically created "directory" folder.
*** Sent via Developersdex http://www.examnotes.net ***

Permalink Structure

I have been creating a personal blog engine for the last couple of weeks
because I am tired of using WordPress and I don't have a SQL server
back-end. I have successfully created a working URL rewriting engine
(via Global.asax) that cleans illegal characters from the post title,
uses Regular Expressions to grab the entryID (ie 13), rewrite the path
(entry.aspx?entryID=13).

My current permalink structure is as follows:

root/blog/testing-post-example-00013.aspx

I have noticed that some blog engines have the following schemas for
their permalink structures:

root/blog/testing-post-example/00013.aspx

I have tried to create this structure programmatically with the
following code:

string EntryTitle = "testing-post-example";
string PermaLink = EntryTitle + "/" + "000" + EntryID + ".aspx";

When I try to run this I get the error that the file can't be found,
obviously. There must be a way to create this link structure without
having to physically create the directories. I can't imagine that all
of these bloggers login and create a directory for each post and place a
"showEntry.aspx" file in there.

Any suggestions?

- Will

*** Sent via Developersdex http://www.developersdex.com ***Nevermind!

Original RewritePath
httpContext.RewritePath("entry.aspx?entryID=" + pageID);

New RewritePath
httpContext.RewritePath("/entry.aspx?entryID=" & pageID)

No wonder it was FILE NOT FOUND (enry.aspx). Instead of looking in the
root directory (actual location) for entry.aspx it was looking for
entry.aspx in the dynamically created "directory" folder.

*** Sent via Developersdex http://www.developersdex.com ***

Friday, March 16, 2012

persistent variables?

I have an ASP page written in VB.NET which needs to work with a persistent collection over a couple of requests.

I have tried using each "control" in a collection, which didnt work, anyways ...

I created a New Collection object, populated it and gave it so a Session() cookie to keep untill the next request/postback, but it only keps the first object in the collection?? :confused:

Does anyone know what I mean or should I write up a basic example showing what I mean?

Any help is appreciated, Thanks :)I think you should try explaining again. You mention persistence of variables, but you talk of controls...
Sure, I'll see if I can hack up a quick example tonight maybe (probably not enoguh time, I dont get home till late).

Maybe this will clarify in the mean time...

I am using a form full of controls, yes, but I am using a session cookie to keep information about these controls between postbacks, and because a single session cookie is keeping information for a fair couple controls it is holding a "collection"

So, a Session Variable is assigned a Collection containing information about the controls on the page.
The controls on your page, do they not persist their values between postbacks? That's the main idea behind ASP.NET.
The Frogs right.
Have you got viewstate enabled for each .net control ?