I created on a local umbraco a few baseservices which work fine on my local machine, but when I deploy the site to our staging server the service give a 404 server error.
We know that the code from the service gets executed because it sends a mail in the code, but something is going wrong with the return value.
The service :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Web.Security;
namespace TheseDays.Business
{
public class BaseLibrary
{
public static string UserExists(string name)
{
var user = Membership.GetUser(name);
if (user != null)
{
return "true";
}
else
{
return "false";
}
}
public static string ResetUser(string name)
{
var user = Membership.GetUser(name);
if (user != null)
{
try
{
var newPassword = user.ResetPassword();
var mail = new MailMessage();
mail.To.Add(user.Email);
mail.Subject = "New Password";
mail.From = new MailAddress("[email protected]");
mail.Body = String.Format("Your new password : {0}", newPassword);
var client = new SmtpClient();
client.Send(mail);
return "true";
}
catch (Exception ex)
{
return "false";
}
}
else
{
return "false";
}
}
}
}
Base service 404 on staging
Hi all,
I created on a local umbraco a few baseservices which work fine on my local machine, but when I deploy the site to our staging server the service give a 404 server error.
We know that the code from the service gets executed because it sends a mail in the code, but something is going wrong with the return value.
The service :
restExtention Settings :
is working on a reply...