Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Web service method works fine on development computer but failed on server

$
0
0

I was intending to reply to a previous thread (link http://forums.asp.net/t/1111790.aspx?Page+Method+Returns+Whole+Page) but it was locked. Anyway I have a similar problem with ASP.NET web service. I have a method that checks for the existence of user password in my database. I wrote a web service method inside an asmx file to access to it.

        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]        
        public Boolean VerifyPasswordExistence(string email, string password)
        {
            EventLogHandlers.WriteToEventLog("Call from WEB SERVICE", EventLogEntryType.Warning);
            //HttpContext.Current.Response.ContentType = "application/json";
            Boolean isValid = PasswordVerifier.checkPasswordExistence_byLoginInfo(
                UserInfoRetrievingClass.getUsernameByEmail(email), GlobalClass.getMD5Hash(MD5.Create(), password));

            return isValid;
        }

It is supposed to return to me a boolean value. When I tested it on my local computer (Windows 10), it worked fine just as I expected. But when I deployed it to my company's server (Windows Server 2012), it didn't work. I've tried to test the web service on the localhost of the server but it doesn't work either. Everytime I press the Invoke button on the web service method test page, it opens a new browser tab with the web service description page on it, no matter if I change the web method above topublic static Boolean or not. In contrast, if I test the web service on the localhost of my dev pc, it'll work fine and give me a boolean value just as I expected when the Invoke button is pressed.

To give you a bit more information about my project. It was written on Visual Studio 2013 and .NET Framework 4.5.1. The .NET Framework version on both my dev pc and my company's server is 4.5.1. The IIS version on my dev pc (Windows 10) is 10, while the IIS version on the server is 8.5. I wonder do I need to configure the server or install any plugin on the server to get this web service work? Please help. Thanks.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>