Sage 300 Compiling Web Screens in Release Mode Tip

Introduction

When developing Web Screens for Sage 300, a developer typically compiles and runs in Debug mode within the Visual Studio IDE.

Changing to Release mode and compiling the solution performs an additional step which is to deploy or copy the required assemblies and files to the developer’s local Sage 300 installation. This is beneficial for the developer to see the screens running via the Sage 300 homepage.

This deployment or copy is performed by the post-build event utility MergeISVProject.

But, the files may be locked by another process. This article will explain who has these files locked and the steps required to successfully compile in Release mode or manually copy files.

Why are my files locked?

Files are targeting the Web folders will be copied without issue, while the files in the Worker folder will most likely be held by our worker service. This service is responsible for managing the worker role for the Sage 300 Web Screens.

This is the reason that a compile in Release mode or a manual copy of files to the Worker folder may not be successful.

Blog131

How do I unlock my files?

Stopping our worker service, compiling in Release mode or copying of files and then re-starting the worker service is the best and simplest way to resolve this issue.

Stop the Worker Service

Invoke the Services Desktop Application and scroll down to the Sage.CNA.WindowsService:

Blog132

Double-Click the service and select Stop:

Blog133

Compile in Release Mode or Manually Copy Files

When the developer solution is compiled in Release mode or files are manually copied, with the Sage.CNA.WindowsService stopped, the copy process will not run into a lock or contention scenario.

Re-start the Worker Service

To re-start the service, select Start:

Blog134

Summary

This article explained why a compile in Release mode or a manual copy of files to the Worker folder for the Sage 300 Web Screens may run into a locked or contention scenario.

The copy process will not encounter an issue if the Sage.CNA.WindowsService is stopped.

And, don’t forget to re-start the service after the compile or copy is successful!

Finally, after any file is updated in either the Web or Worker folders it is always good practice to perform an IIS Reset of the Default Web Site.

As a standard disclaimer, any topic in this article is subject to review and doesn’t represent a commitment as to when it will be available.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s