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?
> 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