Hey guys,
I have a limited understanding of ArcGIS Server and Flex Viewer but am making it work. I had everything set up on our new server somewhat working fine. We had someone remote into the new box to set up some other stuff (contractor no longer working for us) and now things seem to have stopped working.
For starts, when i try to open the Server manager I get this error instead
Sorry... http://gisserver/ArcGIS/Manager/login.aspx?ReturnUrl=/ArcGIS/Manager/default.aspx,
Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\Windows\TEMP\2bwqydb-.0.cs' could not be found error CS2008: No inputs specified
For more details, check the Windows Event Log (Application Log) on the web server.
My googling led me to believe this was an ASP issue. I have ASP installed, I tried using aspnet_regiss and registered NETWORK SERVICE, ARCGISSOC, etc still to no avail. Any idea what is causing this? They all have write/read permissions on C:\Windows\Temp as well...
Thanks. This is the error from event viewer
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/14/2014 9:16:16 AM
Event time (UTC): 7/14/2014 4:16:16 PM
Event ID: 113ef26e224447729583e929bf8b482a
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/ArcGIS/rest-1-130498281756414476
Trust level: Full
Application Virtual Path: /ArcGIS/rest
Application Path: C:\inetpub\wwwroot\ArcGIS\rest\
Machine name: gisserver
Process information:
Process ID: 4408
Process name: w3wp.exe
Account name: IIS APPPOOL\ArcGISServicesAppPool
Exception information:
Exception type: InvalidOperationException
Exception message: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\Windows\TEMP\bgzuj9lf.0.cs' could not be found
error CS2008: No inputs specified
Request information:
Request URL: http://gisserver/ArcGIS/rest
Request path: /ArcGIS/rest
User host address: 192.168.0.39
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\ArcGISServicesAppPool
Thread information:
Thread ID: 6
Thread account name: IIS APPPOOL\ArcGISServicesAppPool
Is impersonating: False
Stack trace: at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at ESRI.ArcGIS.REST.RestConfig.LoadRestConfig(String fileName)
at ESRI.ArcGIS.REST.RestConfig.GetCurrentConfig(HttpContext context)
at ESRI.ArcGIS.REST.RestAppConfig..ctor(HttpContext context)
at ESRI.ArcGIS.REST.RestUtils.GetRestAppConfig(HttpContext context)
at ESRI.ArcGIS.REST.RestModule.System.Web.IHttpModule.Init(HttpApplication app)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Custom event details:
I did a bit of Googling and this could be your problem...
This problem occurs because the account that is associated with your web service's application pool in IIS does not have read/write permission to the C:\Windows\Temp
folder. I have no clue why the account needs access to this folder, but it does. From my casual observation it looks like it just writes an empty file with a random name to the Temp
folder.
To solve this problem browse to the C:\Windows
folder, and right-click on the Temp
folder. SelectProperties, and on the Security tab add the account associated with your web services application pool. Hit the OK button, go to IIS and recycle your application pool. This should fix your web service request.
It is worth noting that the circumstances around this error can be a bit deceptive. I've ran into this problem a couple times over 5 years. (I've forgotten about it each time.) The reason why it's not so noticeable is because you can publish a web service, successfully browse to the associated asmx
page and see the outline of your web service methods. Furthermore, your Visual Studio project can add a reference to the Web Service and Visual Studio will auto-generate all associated classes for the web service in your VS project.
This gives the impression that everything is working properly until you make your first request to execute a method on the web service. The web service will fail when it begins executing code because it wants access to the temp
directory. Again, I don't why it needs access to it, but it does if it's going to execute your code.
Further information regarding this bug can be found at the acknowledged bug report at Microsoft.com.
I found that here: From here: c# - Error: Unable to generate a temporary class (result=1) ... When Invoking Methods on a Web Servi...
Thanks I believe I did try this. DefaultAppPool seems to be the account associated with our web services application pool but I am still getting the error after recycling.