i am creating a simple register form which is gonna confirm from my any mobile number,My
problem is i am getting successsfull message send message but am not getting any message received in my number
public ActionResult Register(RegisterModel model)
{
if (ModelState.IsValid)
{
// Attempt to register the user
try
{
var smsVerificationCode =
GenerateSimpleSmsVerificationCode();
WebSecurity.CreateUserAndAccount(
model.UserName,
model.Password,
new
{
model.Mobile,
IsSmsVerified = false,
SmsVerificationCode = smsVerificationCode
},
false);
send("8940495568", "E3254R", string.Format(
"Hi MR." + model.UserName +
"registration verification code is: {0}",
smsVerificationCode)
, model.Mobile);
Session["registrationModel"] = model;
ViewBag.UerName = model.UserName;
return RedirectToAction("SmsVerification", "Account", ViewBag.userName);
}
catch (MembershipCreateUserException e)
{
ModelState.AddModelError("", ErrorCodeToString(e.StatusCode));
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
public void send(string uid, string password, string message, string no)
{
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://moneycentral.msn.com/investor/StockRating/srstopstocksresults.aspx?sco=1&page=1col=13" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}
please help me