Avatar of mgmhicks
mgmhicks

asked on 

trying to access my apphandler through ajax

I have an apphandler.ashx file in the app_code folder.  The script to access it is.  The file is there and works on development but on production machine I get:

Failed to load resource: the server responded with a status of 404 (Not Found)   http://localhost:49630/App_Code/UnitAvailability.ashx 

It worked in the route on the development but not on production.  Since moving it to app_code folder it no longer works and I get the above error.


I see the file sitting there not sure whats up

 $.ajax({
            url: 'App_Code/UnitAvailability.ashx',
            type: 'POST',
            dataType: 'json',
            //  data: JSON.stringify($('form').serializeObject()),
            data: JSON.stringify(test2),

            success: function (data) {
                
             var oTable =   $('#example').DataTable({
                    data: data, //this is your JSON object, which is what is showing in your post above with console.log(data)
                    "bLengthChange": false,
                    searching: false,
                    select: {  etc,,,,,  

Open in new window

JSONASP.NETAJAX

Avatar of undefined
Last Comment
leakim971
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo