Step 2: Rename the generated files

Rename the generated class called Service1 with an appropriate name such as BarCode, and the file Service1.asmx to BarCodeService.asmx, for instance. The .asmx file is the file that is accessible from the IIS web server once the application is deployed. The .asmx file also contains a reference to the default generated class, Service1, which must also be renamed to the new name (BarCode in our tutorial), in case Visual Studio didn't make the change automatically.

The class view after renaming the class:

Figure: Class View; BarCode selected


Class View tab screenshot

The file view after renaming the asmx file:

Figure: File View; BarCodeService selected


File view tab screenshot