I have a very small mvc application with 2 text boxes and few buttons. When user clicks on any button, data will be retrieved against particular value entered in text box.
But when I hosted it into the IIS server, its working only when I logged into the server remotely from my local machine, as soon as close the remote connection its giving error as "Data Not found".
In the coding I am displaying this error(Error Panel with ID #ErrorMessage) when we really don't have data and for any other exception as well. Please find my below code and advice why its working only when I remotely logged into the server
$.ajax({
url: "@Url.Action("DownloadForms", "Home")" ,
type: "POST",
data: { transactionType: btnType, QuotationNumber: quotNumber, ContractNumber: contractNumber},
cache: false,
async: true,
success: function (data) {
$('#divBlock').hide();
if (data != "") {
var _baseUrl = "@Url.Action("Download", "Home")" + "?FileVirtualPath=" + data;
window.location = _baseUrl;
}
else {
$("#ErrorMessage").css("display", "block");
$('#ldDialog').trigger('click');
ev.stopPropagation();
return false;
}
},
error: function (data) {
$('#divBlock').hide();
$("#ErrorMessage").css("display", "block");
$('#ldDialog').trigger('click');