Copied to clipboard

Flag this post as spam?

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


  • Jason Provence 2 posts 22 karma points
    Nov 30, 2011 @ 17:49
    Jason Provence
    0

    /Base/ issue

    I am getting the following Server 500 error when accessing restExtensions with /base/ :

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.presentation.umbracobase.restExtension..ctor(String extensionAlias, String methodName) +676
       umbraco.presentation.umbracobase.requestModule.httpApp_PostAcquireRequestState(Object sender, EventArgs e) +800
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +269

    This is my code:

    [RestExtension("Utilities")]
        public class RestUtilities
        {
            [RestExtensionMethod(allowAll = true)]
            public static string Contact()
            {
                  return "Hi";
            }
         }

     

    Any ideas what is going on?  All of my extensions worked yesterday, but today its like Umbraco can't find my restExtension at all!

    Any help would be greatly appreciated. (IIS 7.5, Umbraco 4.7.1)

     

     

     

  • Henri Toivonen 77 posts 111 karma points
    Dec 01, 2011 @ 15:16
    Henri Toivonen
    0

    Sorry that i cannot be of more help, but the code itself looks just fine. So something else must be the problem.

    Make sure you havent accidentaly deleted any of the files in the /bin folder, have you installed any packages that could conflict? You haven't added stuff in restextensions.conf? (since that's not needed with method attributes)

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Dec 03, 2011 @ 17:09
    Bo Damgaard Mortensen
    0

    Hi Jason,

    Just our of curiousity, have you tried the good ol' fashioned way of entering your base methods in the restExtensions config file and then remove the tags in your code?

    All the best,

    Bo

  • Jason Provence 12 posts 32 karma points
    Dec 05, 2011 @ 20:34
    Jason Provence
    0

    Thank you for your replies.  I actually figured out that it was a .dll file made for transferring Contour forms through Courier that was making the restExtensions mess up.  Not sure why, but when I removed that .dll file, things were back to normal.  Guess I'm back to the drawing board on transferring Contour forms though!

Please Sign in or register to post replies

Write your reply to:

Draft