Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points c-trib
    Aug 31, 2010 @ 18:03
    Dan
    0

    Base error: Extension not found or permission denied

    Hi all,

    I'm trying to get a simple HelloWorld base implementation working.  I have the following class and config code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;

    namespace BaseSample
    {
    public class Library
    {
    public static string HelloWorld()
    {
    return "hello world";
    }
    }
    }
    <?xml version="1.0" encoding="utf-8"?>
    <RestExtensions>

    <ext assembly="/bin/MyBaseAssembly" type="BaseSample.Library" alias="Sample">
    <permission method="HelloWorld" allowAll="true" />
    </ext>

    </RestExtensions>

    But when I call the URL: http://www.mydomain.com/base/Sample/HelloWorld.aspx I just get an error:

    <error>Extension not found or permission denied</error>

    I've checked permissions on the 'restExtensions.config' file after upload, and it seems to have the same permissions as all other files in the config folder.

    Can anyone see why this is failing?

  • Dan 1288 posts 3921 karma points c-trib
    Aug 31, 2010 @ 18:26
    Dan
    0

    Okay, now this is odd.  I changed the path to the assembly from

    /bin/MyBaseAssembly

    to

    /MyBaseAssembly

    And it now works fine.  The assembly IS in the bin folder and is not in the site root.  I tried this on a different installation running 4.5.1 and got the exact same thing.  Is it a 4.5.x change which automatically assumes the assembly value to be precursed by /bin?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 31, 2010 @ 19:18
    Matt Brailsford
    1

    Hey Dan,

    Your findings are correct, as of 4.5.x you no longer need the /bin/ at the begining.

    Matt

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 08, 2013 @ 13:05
    Alex Skrypnyk
    0

    THanks ) it helps me )) Just:

    MyBaseAssembly
Please Sign in or register to post replies

Write your reply to:

Draft