title: Ajax Enabled Wcf Service cant find specific method
body: <p>I have strange behavior of Webservice. </p>
  
  <p>Right now webservice looks like : </p>
  
  <pre><code>[ServiceContract(Namespace = "")]
      [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
      public class Service1
      {
          // To use HTTP GET, add [WebGet] attribute. (Default ResponseFormat is WebMessageFormat.Json)
          // To create an operation that returns XML,
          //     add [WebGet(ResponseFormat=WebMessageFormat.Xml)],
          //     and include the following line in the operation body:
          //         WebOperationContext.Current.OutgoingResponse.ContentType = "text/xml";
          [OperationContract]
          public string DoWork()
          {
              // Add your operation implementation here
              return "Hello there";
          }
  
          // Add more operations here and mark them with [OperationContract]
      }
  </code></pre>
  
  <p>And I can get Read from it in JS without problems: </p>
  
  <pre><code>   &lt;script&gt;
  
  
  
  
          function doWork() {
              Service1.DoWork(onSuccess, onFailure);
          }
  
          function onSuccess(result) {
              document.getElementById('txtValueContainer').value = result;
          }
  
          function onFailure(result) {
              window.alert(result);
          }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>But, as soon as I am trying to send over something else then strings for example : </p>
  
  <pre><code>        [OperationContract]
          public Question[] OurServerOutput(string userid)
          {
              return Question.getQuestionsForUser(new Guid(userid)).ToArray();
          }
  
  where 
  
          public static IEnumerable&lt;Question&gt; getQuestionsForUser( Guid userGuid)
          {
              LinqConnectionDataContext context = new LinqConnectionDataContext();
              var query = from c in context.Questions where c.UidUser == userGuid select c;
              return query;
  
          }
  </code></pre>
  
  <p>Javascript can't find my Service anylonger and I am getting an error: </p>
  
  <pre><code>Unhandled exception at line 132, column 13 in http://localhost/
  
  0x800a1391 - Microsoft JScript runtime error: 'Service1' is undefined
  </code></pre>
  
  <p>How do I send Array over Ajax Enabled WebService?</p>