public void WriteToContextAndFlush(IContextResponse response) { response.Clear(); if (Charset != null) { //"windows-1252"; response.Charset = Charset; } response.BufferOutput = _bufferOutput; response.Write(Response); response.End(); }
public void WriteToContextAndFlush(IContextResponse response) { //Png can't stream directy. Going through a memorystream instead byte[] buffer; using (MemoryStream ms = new MemoryStream()) { Image.Save(ms, CodecInfo, null); Image.Dispose(); buffer = ms.ToArray(); } response.Clear(); response.ContentType = CodecInfo.MimeType; response.Write(buffer); response.End(); }
public virtual void WriteToContextAndFlush(IContextResponse response) { response.Clear(); response.ContentType = "text/xml"; response.Write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); response.Write( "<ServiceExceptionReport version=\"1.3.0\" xmlns=\"http://www.opengis.net/ogc\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd\">\n"); response.Write("<ServiceException"); if (ExceptionCode != WmsExceptionCode.NotApplicable) response.Write(" code=\"" + ExceptionCode + "\""); response.Write(">" + Message + "</ServiceException>\n"); response.Write("</ServiceExceptionReport>"); response.End(); }
public virtual void WriteToContextAndFlush(IContextResponse response) { response.Clear(); response.ContentType = "text/xml"; response.Write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); response.Write( "<ServiceExceptionReport version=\"1.3.0\" xmlns=\"http://www.opengis.net/ogc\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd\">\n"); response.Write("<ServiceException"); if (ExceptionCode != WmsExceptionCode.NotApplicable) { response.Write(" code=\"" + ExceptionCode + "\""); } response.Write(">" + Message + "</ServiceException>\n"); response.Write("</ServiceExceptionReport>"); response.End(); }