Monday, January 28, 2008

ClickOnce publish error: "...make sure the web server name is valid..."

Scenario:
I am publishing a .NET application to a webserver. For test purposes, I have had a test website set up at http://lee.interyx.net and am going to try to publish to it.

I get the following error:
"ERROR: Failed to connect to http://lee.interyx.net/NetSched with the follwoing error: Unable to create the web 'http://lee.interyx.net/NetSched/'. Could not find a web server at 'lee.interyx.net' on port 80. Please check to make sure that the web server name is valid and your proxy settings are set correctly. If you are sure that everything is correct, the web server may be temporarily out of service."

I then go through the following steps:

1. Create a new folder in C:\inetpub\wwwroot. Then open IIS and create a virtual directory with an alias of TestSide and point it to the folder. Still unable to browse to the test site in a web browser.

2. On the web server, open a command window. Browse to C:\Windows\Microsoft.NET\Framework\
Run aspnet_regiis -i
This should make sure that asp is registered AFTER the framework is installed
Still not able to browse to the website.

3. Make sure that IIS is running (I know, a little late in the game, but better late than never, and at this point, I was hoping it was just something dumb like this that was overlooked). It was running. :(

4. Reinstall the .NET framework, just to make sure it was installed correctly.

5. Change the publishing location to use the internal address of 10.0.10.20. I am able to browse to the website if I use http://10.0.10.20/NetSched, just not http://lee.interyx.net/NetSched.
Now, I get a new 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'. The web server does not appear to have the FrontPage server extensions installed".

6. Double check to make sure the FrontPage server extensions are installed. They are.

About this time, the entire network went down. Apparently Qwest had a line cut between here and Denver and VCN went down too. When everything came back up, I was able to connect. Hmmm...I don't know what the exact resolution was, as I had gotten other people involved and can not say for sure if they also changed a setting that I do not know about.

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!

ClickOnce Applications and Mozilla Firefox

Scenario:
I published a .NET project to a website for installation and deployment. If the end user was using Internet Explorer, all was well. However, if the user was using Mozilla Firefox, the application was not able to be run, even after the setup file was downloaded.

Resolution:
An addon needs to be downloaded and installed on the end user's machine. The addon can be found at https://addons.mozilla.org/en-US/firefox/addon/1608
Now, when the setup file is run, another button is shown that says "Run ClickOnce Application". Clicking this button runs the setup and installs as intended.

Thursday, January 3, 2008

SQL Error: RestoreContainer::ValidateTargetForCreation

Scenario: I created a backup of a database on the server (Server2003) running SQL 2000. When I tried to restore the database on an XP machine running SQL 2005, I got the following error: The operating system return the error '5(Access is denied)' while attempting 'RestoreContainer::ValidateTargetForCreation' on ''

Resolution:
1. On the XP machine (or whatever machine you are trying to restore to), open SQL configuration manager.
2. Right Click SQL Server Express (or SQL Server (SQLEXPRESS) if running full SQL)
3. Choose Properties
4. On the Logon Tab, make sure the "Built in Account" radio button is checked and then choose "Local System" from the dropdown

This allowed me to restore the backup. This is not as secure, obviously, so I will probably want to change it back after my restore has been completed.

Post Prime

Ok, I'm so tired of running across errors, finding a fix for them and then 2 weeks later forgetting exactly how I fixed it that I finally broke down and created a blog to hold these nuggets of intellectual treasures. Ahhh...my precious! Now I will be able to take over the world in a night! NARF!