Starting solution build. BUILD FAILED Error checking whether ‘http://localhost/ProjectDirectory/projectname.csproj’
is an enterprise template project. The remote server returned an error:
(403) Forbidden. Total time: 0.3 seconds.
that’s the error that I got when the nant build script tried to build the Web Project I tried out diff stuff but didn’t succeed for quite some time maybe was missing something important,dint know what to do then something struck me, when we define a virtual directory we have diff options.
And one of the important ones there is “script source access” especially in our case as we are trying to access the files in the virtual directory and build them using nant scripts
The reason for this happening is that IIS has a strict access setting for the virtual directories that it hosts and it doesn’t allow any scripts to access the files in the virtual directory’s physical folder and hence the message The remote server returned an error: (403) Forbidden
one of the way to solve this problem is by checking the option of script source access in the virtual directories properties
Here is the place where you can check the option to allow script access to your code files for getting rid of the Nant forbidden error