precompile

G

Guest

Hi,
I've a couple questions regarding in-place pre-compiling .
As I understand it from ms documentation - precompiling a site in place
effectively performs the same compilation that occurs when users request
pages from your site. Therefore, the primary performance improvement is that
pages do not have to be compiled for the first request.
On the server where the web site has freshly been installed I issue the
command
aspnet_compiler -v /MyWebsite
What I get back is an error :

error ASPCONFIG: The CodeDom provider type
"Microsoft.VJSharp.VJSharpCodeProvide
r, VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7
f11d50a3a" could not be located


And nothing gets precompiled .

Q1) How does the site get compiled normally by asp.net as pages are accessed
if this codedom provider is missing ?
Q2 ) what are (if any) the differences between precompile and what is
"effectively the same compilation when a user access a page" ?
Q3) what are the performance differences between the two if any?

Thanks
Chaz
 
W

Walter Wang [MSFT]

Hi Chaz,

Let's deal with the error first.

One possible cause is you didn't have VJ# redist package installed. The
type "Microsoft.VJSharp.VJSharpCodeProvider" should be located at
%windir%\Microsoft.NET\Framework\v2.0.50727\VJSharpCodeProvider.DLL; also
there should have a subfolder named "Microsoft Visual J# 2.0
Redistributable Package."

Do you have installed both 32-bit and 64-bit CLR? Make sure the version
you're using have installed VJ# redist package correctly.

By design, aspnet_compiler.exe will try to load all CodeProvider specified
in machine.config (or machine.config.comments). If the webform is compiled
on the first time, only the specified code provider will be used. I think
this answers your first question Q1.

======

By default, each public resource of an ASP.NET site is compiled on the fly
only upon its first request. This introduces a first-hit delay as a result
of the compilation process. Site precompilation brings a double benefit: no
delay for requests because of compilation and no need of deploying source
code to the Web server. Precompilation comes in two forms, each targeting a
specific scenario: in-place and deploy precompilation. The former prepares
all the resources in a site to be served without delay. It generates all
needed dynamic assemblies for all pages and resources that need be
compiled. In-place precompilation occurs on an already deployed
application. It generates a site layout made only of assemblies that can be
packaged and deployed to a production machine. This form of precompilation
occurs on a development machine and is suited for out-of-box sites that,
like classic Windows executable files, are not subject to dynamic changes.

In-place precompilation is merely a form of performance improvement.
Precompilation ensures that each page is accessed and each required dynamic
assembly is created.

In-place precompilation is analogous to manually requesting all the pages
on the site to make sure all the code is compiled.



Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

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/subscriptions/support/default.aspx.
==================================================

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

Guest

Hi Walt,
The server doesn't have the re-distribution package installed. Where do I
get this ? Do you have a download link that works, the only one I found
wasn't available for download anymore ..

Thanks,
chaz
 
W

Walter Wang [MSFT]

Hi chaz,

I may have made some mistake in my previous reply. The aspnet_compiler.exe
will not load all Code Provider on startup; it only loads specific Code
Provider when you specified according language in your WebForm.

The VJ# redist package is not included in .NET Framework; it's a separate
package which can be downloaded here:

#Download details: Microsoft Visual J# Version 2.0 Redistributable Package
http://www.microsoft.com/downloads/details.aspx?familyid=F72C74B3-ED0E-4AF8-
AE63-2F0E42501BE1&displaylang=en

I've done some test: using a clean Win2003 setup, install .NET 2.0
Framework, then copy a website which only use C# languages. When I run
aspnet_compiler.exe to precompile it, it works correctly. If I create a new
webform which is using J# as its language, aspnet_compiler.exe reports the
error as you're seeing. So I think the J# Code Provider is only loaded when
you have WebForm which is using J# as its language.

Please reply here to let me know whether or not you need further
information. Thank you.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

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

Guest

Hi Walt,
I liked your first answer better ! We cannot determin where the dependancy
for visual J is coming in at . We use c# and vb.net , our web.config doesn't
specify it.
What tools are available to help us figure this out ?

thanks,
chaz
 
W

Walter Wang [MSFT]

Hi chaz,

What I meant in my last reply is: based on my research, if the
aspnet_compiler.exe tries to load VJ# Code Provider, it must because your
website is using some webform that is authored using VJ# language.

However, since you claimed that your website is only using C# and VB.NET,
my findings may not 100% correct. Would you please help me do a simple test
to verify this:

1) Create a simple virtual directory in IIS and copy a simple WebForm which
is using C# or VB.NET as its language;
2) Try to precompile it using aspnet_compiler.exe and see if it reports the
error about VJ# Code Provider

If it reports the error, then aspnet_compiler.exe is using some other
configuration that I current not aware of. If it doesn't, then your
production web site might have some web form which is using VJ# language;
you may have to find it by search for "VJ#" in all your *.aspx files.

Please reply to let me know the result. If it proves the former case, I
will do more research on the internal works of aspnet_compiler.exe. Thank
you.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Joined
Jun 29, 2009
Messages
1
Reaction score
0
in-place precompiling //not creating precompiled files for the aspx under a subfolder

Hi,

I have quick query regarding the same discussion. I am trying to precompile a 2.0 web application which is already deployed. When I goto the ASP.NET Temporary Files to check the precompiled files, I can't see some of the files under the subfolders getting precompiled. Could you please let me know the reason for this behavior?

Appreciate your support in this regard.

Thanks,
Aravind
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top