locked
ASP.Net Page using HttpServerUtility.Server.Execute and IIS 8.0 RRS feed

  • Question

  • User-275090789 posted

    If this is the wrong forum, I apologize.  This is a problem with an ASP.Net site, but it is related to the HttpServerUtility namespace so I thought I should start here.

    I have a web form that is populating a StringWriter using Server.Execute(string Path, System.IO.TextWriter writer).  It executes another webform that is then loaded into the StringWriter so I can export the page to a PDF using ABCPDF by WebSuperGoo. 

    I have the code working in development and test so I know it works.  My problem is with production.

    In all environments we run Windows Server 2012 and IIS 8.0.  Our site is impersonating our AD users.  The application pool is running as the ApplicationPoolIdentity.

    On production Server.Execute is returning an empty StringWriter object.  If we temporarily change the application pool identity to run as a server administrator, the code executes fine.  This led me to determine we are dealing with a permission problem.  I have spent nearly 40 hours scouring the web, changing permissions, changing settings to try and get this to work with no luck.

    Can someone please suggest where to look or what to try?  What permissions does Server.Execute need to successfully run?

    Kind Regards,

    B

     

    Thursday, May 21, 2015 4:09 PM

Answers

  • User-166373564 posted

    Hi,

    Welcome to asp.net forum.

    I have the code working in development and test so I know it works.  My problem is with production.

    From your description above, it's recommended to look into the log file in IIS 8.0, you need enable the failed Request Tracing in IIS, and check log files in C:\inetpub\logs\FailedReqLogFiles, this will give us some hint on why a request has failed.

    If we temporarily change the application pool identity to run as a server administrator, the code executes fine. 

    For every application pool you create, the Identity property of the new application pool is set to ApplicationPoolIdentity by default. The IIS Admin Process (WAS) will create a virtual account with the name of the new application pool and run the application pool's worker processes under this account by default.

    For this issue, it's also recommended to grant a User admin permission, and check whether it can fix it.

    In addition, it still has same issue, you can consult IIS experts in IIS forum, I think IIS experts can give more precise troubleshooting for you.

    With regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 26, 2015 2:13 AM