Debug vs Release mode on IIS 7.5

1k Views Asked by At

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

1

There are 1 best solutions below

1
On

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