views:

104

answers:

1

So I run this Windows Server 2008 security update and this code block is now throwing an error:

using(MemoryStream ms = new MemoryStream())
{
    xslt.Transform(navigableSet, xslArgs, ms);
    ms.Position = 0;
    ret = new XPathDocument(ms);
}
return ret;

The error is EXCEPTION [System]: The remote server returned an error: (503) Server Unavailable. I assume that this is Windows Server 2008 making shared memory super-secure. This means that I'll need to obtain IO permissions---right?

A: 

Sadly, this my solution:

using(MemoryStream ms = new MemoryStream())
{
    XmlReader reader = XmlReader.Create(new StringReader(SomeXmlString));
    XmlWriter writer = XmlWriter.Create(ms);
    xslt.Transform(reader, xslArgs, writer, null); //Passing null here prevents resolving...
    ms.Position = 0;
    ret = new XPathDocument(ms);
}

Rasmus Faber had a similar problem about a year ago. My apologies for wasting time! I could just fiddle with Windows Server 2008 Firewall stuff to open up whatever closed but my code needs to be more explicit about making such calls in the first place!

rasx
You can mark this question as answered. Regards,
Lex Li
I'll have to wait until tomorrow to accept my own answer...
rasx