Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8259945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:58:35+00:00 2026-06-08T02:58:35+00:00

I have a pretty basic REST call that is written using node / express

  • 0

I have a pretty basic REST call that is written using node / express that takes 2 datetimes as parameters(http://localhost:3000/schedules/’2012-06-28T16:00:00’/’2012-06-28T19:00:00′) It works fine locally when I run my tests against the node executable directly(on windows and on my mac) but when I deploy it to Azure via git, I get the infamous yellow screen.

The debugging log from azure is empty(never getting to my console.logs in node) so I’m guessing that the error is occurring somewhere in iisnode before it gets routed to the node exe. The call does work fine if I use the following format (http://localhost:3000/schedules/2012-06-28/2012-06-29). I was about to install iisnode to test a little more but I was wondering if anyone else has run into this issue before I delve an deeper.

Here’s some partial chunks of code:

routes

app.param('startdate',
function(req, res, next, startdate) {
    req.startdate = startdate;
    next();
});

app.param('enddate',
function(req, res, next, enddate) {
    req.enddate = enddate;
    next();
});

app.get('/schedules/:startdate/:enddate',scheduleController.getSchedulesByStartDateAndEndDate);

scheduleController

exports.getSchedulesByStartDateAndEndDate = function(req, res){
    console.log('getSchedulesByStartDateAndEndDate');
    console.log('StartDate'+req.params.startdate);
    console.log('EndDate'+req.params.enddate);
    ScheduleProvider.getSchedulesByStartDateAndEndDate(req.params.startdate,     req.params.enddate,function(schedules){
        res.send(schedules);
    });
};

scheduleProvider

ScheduleProvider.prototype.getSchedulesByStartDateAndEndDate =     function(startdate,enddate,callback){
console.log(startdate);
console.log(enddate);
var stDate = startdate;
var endDate = enddate;
if (stDate !== undefined) {
    var startDate = new Date(unescape(stDate.toString()).replace(/'/gi, ""));
    endDate = new Date(endDate === undefined ? startDate: unescape(endDate.toString()).replace(/'/gi, ""));
    var sttimes = getTimes(startDate);
    var endtimes = getTimes(endDate);
    console.log(startDate);
    console.log(endDate);
    console.log(sttimes[0]);
    console.log(sttimes[1]);
    console.log(endtimes[0]);
    console.log(endtimes[1]);

    Schedule.find({
        $or: [
        {
            'StartDate': {
                $gte: sttimes[0],
                $lt: endtimes[1]
            }
        },
        {
            'EndDate': {
                $gt: sttimes[0],
                $lte: endtimes[1]
            }
        }
        ]
    }, function(err, schedules){
    callback(schedules);
}).sort('StartDate', 'ascending');
}
};

I’m using mongoose to make the calls but I don’t think it’s ever getting to the provider or controller code. It’s almost like azure is not liking the dates passed in and throwing an exception.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:58:36+00:00Added an answer on June 8, 2026 at 2:58 am

    When running locally, you are using Node directly to host the application. When running in Windows Azure Web Sites you are using both IIS and IISNode as well as Node. I suspect you are having trouble with IIS handling the single quotes and Node (locally) not doing so. You should try running the site locally in IIS (with IISNode) to see if there is the same problem. Possibly the easiest way to do that is to run the site in the Windows Azure Emulator since you can then use the tooling to deploy your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty basic slideshow fading between images. On top of that slideshow
I have some pretty basic HTML/CSS that isn't working as I expect. Basically I
I have a pretty basic question that I imagine would require a join to
I have a pretty basic java applet that allows users to use a signature
I have some pretty basic C++ code: #include <iostream> #include <string.h> #include <msclr\/marshal_cppstd.h> #using
I have a pretty basic NHibernate setup. I am not using Castle Widnsor or
I have a pretty basic form that shows quiz questions along with choices: <%=
I have some pretty basic code to capture a still image using AVFoundation. AVCaptureDeviceInput
I have a pretty basic page that shows every five minutes of the day
I have a user control that is pretty basic. It contains several TextBox controls,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.