How to solve a Citrix: Internal Error: The Web site is experiencing technical difficulties. We apologize for any inconvenience.

Few months back I experienced an issue with Citrix and it’s secure Gateway. I got the message.
Internal Error
The Web site is experiencing technical difficulties. We apologize for any inconvenience.
The internal error may only be temporary. Try reconnecting and, if the problem persists, contact your system administrator.
When I looked in the eventviewer of the server I saw the following Warning / Message.

Event Type: Warning
Event Source:     ASP.NET 2.0.50727.0
Event Category:   Web Event
Event ID:   1309
Date:       27-10-2010
Time:       9:00:25
User:       N/A
Computer:   Computername
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 27-10-2010 9:00:25
Event time (UTC): 27-10-2010 7:00:25
Event ID: 0e6d4a7b129646d990282e7a4843feb5
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
  Application domain: /LM/W3SVC/1/ROOT/Citrix/PNAgent-229-129326364256377331
  Trust level:
  Application Virtual Path: /Citrix/PNAgent
  Application Path: c:\inetpub\wwwroot\Citrix\PNAgent\
  Machine name: Computername
Process information:
  Process ID: 8712
  Process name: w3wp.exe
  Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
  Exception type: HttpException
  Exception message: The current identity (NT AUTHORITY\NETWORK SERVICE) does not
  have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
Request information:
  Request URL: http://computername/Citrix/PNAgent/config.xml
  Request path: /Citrix/PNAgent/config.xml
  User host address: <ip address >
  User: 
  Is authenticated: False
  Authentication Type: 
  Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
  Thread ID: 12
  Thread account name: NT AUTHORITY\NETWORK SERVICE
  Is impersonating: False  
  Stack trace: at System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection)
  at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)
Custom event details:
For more information, see Help and Support Center at  http://go.microsoft.com/fwlink/events.asp.

The Solution to solve this issue. You have to do the following steps.

1. Start the command prompt but run it as administrator
2. Use the following command:
CACLS "%windir%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" /E /T /G "NT AUTHORITY\NETWORK SERVICE:C"

When the command finished it run you have seen a set of changes. After this you will be able again to use the Secure gateway web page.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.