1

我在服务器上使用 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. ---&gt; 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> `
4

1 回答 1

0

根据提供的堆栈跟踪,您似乎正在尝试从服务器上的 ComponentOne 运行报告工具。

该问题是由于出于安全和性能原因,对 Azure 网站实例限制使用的 API 的访问引起的。本机 GDI 呈现方法属于这些受限 API。

请参阅本文末尾的 Jim Cheshire 的帖子

除非这些限制被放宽(它们可能不会),否则您的选择是将服务移至云服务实例,或移至不使用本机 GDI 方法进行呈现的另一个组件。

于 2014-03-16T18:26:22.213 回答