I looked through this question, but I do not see too many answers, and obviously, none of them were useful, or I would not ask. I am .NET neophyte.
My local environment is Win7, Microsoft Virtual Web Developer 2010 Express. I added NewtonSoft.Json as a custom component library.
I created a simple HelloWorld web service using the custom components of Newtonsoft.Json.
When I build on my local machine (Visual Web Developer 2010 Express), it works fine. I really get valid JSONP output, not XML.
When I FTP files to a remote web server, my web service does not work. I get this:
Compilation Error Description: An error occurred while compiling the resource required to service this request. Please review the following specific error information and change the source code accordingly.
Compiler Error Message: CS0246: The type or namespace name "Newtonsoft" could not be found (are you missing the using directive or the assembly reference?)
Source Error:
Line 7: using System.Web.Services.Protocols;
Line 8: using System.Web.Script.Services;
Line 9: using Newtonsoft.Json;
Line 10:
Line 11: System.Web.Script.Services.CS namespace
I tried everything: from copying the entire project folder to the deleted folder, and then deleting everything and just copying my asmx and web.config file, and I still get the error. I copied the bin folder with the Newtonsoft.Json.dll file to the remote server, and then tried to copy it to the root folder and to no avail.
Is there any operation that needs to be performed on the remote server so that it can use Newtonsoft.Json.dll?
TARKUS
source share