Web Api giving error: 500 internal server error
Scenario:
I have an ASP WebAPI service that accept email
id
to retrieve the previous password.
But I am having a problem that If I enter a valid email
Id
"Internal server error 500"
is thrown but if a wrong email
Id
is entered, then Json with error message is returned.
(If an invalid email
id
is entered, then I have a Json with error message returned)
So can please any one guide what to do.
var urll = 'api/BeerAppRetrieve';
// var urll = 'api/BeerApp';
var emailId = "anirudh1190@gmail.com";
//$.getJSON(urll + '/' + data)
$.getJSON(urll, "emailId": emailId )
.done(function (data)
)
.fail(function (jqXHR, textStatus, err)
alert("error" + jqXHR.responseText);
$('#txtUserName').text('Error: ' + err);
);
My json call..
I want the method to be hit if email id is valid also..
Please help...
config.Routes.MapHttpRoute(
name: "DefaultApi1",
routeTemplate: "api/controller/emailId",
defaults: new emailId = RouteParameter.Optional
);
My route config.
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String emailId)
MailMessage MyMailMessage = new MailMessage();
MyMailMessage.From = new MailAddress("beersavo@gmail.com");
MyMailMessage.To.Add(emailId);
MyMailMessage.Subject = "Forgot Password";
MyMailMessage.IsBodyHtml = true;
BeerAppUserClass beerAppDal = new BeerAppUserClass();
String passwrd = String.Empty;
try
passwrd = beerAppDal.GetUserPassword(emailId);
catch (Exception exw)
return Json(new KeyValuePair<String, String>("MailSend", exw.InnerException.Message));
if (!passwrd.Equals(String.Empty))
MyMailMessage.Body = "<table><tr><td>" + "Login to the site with:</td></tr> <tr><td> UserName: </td><td>" + emailId + "</td></tr> <tr><td> Password:</td><td>" + passwrd + "</td></tr></table>";
SmtpClient SMTPServer = new SmtpClient("smtp.gmail.com");
SMTPServer.Port = 587;
//SMTPServer.Host = "smtpout.secureserver.net";
SMTPServer.Credentials = new System.Net.NetworkCredential("email@gmail.com", "Password@321");
SMTPServer.EnableSsl = true;
try
SMTPServer.Send(MyMailMessage);
return Json(new KeyValuePair<String, String>("MailSend", "true"));
catch (Exception ex)
return Json(newKeyValuePair<String,String("MailSend",ex.InnerException.Message));
return Json(new KeyValuePair<String, String>("MailSend", "empty"));
}
Action in the controller
c# javascript .net json asp.net-web-api
|
show 1 more comment
Scenario:
I have an ASP WebAPI service that accept email
id
to retrieve the previous password.
But I am having a problem that If I enter a valid email
Id
"Internal server error 500"
is thrown but if a wrong email
Id
is entered, then Json with error message is returned.
(If an invalid email
id
is entered, then I have a Json with error message returned)
So can please any one guide what to do.
var urll = 'api/BeerAppRetrieve';
// var urll = 'api/BeerApp';
var emailId = "anirudh1190@gmail.com";
//$.getJSON(urll + '/' + data)
$.getJSON(urll, "emailId": emailId )
.done(function (data)
)
.fail(function (jqXHR, textStatus, err)
alert("error" + jqXHR.responseText);
$('#txtUserName').text('Error: ' + err);
);
My json call..
I want the method to be hit if email id is valid also..
Please help...
config.Routes.MapHttpRoute(
name: "DefaultApi1",
routeTemplate: "api/controller/emailId",
defaults: new emailId = RouteParameter.Optional
);
My route config.
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String emailId)
MailMessage MyMailMessage = new MailMessage();
MyMailMessage.From = new MailAddress("beersavo@gmail.com");
MyMailMessage.To.Add(emailId);
MyMailMessage.Subject = "Forgot Password";
MyMailMessage.IsBodyHtml = true;
BeerAppUserClass beerAppDal = new BeerAppUserClass();
String passwrd = String.Empty;
try
passwrd = beerAppDal.GetUserPassword(emailId);
catch (Exception exw)
return Json(new KeyValuePair<String, String>("MailSend", exw.InnerException.Message));
if (!passwrd.Equals(String.Empty))
MyMailMessage.Body = "<table><tr><td>" + "Login to the site with:</td></tr> <tr><td> UserName: </td><td>" + emailId + "</td></tr> <tr><td> Password:</td><td>" + passwrd + "</td></tr></table>";
SmtpClient SMTPServer = new SmtpClient("smtp.gmail.com");
SMTPServer.Port = 587;
//SMTPServer.Host = "smtpout.secureserver.net";
SMTPServer.Credentials = new System.Net.NetworkCredential("email@gmail.com", "Password@321");
SMTPServer.EnableSsl = true;
try
SMTPServer.Send(MyMailMessage);
return Json(new KeyValuePair<String, String>("MailSend", "true"));
catch (Exception ex)
return Json(newKeyValuePair<String,String("MailSend",ex.InnerException.Message));
return Json(new KeyValuePair<String, String>("MailSend", "empty"));
}
Action in the controller
c# javascript .net json asp.net-web-api
Have you tried debugging the server-side code?
– Matthew
Aug 22 '14 at 17:25
2
Internal Server Error
... Start by posting the server code
– Jonesopolis
Aug 22 '14 at 17:25
Let's see your WebApi Controller/Method/Action. Most people mix up MVC and WebApi routing
– Brunis
Aug 22 '14 at 17:25
Internal Server Error is about server side error. So you must show us your server side code.
– Bart Calixto
Aug 22 '14 at 17:28
please show //my code ...
– Bart Calixto
Aug 22 '14 at 17:37
|
show 1 more comment
Scenario:
I have an ASP WebAPI service that accept email
id
to retrieve the previous password.
But I am having a problem that If I enter a valid email
Id
"Internal server error 500"
is thrown but if a wrong email
Id
is entered, then Json with error message is returned.
(If an invalid email
id
is entered, then I have a Json with error message returned)
So can please any one guide what to do.
var urll = 'api/BeerAppRetrieve';
// var urll = 'api/BeerApp';
var emailId = "anirudh1190@gmail.com";
//$.getJSON(urll + '/' + data)
$.getJSON(urll, "emailId": emailId )
.done(function (data)
)
.fail(function (jqXHR, textStatus, err)
alert("error" + jqXHR.responseText);
$('#txtUserName').text('Error: ' + err);
);
My json call..
I want the method to be hit if email id is valid also..
Please help...
config.Routes.MapHttpRoute(
name: "DefaultApi1",
routeTemplate: "api/controller/emailId",
defaults: new emailId = RouteParameter.Optional
);
My route config.
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String emailId)
MailMessage MyMailMessage = new MailMessage();
MyMailMessage.From = new MailAddress("beersavo@gmail.com");
MyMailMessage.To.Add(emailId);
MyMailMessage.Subject = "Forgot Password";
MyMailMessage.IsBodyHtml = true;
BeerAppUserClass beerAppDal = new BeerAppUserClass();
String passwrd = String.Empty;
try
passwrd = beerAppDal.GetUserPassword(emailId);
catch (Exception exw)
return Json(new KeyValuePair<String, String>("MailSend", exw.InnerException.Message));
if (!passwrd.Equals(String.Empty))
MyMailMessage.Body = "<table><tr><td>" + "Login to the site with:</td></tr> <tr><td> UserName: </td><td>" + emailId + "</td></tr> <tr><td> Password:</td><td>" + passwrd + "</td></tr></table>";
SmtpClient SMTPServer = new SmtpClient("smtp.gmail.com");
SMTPServer.Port = 587;
//SMTPServer.Host = "smtpout.secureserver.net";
SMTPServer.Credentials = new System.Net.NetworkCredential("email@gmail.com", "Password@321");
SMTPServer.EnableSsl = true;
try
SMTPServer.Send(MyMailMessage);
return Json(new KeyValuePair<String, String>("MailSend", "true"));
catch (Exception ex)
return Json(newKeyValuePair<String,String("MailSend",ex.InnerException.Message));
return Json(new KeyValuePair<String, String>("MailSend", "empty"));
}
Action in the controller
c# javascript .net json asp.net-web-api
Scenario:
I have an ASP WebAPI service that accept email
id
to retrieve the previous password.
But I am having a problem that If I enter a valid email
Id
"Internal server error 500"
is thrown but if a wrong email
Id
is entered, then Json with error message is returned.
(If an invalid email
id
is entered, then I have a Json with error message returned)
So can please any one guide what to do.
var urll = 'api/BeerAppRetrieve';
// var urll = 'api/BeerApp';
var emailId = "anirudh1190@gmail.com";
//$.getJSON(urll + '/' + data)
$.getJSON(urll, "emailId": emailId )
.done(function (data)
)
.fail(function (jqXHR, textStatus, err)
alert("error" + jqXHR.responseText);
$('#txtUserName').text('Error: ' + err);
);
My json call..
I want the method to be hit if email id is valid also..
Please help...
config.Routes.MapHttpRoute(
name: "DefaultApi1",
routeTemplate: "api/controller/emailId",
defaults: new emailId = RouteParameter.Optional
);
My route config.
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String emailId)
MailMessage MyMailMessage = new MailMessage();
MyMailMessage.From = new MailAddress("beersavo@gmail.com");
MyMailMessage.To.Add(emailId);
MyMailMessage.Subject = "Forgot Password";
MyMailMessage.IsBodyHtml = true;
BeerAppUserClass beerAppDal = new BeerAppUserClass();
String passwrd = String.Empty;
try
passwrd = beerAppDal.GetUserPassword(emailId);
catch (Exception exw)
return Json(new KeyValuePair<String, String>("MailSend", exw.InnerException.Message));
if (!passwrd.Equals(String.Empty))
MyMailMessage.Body = "<table><tr><td>" + "Login to the site with:</td></tr> <tr><td> UserName: </td><td>" + emailId + "</td></tr> <tr><td> Password:</td><td>" + passwrd + "</td></tr></table>";
SmtpClient SMTPServer = new SmtpClient("smtp.gmail.com");
SMTPServer.Port = 587;
//SMTPServer.Host = "smtpout.secureserver.net";
SMTPServer.Credentials = new System.Net.NetworkCredential("email@gmail.com", "Password@321");
SMTPServer.EnableSsl = true;
try
SMTPServer.Send(MyMailMessage);
return Json(new KeyValuePair<String, String>("MailSend", "true"));
catch (Exception ex)
return Json(newKeyValuePair<String,String("MailSend",ex.InnerException.Message));
return Json(new KeyValuePair<String, String>("MailSend", "empty"));
}
Action in the controller
c# javascript .net json asp.net-web-api
c# javascript .net json asp.net-web-api
edited Oct 13 '18 at 19:36
Olorunfemi Ajibulu
394315
394315
asked Aug 22 '14 at 17:23
Rohit PaulRohit Paul
2961312
2961312
Have you tried debugging the server-side code?
– Matthew
Aug 22 '14 at 17:25
2
Internal Server Error
... Start by posting the server code
– Jonesopolis
Aug 22 '14 at 17:25
Let's see your WebApi Controller/Method/Action. Most people mix up MVC and WebApi routing
– Brunis
Aug 22 '14 at 17:25
Internal Server Error is about server side error. So you must show us your server side code.
– Bart Calixto
Aug 22 '14 at 17:28
please show //my code ...
– Bart Calixto
Aug 22 '14 at 17:37
|
show 1 more comment
Have you tried debugging the server-side code?
– Matthew
Aug 22 '14 at 17:25
2
Internal Server Error
... Start by posting the server code
– Jonesopolis
Aug 22 '14 at 17:25
Let's see your WebApi Controller/Method/Action. Most people mix up MVC and WebApi routing
– Brunis
Aug 22 '14 at 17:25
Internal Server Error is about server side error. So you must show us your server side code.
– Bart Calixto
Aug 22 '14 at 17:28
please show //my code ...
– Bart Calixto
Aug 22 '14 at 17:37
Have you tried debugging the server-side code?
– Matthew
Aug 22 '14 at 17:25
Have you tried debugging the server-side code?
– Matthew
Aug 22 '14 at 17:25
2
2
Internal Server Error
... Start by posting the server code– Jonesopolis
Aug 22 '14 at 17:25
Internal Server Error
... Start by posting the server code– Jonesopolis
Aug 22 '14 at 17:25
Let's see your WebApi Controller/Method/Action. Most people mix up MVC and WebApi routing
– Brunis
Aug 22 '14 at 17:25
Let's see your WebApi Controller/Method/Action. Most people mix up MVC and WebApi routing
– Brunis
Aug 22 '14 at 17:25
Internal Server Error is about server side error. So you must show us your server side code.
– Bart Calixto
Aug 22 '14 at 17:28
Internal Server Error is about server side error. So you must show us your server side code.
– Bart Calixto
Aug 22 '14 at 17:28
please show //my code ...
– Bart Calixto
Aug 22 '14 at 17:37
please show //my code ...
– Bart Calixto
Aug 22 '14 at 17:37
|
show 1 more comment
1 Answer
1
active
oldest
votes
Perhaps more of a comment.. .
though the issue is with having the email in the route - it has a period .
- this is throwing off your routing. i had the exact same issue on a previous project that had email addresses as ID's
I would wager that when you try it with a bad email the bad string you're trying with doesn't have a period.
Use a querystring, so 'api/BeerAppRetrieve?theemail=theactual@email.com`
or change your route config to accept the period
or you can replace certain characters in the email client side and change them back server side (worst case)
As a super worst case you could add the following in your web.config (you should really avoid this otheriwse EVERY request on your site goes through the asp.net pipeline..
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"> <!-- add this -->
Update
In your Javascript change:
var urll = 'api/BeerAppRetrieve';
to this
var urll = 'api/BeerAppRetrieve?emailAddress=anirudh1190@gmail.com';
And change your route back to
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/controller/id",
defaults: new id = RouteParameter.Optional
);
and change your API controller to
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String id)
//my code
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
Ultimately, use thequerystring
method to get around the dot in the route
– Darren
Aug 22 '14 at 17:40
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25452449%2fweb-api-giving-error-500-internal-server-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Perhaps more of a comment.. .
though the issue is with having the email in the route - it has a period .
- this is throwing off your routing. i had the exact same issue on a previous project that had email addresses as ID's
I would wager that when you try it with a bad email the bad string you're trying with doesn't have a period.
Use a querystring, so 'api/BeerAppRetrieve?theemail=theactual@email.com`
or change your route config to accept the period
or you can replace certain characters in the email client side and change them back server side (worst case)
As a super worst case you could add the following in your web.config (you should really avoid this otheriwse EVERY request on your site goes through the asp.net pipeline..
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"> <!-- add this -->
Update
In your Javascript change:
var urll = 'api/BeerAppRetrieve';
to this
var urll = 'api/BeerAppRetrieve?emailAddress=anirudh1190@gmail.com';
And change your route back to
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/controller/id",
defaults: new id = RouteParameter.Optional
);
and change your API controller to
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String id)
//my code
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
Ultimately, use thequerystring
method to get around the dot in the route
– Darren
Aug 22 '14 at 17:40
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
|
show 3 more comments
Perhaps more of a comment.. .
though the issue is with having the email in the route - it has a period .
- this is throwing off your routing. i had the exact same issue on a previous project that had email addresses as ID's
I would wager that when you try it with a bad email the bad string you're trying with doesn't have a period.
Use a querystring, so 'api/BeerAppRetrieve?theemail=theactual@email.com`
or change your route config to accept the period
or you can replace certain characters in the email client side and change them back server side (worst case)
As a super worst case you could add the following in your web.config (you should really avoid this otheriwse EVERY request on your site goes through the asp.net pipeline..
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"> <!-- add this -->
Update
In your Javascript change:
var urll = 'api/BeerAppRetrieve';
to this
var urll = 'api/BeerAppRetrieve?emailAddress=anirudh1190@gmail.com';
And change your route back to
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/controller/id",
defaults: new id = RouteParameter.Optional
);
and change your API controller to
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String id)
//my code
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
Ultimately, use thequerystring
method to get around the dot in the route
– Darren
Aug 22 '14 at 17:40
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
|
show 3 more comments
Perhaps more of a comment.. .
though the issue is with having the email in the route - it has a period .
- this is throwing off your routing. i had the exact same issue on a previous project that had email addresses as ID's
I would wager that when you try it with a bad email the bad string you're trying with doesn't have a period.
Use a querystring, so 'api/BeerAppRetrieve?theemail=theactual@email.com`
or change your route config to accept the period
or you can replace certain characters in the email client side and change them back server side (worst case)
As a super worst case you could add the following in your web.config (you should really avoid this otheriwse EVERY request on your site goes through the asp.net pipeline..
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"> <!-- add this -->
Update
In your Javascript change:
var urll = 'api/BeerAppRetrieve';
to this
var urll = 'api/BeerAppRetrieve?emailAddress=anirudh1190@gmail.com';
And change your route back to
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/controller/id",
defaults: new id = RouteParameter.Optional
);
and change your API controller to
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String id)
//my code
Perhaps more of a comment.. .
though the issue is with having the email in the route - it has a period .
- this is throwing off your routing. i had the exact same issue on a previous project that had email addresses as ID's
I would wager that when you try it with a bad email the bad string you're trying with doesn't have a period.
Use a querystring, so 'api/BeerAppRetrieve?theemail=theactual@email.com`
or change your route config to accept the period
or you can replace certain characters in the email client side and change them back server side (worst case)
As a super worst case you could add the following in your web.config (you should really avoid this otheriwse EVERY request on your site goes through the asp.net pipeline..
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"> <!-- add this -->
Update
In your Javascript change:
var urll = 'api/BeerAppRetrieve';
to this
var urll = 'api/BeerAppRetrieve?emailAddress=anirudh1190@gmail.com';
And change your route back to
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/controller/id",
defaults: new id = RouteParameter.Optional
);
and change your API controller to
[EnableCors("*", "*", "GET, POST")]
public IHttpActionResult GetForgotPassword(String id)
//my code
edited Aug 22 '14 at 17:38
answered Aug 22 '14 at 17:31
DarrenDarren
20.8k175894
20.8k175894
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
Ultimately, use thequerystring
method to get around the dot in the route
– Darren
Aug 22 '14 at 17:40
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
|
show 3 more comments
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
Ultimately, use thequerystring
method to get around the dot in the route
– Darren
Aug 22 '14 at 17:40
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have added route config setting please guide what to do.?
– Rohit Paul
Aug 22 '14 at 17:33
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
I have this setting in web config
– Rohit Paul
Aug 22 '14 at 17:36
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
see updates - change a few things
– Darren
Aug 22 '14 at 17:39
Ultimately, use the
querystring
method to get around the dot in the route– Darren
Aug 22 '14 at 17:40
Ultimately, use the
querystring
method to get around the dot in the route– Darren
Aug 22 '14 at 17:40
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
The thing is its working fine in local but wen the api is deployed and I try to use this, it is throwing error.
– Rohit Paul
Aug 22 '14 at 17:41
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25452449%2fweb-api-giving-error-500-internal-server-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried debugging the server-side code?
– Matthew
Aug 22 '14 at 17:25
2
Internal Server Error
... Start by posting the server code– Jonesopolis
Aug 22 '14 at 17:25
Let's see your WebApi Controller/Method/Action. Most people mix up MVC and WebApi routing
– Brunis
Aug 22 '14 at 17:25
Internal Server Error is about server side error. So you must show us your server side code.
– Bart Calixto
Aug 22 '14 at 17:28
please show //my code ...
– Bart Calixto
Aug 22 '14 at 17:37