Copied to clipboard

Flag this post as spam?

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


  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Sep 25, 2009 @ 17:28
    Warren Buckley
    0

    /Base Beginner Question

    Hello all,
    I have tired following the beginner Hello World /Base tutorial on the WIKI and I am not having much luck.

    Here are the details:

    Config/restExtensions.config

    <?xml version="1.0" encoding="utf-8"?>
    <RestExtensions>
      <ext assembly="/bin/base" type="base.comments" alias="Comments">
        <permission method="AddComment" allowAll="true" />
      </ext>
    </RestExtensions>

    Class - Base.cs

    using System;

    namespace Base
    {
    public class Comments
    {
    public static string AddComment()
    {
    return "hello world";
    }
    }
    }

    I am calling the Base URL as so: (I noticed this URL is case sensitive)
    http://cws.blog.dev/base/Comments/AddComment.aspx

    And i get the following error:
    Object reference not set to an instance of an object.

    Stack Trace

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

    Could someone give me some pointers on where I am going wrong.

    Thanks,
    Warren

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 25, 2009 @ 17:46
    Dirk De Grave
    1

    Hiya Warren,

     

    Type in <ext ../> is case sensitive should be

    <ext assembly="/bin/base" type="Base.Comments" alias="Comments"/>

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft