Sunday, March 11, 2007

How to pre-compile an ASMX web service


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


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


Physical directory of the app


Location of strong name key file (snk)


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:

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