I am getting this error (at the bottom) when I try to run this code using a generic handler
Jquery Code
$.post("CheckUserName.ashx?username=Aaron902",
function (result) {
$('#username_availability_result').html('Name already exist!');
if (result == "exists") {
$('#username_availability_result').html('Name already exist!');
}
else {
$('#username_availability_result').html('Still available');
}
});
Handler Code
public void ProcessRequest(HttpContext context)
{
string user_name = context.Request.QueryString["username"];
string output = "here";
output = CheckUserNameAvailability(user_name);
context.Response.Write(output);
context.Response.End();
}
Server Error in '/' Application.
Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'Dating.CheckUserName'.
Source Error: Line 1: <%@ WebHandler Language="C#" CodeBehind="CheckUserName.ashx.cs" class="Dating.CheckUserName" %>
Source File: /CheckUserName.ashx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
Dating.CheckUserName
in them. Is theCheckUserName
class you specified inCheckUserName.ashx.cs
contained in theDating
namespace? If this error is occurring on the production site, have you uploaded your newly built DLLs? – lsuarez