- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
+FloatingFatMan Subscriber¹
First, let me start by saying that, though I'm a seasoned developer with 30 years behind the keyboard, I've only been working with web development for about a year, so there are things I don't know. However, this one really has me confused!
All I want to do is send an array of integers to an MVC controller using an AJAX call. The code below works absolutely perfectly for me every single time I run it in my development environment (Windows 10, VS2017), BUT, when I roll it out to the production server (running IIS 7.5), I get an error 500, internal server error. To make matters worse, this code WORKED on the production environment 1 week ago, and yesterday it decided "screw you!" and started to fail.
Note, when it errors, it jumps into the error part of the Ajax call; it never gets into the controller method, I guess because it doesn't like the int[] parameter anymore...
Here is my AJAX call:
And here is my controller method:
I've had to change over to just passing a delimited string for now, and converting it back into an array inside my controller method (which is just urgh!), but I'm REALLY struggling to understand why this just stopped working?! Is there anyone here with more javascript experience than me that can explain what could have caused this?
Link to comment
https://www.neowin.net/forum/topic/1342926-sending-an-array-via-ajax-to-mvc-controller/Share on other sites
6 answers to this question
Recommended Posts