Archive for April, 2005

How to apply an XSL Transform to a string containing XML data and output the result to a string in memory

I’ve been hit recently with a question: I have a string that holds XML data and I have a stylesheet on disk and I want to apply that stylesheet to that string and get the result in memory. I.e. I do not want to save the output to disk. My first suggestion (the lazy one [...]

Continue reading » No comments

Redirected URL for a 401.2 unauthorized access in ASP.NET using Global.asax

Pure Evil. Using custom errors allows us to handle errors and redirect to a proper error page. You can try code like this in your web.config <customErrors defaultRedirect=”"url”" mode=”"On|Off|RemoteOnly”">    <error statusCode=”"404″” redirect=”"error.aspx?errorcode=404″”/>    <error statusCode=”"500″” redirect=”"error.aspx?errorcode=500″”/> customErrors> This is used in conjunction the authorization tag in your web.config <authorization>    <allow users=”"ARIANNE5\Ash Moollan”" /> [...]

Continue reading » 6 Comments