By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

aspnet_compiler 3 questions

P: n/a
Hi;

I am building our asp.net app for release and we want to precompile the
whole thing. A couple of questions.

First off, what is the -v for? It looks like I can call it anything. Does
that mean anything?

Second, once I compile and have created the pre-compiled program - what
files do I sign with my digital ID?

Third, after I sing them, how do I reapply the keypair to strongly name the
files again?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Nov 13 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Please ignore question 3 - I had it backwards.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"David Thielen" wrote:
Hi;

I am building our asp.net app for release and we want to precompile the
whole thing. A couple of questions.

First off, what is the -v for? It looks like I can call it anything. Does
that mean anything?

Second, once I compile and have created the pre-compiled program - what
files do I sign with my digital ID?

Third, after I sing them, how do I reapply the keypair to strongly name the
files again?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Nov 14 '06 #2

P: n/a
Hi Dave,

As for the questions you mentioned:
First off, what is the -v for? It looks like I can call it anything. Does
that mean anything?
============================
It is used to specify the virtual path in IIS site(in case your web
application is in IIS and do not want to use physical path to reference its
application directory). Of course you can not assign discretionary value
for it.
** if your web application is originally developed through test server, you
should use -p option with physical path to provide the application's
directory path. And here the -v option will represent the virtual path
under the IIS site(you'll deploy it to later).
** if your web application is already hosted in IIS before precompilation,
the -v option just provide the place of its application directory (it
assume that the application is under IIS default site, otherwise you should
use -m to specify IIS metabase path)


Second, once I compile and have created the pre-compiled program - what
files do I sign with my digital ID?
============================
Do you mean strong-name your precompiled assembly? If so, you can just
provide the strong-name key info (file or container) when you use
aspnet_compiler to precompile your site. e.g.

aspnet_compiler -v virtualPath targetPath -keyfile keyFile.snk -aptca

If you want to sign it after precompilation, you need to make it delaysign,
anyway, the aspnet_compiler.exe tool can handle both precompilation and
strong-name signing.

Here are the MSDN reference which as described detailed on ASP.NET 2.0
Precompilation and the aspnet_compiler tool:

#ASP.NET Compilation Tool (Aspnet_compiler.exe)
http://msdn2.microsoft.com/en-us/lib...63(VS.80).aspx

#How to: Sign Assemblies for Precompiled Web Sites
http://msdn2.microsoft.com/en-us/library/ms228209.aspx

In addition, ASP.NET team has also shipped an add-on project---Web
Deployment Project that can improve the flexibility of ASP.NET 2.0
PROJECT'S precompilation:

#VS 2005 Web Deployment Projects
http://weblogs.asp.net/scottgu/archi...06/429723.aspx

http://msdn2.microsoft.com/en-us/asp.net/aa336619.aspx
Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

Nov 14 '06 #3

P: n/a
Hi;

Followup on your answers:

1) I tried using -v abc and then deployed the compiled code to
c:\inetpub\wwwroot\WindwardPortal and that worked fine using the name
WindwardPortal. It seems that the name given to -v is not important. Am I
missing something?

2) On this I am talking about signing with a digital certificate, not strong
naming. We do this with all the libraries we ship so you know they came from
us. We do this with signcode.exe (a MS tool).

--
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,

As for the questions you mentioned:
First off, what is the -v for? It looks like I can call it anything. Does
that mean anything?
============================
It is used to specify the virtual path in IIS site(in case your web
application is in IIS and do not want to use physical path to reference its
application directory). Of course you can not assign discretionary value
for it.
** if your web application is originally developed through test server, you
should use -p option with physical path to provide the application's
directory path. And here the -v option will represent the virtual path
under the IIS site(you'll deploy it to later).
** if your web application is already hosted in IIS before precompilation,
the -v option just provide the place of its application directory (it
assume that the application is under IIS default site, otherwise you should
use -m to specify IIS metabase path)


Second, once I compile and have created the pre-compiled program - what
files do I sign with my digital ID?
============================
Do you mean strong-name your precompiled assembly? If so, you can just
provide the strong-name key info (file or container) when you use
aspnet_compiler to precompile your site. e.g.

aspnet_compiler -v virtualPath targetPath -keyfile keyFile.snk -aptca

If you want to sign it after precompilation, you need to make it delaysign,
anyway, the aspnet_compiler.exe tool can handle both precompilation and
strong-name signing.

Here are the MSDN reference which as described detailed on ASP.NET 2.0
Precompilation and the aspnet_compiler tool:

#ASP.NET Compilation Tool (Aspnet_compiler.exe)
http://msdn2.microsoft.com/en-us/lib...63(VS.80).aspx

#How to: Sign Assemblies for Precompiled Web Sites
http://msdn2.microsoft.com/en-us/library/ms228209.aspx

In addition, ASP.NET team has also shipped an add-on project---Web
Deployment Project that can improve the flexibility of ASP.NET 2.0
PROJECT'S precompilation:

#VS 2005 Web Deployment Projects
http://weblogs.asp.net/scottgu/archi...06/429723.aspx

http://msdn2.microsoft.com/en-us/asp.net/aa336619.aspx
Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

Nov 14 '06 #4

P: n/a
Thanks for your reply Dave,

Are you using the -p option to specify the original directory's path? If
so, the -v virtual path will not be very critical. However, when you do not
include the physical path by -p option, the -v virtual path will be used
for locate your source site's path.

As for the signing tool (.net 2.0 use signtool.exe), you can just sign the
output precompiled assembly through signtool.exe. Also, if you use the web
deployment project, you can configure it to output a single precompiled
assembly:

#Visual Studio 2005 Web Deployment Projects
http://msdn2.microsoft.com/en-us/asp.net/aa336619.aspx

Thus, you can sign against the single output assembly.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 15 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.