The IASPError::get_ASPCode method returns an error code generated by IIS. It does not apply to scripting errors, only to errors generated by COM components.
HRESULT get_ASPCode( BSTR *pbstrASPCode // pointer to a BSTR for code
);
Parameters
pbstrASPCode
[retval] [out] Points to a BSTR containing the error code.