using web service login in moodle 2.2.1 oktech
good evening, thank you please help.
Moodle 2.2.1 Install, configure the Web service through notifications, enable the service. among others.
got on my file server with all its contents WSPP.
I go to my external application to use the same code using version 1.9 FORMOODLE. (FOR THIS VERSION worked perfectly)
START A login! THROUGH THIS CODE:
string UsernameADM = "user";
string PasswordADM = "pass";
Note: user and pass is the administrator total in moodle 2.2.1
MoodleWS MyWebServices = new MoodleWS();
loginReturn _loginReturn = MyWebServices.login(UsernameADM, PasswordADM);
loginReturn _loginReturn = MyWebServices.login(UsernameADM, PasswordADM); HERE IN THIS LINE THROWS ME AN ERROR WHICH EXPOSE ON THE FINAL
try
{
_loginReturn = MyWebServices.login(UsernameADM, PasswordADM);
string client = _loginReturn.client.ToString();
string sessionkey = _loginReturn.sessionkey;
.
.
.
}
---------------------------------------------------
xmlns="http://www.w3.org/1999/xhtml" <html lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="3; url=http://adiestrawebadistancia.com" />
<title> Redirect </ title>
</ Head> <body> <div style = "margin-top: 6em; margin-left: auto; margin-right: auto; color: # 990000; text-align: center; font-size: large; border-width : 1px;
border-color: black; background-color: # ffffee; border-style: solid, border-radius: 20px; border-collapse: collapse;
width: 80%;-moz-border-radius: 20px; padding: 15px ">
Incorrect access detected, may be accessed this server only through "http://adiestrawebadistancia.com" address, sorry. <br /> Please notify server administrator.
</ Div> <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
xmlns="http://www.w3.org/1999/xhtml" <html lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Redirect </ title>
</ Head> <div style="margin-top: <body> 3em; margin-left:auto; margin-right:auto; text-align:center;"> This page Should Automatically redirect. If nothing is happening Please use the link below continue. <br /> <a Href="http://adiestrawebadistancia.com"> Continue </ a> </ div> </ body> </ html> </ body> </ html>
-.
I'M WITH THE ADMINISTRATOR logging to MOODLE TOTAL