Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a pdf printout screen in crm system and I get this error when I press the button

C#
Server Error in '/' Application.

This program is blocked by group policy. For more information, contact your system administrator

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ComponentModel.Win32Exception: This program is blocked by group policy. For more information, contact your system administrator

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[Win32Exception (0x80004005): This program is blocked by group policy. For more information, contact your system administrator]
   System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) +1889
   System.Diagnostics.Process.Start() +119
   Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches, String html) +454
   Rotativa.WkhtmltopdfDriver.ConvertHtml(String wkhtmltopdfPath, String switches, String html) +51
   Rotativa.ViewAsPdf.CallTheDriver(ControllerContext context) +1312
   Rotativa.AsPdfResultBase.BuildPdf(ControllerContext context) +250
   Rotativa.AsPdfResultBase.ExecuteResult(ControllerContext context) +66
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +173
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9873701
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159


What I have tried:

I tried opening the pdf screen in the new tab. I tried to open the pdf file by opening it again.
Posted
Updated 6-Nov-18 21:56pm

1 solution

Read the error message, it's pretty clear.
Quote:
This program is blocked by group policy. For more information, contact your system administrator
Heck, it even tells you what to do!

You are trying to run an application that the group policy your hosting service (or company, we don't know) has forbidden. You can't do anything about that other than try to do the task a different way using a different app(or no app at all), or get the application approved by the administrator.
We can't do any of that for you!
 
Share this answer
 
Comments
[no name] 7-Nov-18 4:09am    
but I met with the hosting company. in this case there is no help we can do. The code side says things you need to fix. The page I was trying to create PDF was already working. Suddenly he stopped working.
OriginalGriff 7-Nov-18 4:15am    
Then you need to talk to them again, or find a different way to generate your PDF files.
We really can't do that for you!
MadMyche 7-Nov-18 8:07am    
You have only provided an exception, no "code side". I would isolate the actual line of code that generated the message, try to find out what application it is calling, and talk to the next level of support at the hosting company.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900