Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XMLHTTP.send throws "Operation aborted" exception

359 views
Skip to first unread message

adrianl

unread,
Jun 25, 2010, 9:02:36 PM6/25/10
to
Hello,

I'm experiencing a problem running the following Javascript code when the
URL is pointing to an IIS 7.0 server:

var url = "http://iis7srv/TestWeb/test.txt";

var x = new ActiveXObject("Msxml2.XMLHTTP.6.0");
x.open("PUT", url, false, "", "");

x.setRequestHeader( "Content-Type", "text/plain" );

var b = "Testing!";
x.send(b);

What I've found is that if I run this and the test.txt file doesn't
currently exist, then the code succeeds; IIS returns a "201" status code and
creates the test.txt file. But when I run it when the file does exist, the
PUT appears to succeed (the last modified timestamp of test.txt updates, and
IIS returns "204"), but "send" throws an exception ("Operation aborted.").

Note that this problem does not happen when the URL is pointing to an IIS
6.0 machine.

I have a feeling I have missed something very obvious. I've searched for
others having this problem and found nothing. Can anyone offer any advice?

joey

unread,
Aug 12, 2010, 11:25:03 AM8/12/10
to
I met exactly the same problem. what's the solution then?

Vijay anand

unread,
Nov 23, 2010, 8:59:25 AM11/23/10
to
Have you identified the problem??? I'm facing the same problem

> On Friday, June 25, 2010 9:02 PM adrianl wrote:

> Hello,
>
> I am experiencing a problem running the following Javascript code when the


> URL is pointing to an IIS 7.0 server:
>
> var url = "http://iis7srv/TestWeb/test.txt";
>
> var x = new ActiveXObject("Msxml2.XMLHTTP.6.0");
> x.open("PUT", url, false, "", "");
>
> x.setRequestHeader( "Content-Type", "text/plain" );
>
> var b = "Testing!";
> x.send(b);
>

> What I have found is that if I run this and the test.txt file does not


> currently exist, then the code succeeds; IIS returns a "201" status code and
> creates the test.txt file. But when I run it when the file does exist, the
> PUT appears to succeed (the last modified timestamp of test.txt updates, and
> IIS returns "204"), but "send" throws an exception ("Operation aborted.").
>
> Note that this problem does not happen when the URL is pointing to an IIS
> 6.0 machine.
>

> I have a feeling I have missed something very obvious. I have searched for


> others having this problem and found nothing. Can anyone offer any advice?


>> On Thursday, August 12, 2010 11:25 AM joey wrote:

>> I met exactly the same problem. what is the solution then?
>>
>> "adrianl" wrote:


>> Submitted via EggHeadCafe
>> Using DataList to List Category/Subcategory with expand - collapse facility via javascript
>> http://www.eggheadcafe.com/tutorials/aspnet/6b6d6022-60f6-4d05-beaf-7737a1f26987/using-datalist-to-list-categorysubcategory-with-expand--collapse-facility-via-javascript.aspx

0 new messages