15,922,512 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Mitchell Schaff (Top 4 by date)
Mitchell Schaff
19-Dec-19 19:02pm
View
When executing the page in Chrome, the following error is reported:
jquery-3.3.1.js:9600 GET http://localhost:54979/bandwidthchange/FetchBandwidth?UNIID=1539 500 (Internal Server Error)
Forgive me if this is a newbie question, but does this JsonResult method need to be a Post method rather than the Get method?
Mitchell Schaff
19-Dec-19 18:57pm
View
I realized after I posted this that I was asking the wrong question. I don't have the correct handler in place to process the button press that was generating this error.
However, when I made the suggested change, adding the $ sign in front of the reference, the page still does not call the bwURL method. If I try to debug the script in IE 11, it parses the .getJSON call line of code, but never seems to get to the "if (!data)" code. Something is not quite right with that call, but IE doesn't give me any information on what the issue is. I'd appreciate any pointers on this. Thanks!
Mitchell Schaff
19-Dec-19 14:59pm
View
Thanks for the heads-up on this. That was an oversight on my part.
Mitchell Schaff
19-Dec-19 14:57pm
View
Thanks for clarifying that, your answer definitely made a difference!
One related question: after making that change, I'm getting a response that
Quote:
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/bandwidthchange/Index.aspx
~/Views/bandwidthchange/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/bandwidthchange/Index.cshtml
~/Views/bandwidthchange/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
But that puzzles me, because it finds the FetchBandwidth method in the controller correctly if I define the method with just one parameter and pass a single parameter from the .getJSON call. Now, however, with the method defined as
Hide Copy Code
public JsonResult FetchBandwidth(int UNIID, int NetworkID)
and the .getJSON call revised to pass the second parameter correctly, the routine raises the error show above. For reference, the view is named Edit.cshtml, and the controller is named BandwidthChangecontroller.cs
Any hints on what might be causing the error?