我使用.net 3.5开发了一个应用程序,并将它作为.exe部署在具有相同环境的许多机器上.但是,在一台特定的机器上,我收到以下错误.堆栈跟踪:
有关调用实时(JIT)调试而不是此对话框的详细信息,请参阅此消息的结尾.
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\wz58eig4.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.GetSerializersFromCache(XmlMapping[] mappings, Type type)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at SSOClient..ctor()
at sc.tradesvc.SSOManager..ctor()
at …Run Code Online (Sandbox Code Playgroud) 我的任务是将数据发送到第三方Web服务,他们提供的测试服务已被证明可以与Java客户端一起使用,但是,它不在.Net中.
当我生成服务代理并实例化服务或序列化请求对象时,我收到以下错误:
Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type 'TestStarXML.wsStarService.VSOptionInclusiveSetType[]' to 'TestStarXML.wsStarService.VSOptionInclusiveSetType'
error CS0030: Cannot convert type 'TestStarXML.wsStarService.VSOptionConflictSetType[]' to 'TestStarXML.wsStarService.VSOptionConflictSetType'
error CS0030: Cannot convert type 'TestStarXML.wsStarService.ColorRequirementSetType[]' to 'TestStarXML.wsStarService.ColorRequirementSetType'
error CS0030: Cannot convert type 'TestStarXML.wsStarService.ColorExclusionSetType[]' to 'TestStarXML.wsStarService.ColorExclusionSetType'
error CS0029: Cannot implicitly convert type 'TestStarXML.wsStarService.VSOptionInclusiveSetType' to 'TestStarXML.wsStarService.VSOptionInclusiveSetType[]'
error CS0029: Cannot implicitly convert type 'TestStarXML.wsStarService.VSOptionConflictSetType' to 'TestStarXML.wsStarService.VSOptionConflictSetType[]'
error CS0029: Cannot implicitly convert type 'TestStarXML.wsStarService.ColorRequirementSetType' to 'TestStarXML.wsStarService.ColorRequirementSetType[]'
error CS0029: Cannot implicitly convert type 'TestStarXML.wsStarService.ColorExclusionSetType' to 'TestStarXML.wsStarService.ColorExclusionSetType[]'
Run Code Online (Sandbox Code Playgroud)
向我们发送此服务的第三方使用Java,他们从测试服务生成服务代理没有问题.到目前为止,我的理解是.Net(见此处)中存在一个错误,为WSDL文件生成XSD. …
我正在尝试在我的.NET Web应用程序中实例化一个Web服务.但是一旦遇到这条线:
registerService register = new registerService();
Run Code Online (Sandbox Code Playgroud)
然后我收到以下错误:
无法生成临时类(result = 1).错误CS0030:无法将类型'Test.Website.ProxyTest.registerType []'转换为'Test.Website.ProxyTest.registerType'
我没有写网络服务.但这是否意味着Web服务在某处出现错误(在XSD或其他什么地方)?
这是否意味着第三方开发人员需要修复此Web服务?
我根据Taleo Enterprise - Taleo Web Services - 用户指南中的说明,在Visual Studio中向Taleo Find Service添加了一个Web服务引用
但VS.NET不正确地为某些实体创建了二维数组.例如:
private AddressBookHistory[][] addressBookHistoryField;
Run Code Online (Sandbox Code Playgroud)
此外,生成的Requisition类具有ContestNumber属性,该属性被错误地创建为数组:
[System.Xml.Serialization.XmlElementAttribute("ContestNumber")]
public string[] ContestNumber {
get {
return this.contestNumberField;
}
set {
this.contestNumberField = value;
}
}
Run Code Online (Sandbox Code Playgroud)
这里已经在网上讨论了类似的问题:
无法生成临时类(result = 1).错误CS0030:无法将类型'Type []'转换为'Type'?
https://support.microsoft.com/en-us/kb/2486643
我用[]替换了[] [],我可以调用查找服务.TaleoFindService.Entities pagedResults = findService.findPartialEntities(mappingVersion,sqxmlquery,attrs);
但是现在pagedResults.Entity属性为null.但是,正确填充了其他属性,例如entityCount和pageCount.