Vista uses completely different styles for verification/authorization.
I would guess something you are using is not the same object on other OSs.
Where you able to get a more percise location from the stacktrace when you used literal string to test the SetUser()?
No here is the stack trace:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidCastException: Specified cast is not valid.]
_Default.SetUserData(String AppName, String username, String password) +1194
_Default.OnLoggingIn(Object sender, EventArgs e) +23
System.Web.UI.WebControls.Login.OnLoggingIn(LoginC ancelEventArgs e) +105
System.Web.UI.WebControls.Login.AttemptLogin() +67
System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433