I finally found out the “Value does not fall within the expected range” problem with a ClickOnce install application. This was the error log:
ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of http://srvweb.bccpojana.bccvicentino.it/BCCAlert/BCCAlert.application resulted in exception. Following failure messages were detected: + Value does not fall within the expected range.
This problem was related to a user profile corruption and recreating it solve the problem but it’s not always possible recreate the user so, to fix that error, just execute this:
rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache