我在服务器上使用Web服务,它运行正常。现在我想将我的站点转移到Azure服务器。现在我在azure上创建了一个免费的网站来测试它。
这是一个Silverlight应用程序,它调用服务来创建报告。
当我调用此服务时出现以下错误
错误:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.GetHdc()
at C1.Util.FontSubSet.#e.#cA.#Kn(FontSubSet owner, String tableName)
at C1.Util.FontSubSet.GetFontTableStream(String name)
at C1.Util.FontSubSet.#TDd()
at C1.Util.FontSubSet.Init()
at C1.Util.FontSubSet.GetFontSubSet(FontKey fk)
at C1.C1Preview.C1PrintDocument.#ydd(String s, String fontName, Boolean fontBold, Boolean fontItalic, Boolean updateDocumentFonts)
at C1.C1Preview.C1PrintDocument.#zdd(String s, String fontName, Byte fontCharSet, FontStyle fontStyle)
at C1.C1Preview.RenderText.InternalResolvingFinished()
at C1.C1Preview.RenderObject.ResolvingFinished()
at C1.C1Report.Layout.RenderDirect(ILengthCacheProvider lcp, RenderObject ro, RenderFragment rf, Double x, Double y, Double width, Double height)
at C1.C1Report.Layout.RenderDirect(ILengthCacheProvider lcp, RenderObject ro, RenderFragment rf, RectangleD bounds)
at C1.C1Report.Field.#RLd(ExportFilter export, Layout layout, RectangleD bounds, String str, Boolean rtf, Double lineWidthTw, Int32 firstCharIndex, Int32 length)
at C1.C1Report.Field.Render(Layout layout, Double x, Double y, Boolean measure)
at C1.C1Report.Field.Render(Layout layout, Double x, Double y)
at C1.C1Report.Section.Render(Boolean keepPage, Group ownerGroup)
at C1.C1Report.Layout.#fMd(Section s)
at C1.C1Report.Layout.StartDoc()
at C1.C1Report.C1Report.RenderFirstPass(Boolean releaseDocument)
at C1.C1Report.C1Report.#fNd()
at C1.C1Report.C1Report.#dNd(ExportFilter filter, Boolean reuse)
at C1.C1Report.C1Report.RenderToStream(Stream stream, FileFormatEnum fmt, String idPrefix, String fileName)
at C1.C1Report.C1Report.RenderToStream(Stream stream, FileFormatEnum fmt)
at Gestion1.Web.RapportS.GetReportCommunique()
--- End of inner exception stack trace ---</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope> `
答案 0 :(得分:0)
根据提供的堆栈跟踪,您似乎正在尝试从服务器上的ComponentOne运行报表工具。
出于安全性和性能原因,访问受Azure网站实例限制使用的API会导致此问题。本机GDI呈现方法属于这些受限制的API。
在this post结束时查看Jim Cheshire的帖子。
除非放宽这些限制(可能不是这些限制),否则您的选择是将服务移至Cloud Service实例,或移至另一个不使用本机GDI方法呈现的组件。