Dienstag, 11. August 2009

System.InvalidOperationException: Unable to Generate a Temporary Class

Today I created a new web server for our sharepoint application. The following error message(s.u.) was shown in the browser. The problem was caused by the access privileges of the Temp folder used by account that is processing the Web service request. The web account hasn't access to the "C:\WINDOWS\TEMP" folder. I added the read/write access for the web user IIS_WPG to the "C:\WINDOWS\TEMP" folder and the web server works again.



Server Error in '/' Application.
--------------------------------------------------------------------------------

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\fib-upba.0.cs' could not be found
error CS2008: No inputs specified

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.FromMappings(XmlMapping[] mappings, Evidence evidence)
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
--- End of inner exception stack trace ---
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.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\fib-upba.0.cs' could not be found
error CS2008: No inputs specified

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.FromMappings(XmlMapping[] mappings, Evidence evidence)
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
--- End of inner exception stack trace ---

Montag, 10. August 2009

Sharepint Document Upload Problem for Zip File with less than 50MB size

Today I got an issue ticket from a customer that he got an error message:

Virus Found

"Toolkit.zip" contains the following virus: "Exceedingly compressed size; Tagged ID: 20726101_24E4_46C5_838B_94F2CD5A2F5D" .
This file cannot be saved to the document library. If you want to save this file to the document library, clean the file using alternative virus scanning software and try saving it again.




...


But the customer means that the file is 100% without virus and its file size is less than 50MB.

Our document library polics for allowed file size is 50MB, but the file is a zip file with less than 50MB. It seems it should pass the polics. The problem should be caused by scaning virus, because the zipped file is being unzipped during scaning. I upzipped the file and found the file size is 56MB, more than 50MB. I tried to upload another file with original file size 53MB and the zipped file size is 42MB andgot the same error information. Well, the problem is caused by the zip file size...

The upload allowed file size is unzipped file size...