Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carsten Andersen 9 posts 78 karma points
    Jun 17, 2019 @ 12:38
    Carsten Andersen
    0

    SurfaceController is not being published.

    namespace Bank.Controller
    {
        public class HomeController : Umbraco.Web.Mvc.SurfaceController
        {
            public ActionResult SendCalc(string mailto, string link)
            {
                Byte[] bytes = System.IO.File.ReadAllBytes(Path.Combine(HttpRuntime.AppDomainAppPath, "css/img/logo.png"));
                String logoBase64 = Convert.ToBase64String(bytes);
    
                string senderEmail = "[email protected]";
    
                string body = "";
    
                body += "</table>";
    
                if (IsValidEmail(mailto))
                {
                    Helper.MailNotification.Send(mailto, "Låne beregning", body, false, senderEmail);
                }
                return Content("");
            }
    

    I have this very simple SurfaceController, and everything works on localhost, but the problem is that when I publish the site and move it to the server it don't seem to work, I just get runtime error, because it can't find the http://myurl.dk/umbraco/surface/Home/SendCalc?mailto=t&link=hej

    Anyone know how i can solve this?

    Note: I remove some of the content inside the SendCalc()

  • Rhys Hamilton 140 posts 942 karma points
    Jun 17, 2019 @ 15:07
    Rhys Hamilton
    0

    It sounds to me like the DLL file(s) on the server might not match what's on your localhost.

    Try rebuilding your local solution and then publishing the bin folder (or relevant DLLs) to your server.

Please Sign in or register to post replies

Write your reply to:

Draft