0

I have an ASP.NET application that uses Austin Harris JSON RPC library to expose an RPC server. The service works great when I use it in : 1) Debug build running on ASP.NET web server 2) Debug build running on IIS 3) Release build running on ASP.NET web server

However, the configuration that matters - release build running on IIS - does not work. The same code base throws "method not found" error over RPC simply by changing the build type and the host server.

I have verified that the build and release configurations under all the projects in my solution match up and yet have turned up with nothing.

Has anyone seen this before? Any pointers?

Thanks Rishi

Rishi
  • 321
  • 2
  • 6
  • 17

1 Answers1

0

The problem was because I was declaring the service statically, outside of the Application_Start. For some reason (I guess this is part of Microsoft's optimization technique) the service was never instantiated because none of my code references it. Declaring the service outside Application_Start and instantiating it in the Application_Start solved the problem. Found a lead by going through:

https://jsonrpc2.codeplex.com/discussions/483852

Rishi
  • 321
  • 2
  • 6
  • 17
  • I had the same problem which was driving me crazy. What is even more puzzling is that this worked on IIS8, IIS 8 express until recently. And in one moment it stopped for no reason. I really would like this explained. So if someone reads this and has a clue it would be great to shed some light on that. – f470071 Sep 21 '15 at 13:57