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 6873831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:07:07+00:00 2026-05-27T04:07:07+00:00

This is my first question here. I have been searching Stack Overflow and other

  • 0

This is my first question here. I have been searching Stack Overflow and other web resources but I cannot find a solid answer on what is required for FullCalendar to correctly accept a jQuery data property.

What I mean is that I have a web service that takes in a string for its required parameter. I am going to call this *owner_email*.

The web service will take that parameter and return an array of UserAssignments to be rendered by FullCalendar.

I am having a problem with the actual passing of *owner_email* from jQuery/FullCalendar to the ASP.NET web service.

When I change contentType to ‘application/xml’ or comment it out, it returns an empty XML document (which I want at the moment) but when I change it back to ‘application/json’, an error occurs in json format. Any help is appreciated. Also, I would like to know what is required for an event to be put on FullCalendar.

Here is the code that I have done so far:
JavaScript:

$("#calendar").fullCalendar({ dayClick: function () { alert('a day was clicked!'); }, eventSources: [

// your event source { url: "WebService.asmx/displayUserAssignments", type: 'POST', data: { owner_email: 'test' }, processData: true, dataType: "json", contentType: 'application/json', color: 'yellow', // a non-ajax option textColor: 'black' // a non-ajax option } // any other sources... ]

ASP.NET Snippet:

[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public UserAssignments[] displayUserAssignments(string owner_email) { int totalAssignments = 0; int current_index = 0; UserAssignments[] compiled_user_assignments; OracleConnection openedConnection = new OracleConnection(WebConfigurationManager.ConnectionStrings["BehemothConn"].ConnectionString); openedConnection.Open(); OracleCommand query = new OracleCommand("SELECT * FROM personal_assignments_view where owner_email = :input_email", openedConnection); OracleCommand numberOfRows = new OracleCommand("select count(*) from personal_assignments_view where owner_email = :input_email", openedConnection);

query.Parameters.Add(":input_email", OracleType.VarChar).Value = owner_email; numberOfRows.Parameters.Add(":input_email", OracleType.VarChar).Value = owner_email;

OracleDataReader returned_result = numberOfRows.ExecuteReader(); returned_result.Read(); totalAssignments = returned_result.GetInt32(0);

compiled_user_assignments = new UserAssignments[totalAssignments]; returned_result = query.ExecuteReader();

while (returned_result.Read()) { compiled_user_assignments[current_index] = new UserAssignments(); compiled_user_assignments[current_index].assignment_id = returned_result.GetInt32(0); compiled_user_assignments[current_index].owner_email = returned_result.GetString(1); compiled_user_assignments[current_index].assignment_name = returned_result.GetString(2); compiled_user_assignments[current_index].assignment_date = returned_result.GetOracleDateTime(3).Value.ToString("R"); compiled_user_assignments[current_index].assignment_description = returned_result.GetString(4); compiled_user_assignments[current_index].event_id = returned_result.GetInt32(5); compiled_user_assignments[current_index].week_day = returned_result.GetString(6); compiled_user_assignments[current_index].is_deleted = returned_result.GetString(7); compiled_user_assignments[current_index].start_time = returned_result.GetInt32(8); compiled_user_assignments[current_index].end_time = returned_result.GetInt32(9); compiled_user_assignments[current_index].is_completed = returned_result.GetString(10); compiled_user_assignments[current_index].pan_note_id = returned_result.GetInt32(11); compiled_user_assignments[current_index].pan_assign_id = returned_result.GetInt32(12); compiled_user_assignments[current_index].assignment_note = returned_result.GetString(13); current_index++; }

openedConnection.Close(); openedConnection.Dispose(); return compiled_user_assignments; }

UserAssignments class:

public class UserAssignments { public int assignment_id; public string owner_email; public string assignment_name; public string assignment_date; public string assignment_description; public int event_id; public string week_day; public string is_deleted; public int start_time; public int end_time; public string is_completed; public int pan_note_id; public int pan_assign_id; public string assignment_note;

public UserAssignments() { assignment_id = -1; owner_email = ""; assignment_name = ""; assignment_date = ""; assignment_description = ""; event_id = -1; week_day = ""; is_deleted = ""; start_time = -1; end_time = -1; is_completed = ""; pan_note_id = -1; pan_assign_id = -1; assignment_note = ""; } }

jQuery Error:

{“Message”:”Invalid JSON primitive: owner_email.”,”StackTrace”:” at
System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject()\r\n
at
System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32
depth)\r\n at
System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String
input, Int32 depthLimit, JavaScriptSerializer serializer)\r\n at
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer
serializer, String input, Type type, Int32 depthLimit)\r\n at
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String
input)\r\n at
System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext
context, JavaScriptSerializer serializer)\r\n at
System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData
methodData, HttpContext context)\r\n at
System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(Http[…]

  • 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-05-27T04:07:08+00:00Added an answer on May 27, 2026 at 4:07 am

    I suppose you are using >=.NET 3.5

    The problem is :your data is not in correct JSON format. Try using JSON.stringify() and generate JSON data and if you don’t want JSON2.js, try creating the data in appropriate JSON format manually.

    Fullcalendar works well without much hacks if you are returning the array as JSON.

    You will get same error message for start parameter.The problem lies in the fact that fullcalendar trying to append start and end parameters to your data,but the start and end is not in JSON format. So you have to goto fullcalendar.js and edit the following inside function _fetchEventSource(source, callback).

     $.ajax($.extend({}, ajaxDefaults, source, {
                            data: JSON.stringify(data),
                            success: function (events) {
                                events = events.d;
                               ............................
    

    And in your webservice:-

    PS: Don’t try to convert the list inside webservice to any format.Just return the List object. In the success event you have to get the JSON object from the ‘key’ named ‘d’,because in the new versions it encapsulates the object in the key named ‘d’ for ajax calls. So access it using that key.

    Your web service signature (example):

    [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
      public List<Object> functionName(argumentList)
      { return ObjectList;}
    

    Webservice response captured using Firebug
    And if you are returning in XML,then you have to create your event[] object in appropriate format inside your javascript and call–> callback(events) for fullcalendar to display.

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

Sidebar

Related Questions

this is my first question here at Stack Overflow. I've been looking for a
Greetings to all! This is my first question here on stackoverflow. I have a
this is my first question.. so, here we go. i have a site, 100%
Sorry, this's my first time to ask a question here. So, I don't have
this is my first time posting here, I have a question which I have
So this was one of my very first questions here, but I have a
Hello all this is my first post here i have been working in an
This is my first question on the site even though i have been coming
This is my first question that I haven't been able to find an answer
This is the first question I have asked here so bear with me .

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.