Hi everyone
Since our hosting-provider changed the security from full- to medium-trust we are experiencing some problems saving Files to PDF. We get the following error.
I already uploaded all neccessary TTF to the server and set the font-folder like this:
Aspose.Words.Fonts.FontSettings.SetFontsFolder("d:\client\public_html\upload\templates\fonts", False)
I’m looking forward to any Help I can get!
Server Error in ‘/’ Application.
Security Exception
*Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.
Source Error:*
Source File: d:\client\public_html\test\test.aspx.vb Line: 33
Stack Trace:*
[SecurityException: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
System.Environment.GetEnvironmentVariable(String variable) +66
xf9a9481c3f63a419.xed747ca236d86aa0.x0f5d18019ab06bc5() +13
xc23bef7190ca8f55.x9d888f53892d94df.x4a486311b726a005() +29
xc23bef7190ca8f55.x9d888f53892d94df.x34ef7a0ea5d7fab4() +156
xc23bef7190ca8f55.x9d888f53892d94df.get_x2445f4cefb3cff80() +75
xc23bef7190ca8f55.x9d888f53892d94df.xdc2247c8d4648ae8(String xa79a9f649c74f4a4, FontStyle x44ecfea61c937b8e) +11
xc23bef7190ca8f55.x26ee10d60756aeab.xdc2247c8d4648ae8(String xa79a9f649c74f4a4, FontStyle x44ecfea61c937b8e) +44
xc23bef7190ca8f55.x29ade4ed2382a039.xe42a11aae6b85740(String xa79a9f649c74f4a4, FontStyle x44ecfea61c937b8e, String x050683ee5a5f962b) +17
x59d6a4fc5007b7a4.xacc55eb1e4595209.xfeeb3de36742543a(x1d1dd20018fcde10 x26094932cf7a9139, x000f21cbda739311 x6f02b6a80bf6b36f) +76
x59d6a4fc5007b7a4.xbfac429e165a6a0d.xee5277c7de5be8e4(Char x3c4da2980d043c95) +46
x59d6a4fc5007b7a4.xbfac429e165a6a0d.x47f176deff0d42e2() +51
x59d6a4fc5007b7a4.x4f38812d0d5e7231.x4fb8d507f4b3c96e(Font x0078185e1040c523, String xb41faee6912a2313, x000f21cbda739311 xcb075c7088c3b520) +674
xf989f31a236ff98c.x08802e9e984cd3ee.CallHandlerDoText(Font font, String text, x000f21cbda739311 characterCategory) +20
xf989f31a236ff98c.x08802e9e984cd3ee.xc325f08e9c7ac384() +42
xf989f31a236ff98c.x08802e9e984cd3ee.xd22cb714335f8d2c(String xb41faee6912a2313, Font x26094932cf7a9139) +500
x59d6a4fc5007b7a4.x4f38812d0d5e7231…ctor(String text, x1d1dd20018fcde10 font, xacc55eb1e4595209 converter) +340
x59d6a4fc5007b7a4.x42f2a218ce59dafb.xbd6559e9bd341cd6(Inline xda5bf54deb817e37, Int32 x10aaa7cdfa38f254, Int32 x961016a387451f05) +197
x59d6a4fc5007b7a4.x487cdc969fefe3d6.x4e33137198fdb9ca(Boolean xcd31b50c43a96e21) +63
x59d6a4fc5007b7a4.x487cdc969fefe3d6.x47f176deff0d42e2() +525
x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98(Document x3664041d21d73fdc, xdeb77ea37ad74c56 xdfde339da46db651) +317
Aspose.Words.Document.UpdatePageLayout() +24
Aspose.Words.Document.x410db0f4a89a6ef1(Boolean x24af0daafcd8fb8c) +29
xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553(x8556eed81191af11 x5ac1382edb7bf2c2) +96
Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c) +125
Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions) +150
Aspose.Words.Document.Save(String fileName, SaveFormat saveFormat) +28
test_test.Page_Load(Object sender, EventArgs e) in d:\client\public_html\test\test.aspx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.test_test_aspx.ProcessRequest(HttpContext context) +37
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Version Information: Microsoft .NET Framework Version:2.0.50727.3655; ASP.NET
Version:2.0.50727.3658