Sunday, March 11, 2007

How to pre-compile an ASMX web service

Usage:

aspnet_compiler -? to view options. The ones I used are:

-v

Virtual path of app (i.e. “/MyApp”)

-p

Physical directory of the app

-keyfile

Location of strong name key file (snk)

-f

Overwrite previous content

So for example, we have a web service named SoxAuditWss, if we need to move this web service to the QA machine, we could pre-compile it by using the following command:

aspnet_compiler
-v /SoxAuditWss
-p "C:\vsprojects\Services\SOXAuditWSS"
-f "C:\vsprojects\Services\bin"
-keyfile "C:\vsProjects\Services\BTS\yourkeyhere.snk"

Dont forget to add the Key to the compilation step. This is necessary if you are moving this web service to a different machine.



No comments: