I always get same error: Method not found","data":"The method does not exist / is not available.

Jan 6, 2014 at 5:33 PM
I create a simple service:
public class Service:JsonRpcService
    {
        [JsonRpcMethod]
        public string GetServerDate()
        {
            return DateTime.Now.ToString();
        }

        [JsonRpcMethod]
        public string GetSumm(int digit1, int digit2)
        {
            return (digit1 + digit2).ToString();
        }
    }
When i run this from visual studio (http://localhost:5454/js.rpc?jsonrpc={'method':'GetServerDate','params':[],'id':'1'}, it works fine.
But when i host webSite in IIS (8.0), I always get the same error:
"{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found","data":"The method does not exist / is not available."},"id":"1"}"

What am I doing wrong?
Coordinator
Jan 6, 2014 at 11:32 PM
I'm going to take a guess here that the service in not being registered before iis 8 is sending the request.

If your doing your site setup as described here https://jsonrpc2.codeplex.com/wikipage?title=Getting%20Started%20%28ASP.net%29&referringTitle=Documentation
then you could try creating your instance a little differently, like not statically.
Jan 7, 2014 at 6:21 AM
Thanks for reply.
I tried to do so:
public class Global : System.Web.HttpApplication
    {
        JsonService.Service service= new JsonService.Service();;
        protected void Application_Start(object sender, EventArgs e)
        {
But i get error from IIS.

Then, i tried like this:
public class Global : System.Web.HttpApplication
    {
        JsonService.Service service;
        protected void Application_Start(object sender, EventArgs e)
        {
            service = new JsonService.Service();
        }
This works fine.

Thank you!