Monday, January 28, 2008

ClickOnce Publish Error - "...It may be a page or folder in a subweb.."

Scenario:
Publishing a .NET application called NetSched to a webserver at 10.0.10.20. I had created a virtual directory in the default website called NetSched without executable or write permissions. **Note: I had created a virtual directory previously, with the same name with ALL permissions. This is important.
When I tried to publish I got the following error: "ERROR: Failed to connect to 'http://10.0.10.20/NetSched/' with the following error: unable to create the web 'http://10.0.10.20/NetSched/'. Server error: 'NetSched' does not refer to a page or folder in this web. It may be a page or folder in a subweb, or it could be a badly formed URL."

Resolution:
When I had deleted the previosly created virtual directory, I did not delete ALL the files. Therefore, when I created the new virtual directory with the same name, there were files in the directory that needed to be deleted. The Virtual directory NetSched pointed to the folder "C:\Inetpub\wwwroot\NetSched" After I deleted the files that started with _vti (like _vti_cnf, _vti_pvt, ect) and tried to publish, these files were created and the publish succeeded!

No comments: