ClickOnce in a password protected directory RRS feed

  • Question

  • I have made some small steps in using ClickOnce deployment on a hosting account running Linux.


    I was having some problems initially by getting an error saying the application could not be downloaded.  I looked at the log and saw that the server was returning a 401 error.


    I guessed that maybe my htaccess file in the directory was restricting access to the file.  The htaccess file is being used to password protect the directory that the ClickOnce files are located within.


    I removed the password protection from the htaccess file and the ClickOnce deployment worked successfully.


    Does anyone know how to have both?  How do I prompt for the login credentials again before deployment or how do I "remember" them so the download and install works correctly?



    Tuesday, April 3, 2007 2:20 AM

All replies

  • Since this is more of a ClickOnce question than a VB specific issue, I moved the thread to the ClickOnce and Setup & Deployment Projects forum.


    Best regards,

    Johan Stenberg

    Tuesday, April 3, 2007 10:14 PM
  • I have exactly the same issue.


    I want a username/password prompt when a user goes to the ClickOnce installation page, so I created a .htaccess file like this:

        AuthType Basic

        AuthName "Restricted Area"

        AuthUserFile "/home/[blaa blaa blaa]"

        require valid-user


    However, when user clicks the 'Install' button, the download fails. The log shows this error: "- The remote server returned an error: (401) Unauthorized.".


    The error goes away when I remove the authorization lines from the .htaccess file, but users are no longer prompted for username/password then.


    How do we prompt for login credentials when hit the page, and the download work too?

    Wednesday, April 4, 2007 7:01 PM