HTTP/1.1 403 Forbidden When Calling WCF Service?

Jun 23, 2010

I'm getting some strange behaviour when calling my test WebService. I get the expected response when testing with IE7 & 8, however with both Chrome and Firefox I'm getting a 403 error.

The Service is called via
Code:
if(window.jQuery)
{
$.ajax({
type: "POST",
url:

[Code]...

The service and test web site are both running from the same domain (a local webserver) with the service on port 7000 and the test client running from port 80. Does anyone have any idea why this service might be responding correctly to IE and not Chorme?

View 3 Replies


ADVERTISEMENT

Consume .NET Web Service With HTTP-POST/GET

Jul 23, 2005

I am developing an ASP.NET web application that requires the use of
remote calls going on behind the client's page in the browser. I
successfully got the service working via SOAP (I have to use SOAP due
to the fact that I need this to be compatible with Netscape 7.0).
However, there is a memory leak in Netscape using SOAP calls, and I
can't figure out why. So I thought that accessing the web service with
HTTP-POST or some other javascript method might alleviate this problem.
Can anyone show me another method, or tell me what is wrong with my
SOAP calls?

View 2 Replies View Related

HTTPS Web Service Request From HTTP Page?

Feb 2, 2010

I am writing JavaScript code that runs inside HTTP page, I need to make XMLHttpRequest to a REST web service. The service is running on the same site but it only accepts HTTPS. I tried to prefix the URL with https:// and Firefox rejected it as cross-site scripting attempt. It's not really cross site as I am calling the same site.

I don't have an option to redirect the entire page to https.

Is there a proper way to implement this request?

View 5 Replies View Related

Soapclient.js Error While Calling Web Service?

Jan 19, 2010

I am writing a small java script to call a web service, by using soapclient.js Here is the code am writing:

Code:

<action trigger="onLoad">
<!--
<text>
<name>txtGroups</name>

[code]....

I get error:Code: Your browser does not support XmlHttp Objects soapclient.js line 360 what is the correct way to call a web service in javascript (onLoad)...

View 14 Replies View Related

JQuery :: IE 7 Receiving A Parse Error Calling A Web Service?

Feb 4, 2010

I'm using 1.4.1 and I have two html files, the first one contains

$(document).ready(function() {
$('#recordHit').load("http://localhost/soapcall2.html");
});

the second file, soapcall2.html contains just the following (no <html/>,<head/> or <body/> tags)

<script>
var ServiceUrl = '/ws/';
var CreateSession = ServiceUrl + 'general.asmx?op=CreateUserSession';

[code]....

In IE 7/8 the error: event is triggered with the correct XML (XMLHttpRequest.responseText) but the textStatus reports parserror and the errorThrown returns [object error]. In firefox it runs without any problems and properly sets the sessiontoken variable.

View 2 Replies View Related

JQuery :: Calling Legacy Web Service With Ajax Call

Jan 12, 2012

Have successfully created a node.js web service that I can access using jQuery ajaxcalls. My service returns json and the ajax parser works great.

My question is whether I can access an existing Microsoft asmx web service that is simply returning XML or non-json data?

Is there a way to tell the ajax call not to parse the returned data stream? I need to be able to authenticate against the legacy web service, so I don't have to rewrite all the code. I have tried changing the content type and data type, but to no avail.

Sample Code:

This code fails every time and I have tried a POST and changing the content/data types.

View 2 Replies View Related

Jquery :: Error When Calling Web Service From Ajax Call

Mar 30, 2010

I am calling web service through jquery ajax call for the first time and getting an error.

Below is the code:

Here is JScriptuserNTID.js file:

Here is WebService.asmx/HelloWorld:

View 1 Replies View Related

Simple Service Connection - Send An Xml Document To The Service ?

Dec 5, 2009

I'm trying to write a simple javascript and am having some difficulties. The purpose of the script is to send an xml document to the service. The response is not important.

I'm getting this error: "HTTP Is Not Defined"

Code:

View 4 Replies View Related

JQuery :: Ajax Call - 403 Forbidden If URL In Content

Oct 15, 2010

Strange behaviour: User enters text into textarea - text includes URL with protocol e.g. [URL]. JSON call fails with 403 forbidden. It seems the the serialised content is being interpreted as a cross domain call (my guess). Any other text works - Even if the user enters "http://www.u", but as soon as the input qualifies as a url, I get a 403.

The code extract:
var formText = $("#contributioncontrol").serialize();
$.getJSON('[URL]',formText, function(response) {
if (response.ERROR != true) {
var output = response.HTML;
$(output).hide().prependTo("#results").fadeIn("slow");}
}

If the user enters http://www.url.com in the textarea on the form then The request looks like this: [URL]. The '/' chars in the line above are replaced by% 3 A % 2 F % 2 F (without spaces - Don't know how to stop browser interpreting the encoded stuff).

And the response like this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /API/createcontribution.php on this server.</p>
<p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.mysite.com Port 80</address>
</body></html>

View 1 Replies View Related

JQuery :: Json String Message Forbidden Chars?

Jan 30, 2011

I am sending a string to my server from my javascript program by:

function sendContext(){
try {
$.ajax({
type: "POST",
url: "http://localhost:50563/Myserver.svc/ReceiveInfo",
data: jsonContext,

[Code]...

View 2 Replies View Related

JQuery :: Calling A Function ... $('submit").click(ClickGeocode) Versus Simply Calling ClickGeocode(credentials)

Jul 17, 2011

I have a form button with id="submit". When pressed, ClickGeocode(credentials) is called. This works fine and dandy with: $('submit").click(ClickGeocode) Despite there being no indication that the function takes an argument 'credentials'. So when I want to call the function at some point in my code, I should be able to do something like ClickGeocode(credentials) ... no? However, my issue is that credentials isn't once defined in my code - it is part of Bing Maps function... like so:

function ClickGeocode(credentials)
{
map.getCredentials(MakeGeocodeRequest);
}

So why does it work using .click(), and how can I call the function without user interaction (simply somewhere in my code) even if 'credentials' is not defined?

View 1 Replies View Related

Call Web Service Using Script?

May 3, 2010

I have a web service at this url [url]..

i use hotel search file with HotelSearch method and method will retrieve xml file contains the matched data.

the varialbe that i made post with it is named : HotelData

the data of the variable is a string file that contains an xml data like this[code]...

View 1 Replies View Related

Restart A Specific Service?

Sep 10, 2010

I was wondering if its possible to have javascript stop a service on my machine for instance terminal services and then start it again..

View 7 Replies View Related

Get Response From A Web Service In JSON?

Nov 17, 2011

I want to access a web service and get the response in json using javascript. The web services can respond in json and gives me a table of records with a specific campus. I input the campus code in the text box and create the url. Now, I want to get the response in json and I'm really stuck.

<FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
<INPUT TYPE="text" NAME="inputbox" VALUE=""><P>
<INPUT TYPE="button" NAME="button" Value="Click" onClick="loadurl(this.form)">
</FORM>

[Code]....

From the information search process: I know I have to change the HTTP Header accept and use application/json and probably use JSONRequest.get()

View 1 Replies View Related

JScript Ad SERVICE Broken?

Jan 14, 2010

Code attached, the bb code dosen't let my code post.

View 2 Replies View Related

Consume Web Service And Use XPath

Jan 28, 2010

How to consume web service in javascript...The output of the webservice is another XML file. I am new to XPath. how to use XPath to get the data out from the web service output, and show it in a simple table with 3 columns...

Here is the output from the web service:

Code:

View 4 Replies View Related

Geolocation Service That Does Not Require An API-key?

Feb 12, 2010

I'm playing with a greasemonkey script and would like to provide geo-locating. The geolocation services I've found all require dev/api-key. A dev-key means I reveal my well-earned key, or an api-key usually means a server address... there would be none via a greasemonkey script.

View 6 Replies View Related

JQuery :: Call Web Service With Ajax

Mar 16, 2011

I wrote the following code with Dreamweaver:

If I run it in Dreamweaver It works and the alert success is raised, but If I run this code into Safari or Chrome the Error alert is always raised.

View 1 Replies View Related

JQuery :: Consuming Axis Web Service?

Oct 17, 2011

I deployed a WS using axis, and I want to find the easiest / best way to call it using jquery...

[Code]...

View 1 Replies View Related

JQuery :: Return A Value From A Web Service To A Variable?

Jan 9, 2011

I can update a $("#SomeElement") from a webservice, that's easy. However if my code is as follows:

<script>
var javascriptVariable="";
$.ajax({ type:

[code]....

View 2 Replies View Related

Use A PUT Request To Upload A File To A Service?

Mar 28, 2011

I'm trying to figure out the best way to use a PUT request to upload a file to a service. I've done some research on doing this with regular javascript and jquery.

I see that jQuery has support for PUT in the $.ajax method

The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.

However, I'm worried about the mention of browser compatibility. Does anyone know exactly what browsers do not support the PUT type for this $.ajax function? Its important that it work in IE6-9.

View 2 Replies View Related

Enable Printer Service Through Javascript

Nov 14, 2006

while login i am getting username & password.

if it is correct then i want to enable printer service.

my system having printer connection. how to disable this & enable this

through code. i didn't any way in php.

Is it possible in javascript?

View 9 Replies View Related

Checkbox Validation For Terms And Service

Dec 15, 2006

I'm working on a Ruby on Rails web app and I'm trying to add a quick and dirty client-side Javascript validation, to ensure that users click a checkbox agreeing to our Ts and Cs, before clicking the "Register" button submits their info.

I'll post the generated HTML, rather than the Rails stuff.

This is the button that shouldn't submit the form until the checkbox has been clicked:

<input name="commit" onClick="return check_agreed()" type="submit" value="Complete Registration" /> or <a href="/">Cancel</a>

First off, to confirm that the onClick actually checks check_agreed(), I kept check_agreed() simple, just popping up an alert then returning false.

<script language="JavaScript">
function check_agreed()
{
alert("check_agreed checked");
return false;
}
</script>

This seems to work fine - the alert pops up and nothing is submitted. I have a checkbox:

<input type="checkbox" name="terms_agreed">

I'd like this to be checked before the form can be submitted, so I've altered check_agreed() and added some debugging alerts.

function check_agreed()
{
alert("in check_agreed");

if(terms_agreed == checked)
{
alert("checked");
return true;
}
alert("Please agree to the Terms and Conditions");
return false;
}

So now the first alert, "in check_agreed" pops up, but then the form is submitted, with neither "checked" nor "Please agree..." popping up. This happens regardless of whether the checkbox has been clicked.


I'm sure I'm doing something wrong - it seems to be to do with referring to the checkbox. Should I be giving the checkbox's complete path, rather than referring to it by its name? I've tried to work out the correct path according to the DOM, but it still does the same thing.

View 4 Replies View Related

AJAX :: Consume Delphi Web Service?

May 13, 2010

I have a delphi web server with delphi web services,and my client side web application in javascript, how to consume my delphi web servies in javascript,

View 1 Replies View Related

JQuery :: $.ajax To Call A Wsdl Web Service

Aug 5, 2009

I have just started using jQuery, and I'm Lovin it. I am currently struck at using .ajx to call a wsdl webservice. I was successful in using $.ajax to call all my wss web services, they just worked great. Now when i'm trying to call a Axis2 web service (complex return xml types), its not working.

View 1 Replies View Related

JQuery :: Sending XML To Web Service Cross Domain?

May 19, 2010

I need to send XML / XML string to a web service cross domain.I have a JavaScript function that creates the XML by selecting the fields on the page and formatting the values into the required XML document. The HTML page is running on the users local machine but need to send the XML to a public secure (SSL) web service (ASMX) that has one argument of type string.I have tried to come up with a solution and the only one that is currently working is JSONP with GET. But this results in the data being send as part of the query string and is in clear view, thus beingintercept-able.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved