Thanks for your suggestions, but no none of that helps. I initially was running it with a parameter, but then I took it out to make testing easier to work through. I firstly only had [WebMethod], but many people suggested adding the (true) parameter in there. Didn't help. Yes, the page method is available. If it wasn't available, it would be giving me a 'object undefined' error or something similar, opposed to an 'Authentication Failed' error. Here is the rendered javascript to do with page methods anyway:
<script type="text/javascript">
<!--
var PageMethods = function() {
PageMethods.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
PageMethods.prototype = {
InsertActivity:function(dummy,succeededCallback, failedCallback, userContext) {
return this._invoke(PageMethods.get_path(), 'InsertActivity',false,{dummy:dummy},succeededCallback,failedCallback,userContext); }}
PageMethods.registerClass('PageMethods',Sys.Net.WebServiceProxy);
PageMethods._staticInstance = new PageMethods();
PageMethods.set_path = function(value) {
var e = Function._validateParams(arguments, [{name: 'path', type: String}]); if (e) throw e; PageMethods._staticInstance._path = value; }
PageMethods.get_path = function() { return PageMethods._staticInstance._path; }
PageMethods.set_timeout = function(value) { var e = Function._validateParams(arguments, [{name: 'timeout', type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); }
PageMethods._staticInstance._timeout = value; }
PageMethods.get_timeout = function() {
return PageMethods._staticInstance._timeout; }
PageMethods.set_defaultUserContext = function(value) {
PageMethods._staticInstance._userContext = value; }
PageMethods.get_defaultUserContext = function() {
return PageMethods._staticInstance._userContext; }
PageMethods.set_defaultSucceededCallback = function(value) {
var e = Function._validateParams(arguments, [{name: 'defaultSucceededCallback', type: Function}]); if (e) throw e; PageMethods._staticInstance._succeeded = value; }
PageMethods.get_defaultSucceededCallback = function() {
return PageMethods._staticInstance._succeeded; }
PageMethods.set_defaultFailedCallback = function(value) {
var e = Function._validateParams(arguments, [{name: 'defaultFailedCallback', type: Function}]); if (e) throw e; PageMethods._staticInstance._failed = value; }
PageMethods.get_defaultFailedCallback = function() {
return PageMethods._staticInstance._failed; }
PageMethods.set_path("/EPO/Project/Prepare/Activities/Default.aspx");
PageMethods.InsertActivity= function(dummy,onSuccess,onFailed,userContext) {PageMethods._staticInstance.InsertActivity(dummy,onSuccess,onFailed,userContext); }
function WebForm_OnSubmit() {
return ValidateTabs();if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
// -->
</script>