Search code examples
windowsiisverdaccio

'npm adduser' returns error 405 IIS 7. WebDAV module


I setup Verdaccio on IIS 7.5. The web interface is up at the desired address. When I try to execute npm adduser --registry http://my.registry.it/, as requested in the UI, I get an npm ERR! saying

HTTP Error 405.0 - Method Not Allowed

It seems a configuration problem with the WebDAV module, but I tried to:

give the WebDAV module various permissions, including executing and scripting and added "all verbs" manually generate a user entry in ./htpasswd. This step led me to login via UI, but not via CLI give the user that runs Verdaccio Application Pool all permissions Please, help me out :)

Screenshots below.

Web UI

The CLI error, put in htm file for convenience


Solution

  • I had a same problem.

    I install the verdaccio in iis 7.0 (Windows 7) but it's not working and has error.

    when I install the verdaccio in iis, I need to install the iisnode and ApplicationRequestRouting.

    also, I need to URL Rewrite in iis, that it's not suppotred in iis 7 (I'm not sure).

    I had to install and run verdaccio in iis 8.0 (windows 8) and solved my problem.

    after the install in iis 8.0, I set this config:

    1. open iis and go to your app. (e.g: http://myregister.com).
    2. go to handler Mapping.
    3. in right panel, click Edit Feature Permission.
    4. check the Read , Script and Execute.
    5. click the Ok button and reset iis.

    I hope is useful.