0

On these lines of code:

// Run compiler
Process p = System.Diagnostics.Process.Start("java.exe", ex);
p.WaitForExit();

We get this error:

Server Error in '/' Application.

Unknown error (0xfffffffe)

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: Unknown error (0xfffffffe)

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): Unknown error (0xfffffffe)]
   System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +912
   System.Diagnostics.Process.Start() +136
   System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +49
   Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID) +333
   Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID) +1338
   ArcadeSubmit.submitGame(Object sender, EventArgs e) +1329
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

As noted in my other question it would appear this is a permissions error. However, this error disappears if I recycle my app pool. It then starts throwing this error again within a couple of hours or so.

The apppool in question is running with LocalService identity. Anyone know what would be causing this to break?

Edit: More details error from event viewer

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 2/29/2012 8:15:12 AM 
Event time (UTC): 2/29/2012 8:15:12 AM 
Event ID: 6b5770960c4f41b1a9ba10045b7b50d4 
Event sequence: 131746 
Event occurrence: 480 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT-26-129749512365140162 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\inetpub\wwwroot\Scirra\ 
    Machine name: WIN-MT04GJ7U5CB 
 
Process information: 
    Process ID: 8276 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\LOCAL SERVICE 
 
Exception information: 
    Exception type: Win32Exception 
    Exception message: Unknown error (0xfffffffe)
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID)
   at Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID)
   at ArcadeSubmit.submitGame(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 
 
Request information: 
    Request URL: http://www.scirra.com/ArcadeSubmit.aspx 
    Request path: /ArcadeSubmit.aspx 
    User host address: [censored] 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\LOCAL SERVICE 
 
Thread information: 
    Thread ID: 5 
    Thread account name: NT AUTHORITY\LOCAL SERVICE 
    Is impersonating: False 
    Stack trace:    at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID)
   at Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID)
   at ArcadeSubmit.submitGame(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details: 
Community
  • 1
  • 1
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
  • When you [previously asked this question](http://stackoverflow.com/questions/8236507/asp-net-c-sharp-unknown-error-0xfffffffe), I presume that answer didn't work? – Justin Helgerson Feb 28 '12 at 04:52
  • I like my title better than yours. – John Saunders Feb 28 '12 at 04:52
  • @Ek0nomik it did work, but since then we have moved to a new server which is behaving differently. It works for a while, then throws that error. On our old server it just worked fine. – Tom Gullen Feb 28 '12 at 04:59
  • Interesting. Are you kicking off the process with any parameters? Is the process making any requests elsewhere on your server where it may not have proper permission? Have you checked the EventLog to see if Windows Server has any security warnings? – Justin Helgerson Feb 28 '12 at 05:05
  • @Ek0nomik Yes, the params are `"-jar \"" + Settings.ClosureCompilerJarLocation + "\" --js \"" + C2runtimePath + "\" --js_output_file \"" + C2runtimeCompiledPath + "\" --language_in ECMASCRIPT5_STRICT --compilation_level ADVANCED_OPTIMIZATIONS --externs \"" + Settings.C2ExternsFolderLocation + "jquery-externs.js\" --externs \"" + Settings.C2ExternsFolderLocation + "c2-externs.js\"";`, it's running Google closure compiler. I got a more detailed error from the logs I've posted above – Tom Gullen Feb 29 '12 at 10:57
  • As far as I can tell permissions are all setup correctly (it does work OK for a couple of hours/a few requests before failing) – Tom Gullen Feb 29 '12 at 10:58
  • I've added `` to web.config, this might help? – Tom Gullen Feb 29 '12 at 11:01
  • Identity Impersonate makes the entire site unresponsive – Tom Gullen Feb 29 '12 at 11:07
  • @TomGullen - Out of curiosity, why are you running the closure compiler dynamically? Are you taking script input from a user? Anyway, I'm not sure what is causing your issue unfortunately. Impersonation would just result in your web application thread being run under a particular identity. You technically could setup the permissions for the default account and it would be a wash (but, if you do set it up for an account, you would want to execute aspnet_regiis to give the account proper permissions). – Justin Helgerson Feb 29 '12 at 15:34
  • @Ek0nomik we run an HTML5 arcade: http://www.scirra.com/arcade where people upload their own games made in our software, we run the uploaded JS through closure compiler. – Tom Gullen Feb 29 '12 at 16:34
  • I beleive it is fixed now by changing the apppool identity from "Local Service" to "Local System". I'll answer the question if it works – Tom Gullen Mar 02 '12 at 12:37

0 Answers0