Could not load type error for any webservice on ASP.NET 2.0 beta 2

M

mrkurt

I've built a few webservices locally that work just fine. Deployed
them to a server and I get the following exception. This exception
happens on even the most basic webmethod call. Hitting the webservice
without calling a webmethod brings up the WSDL and such as I would
expect, only when I make an actual call does this happen. Any ideas?

System.TypeLoadException: Could not load type
'System.Runtime.CompilerServices.RuntimeCompatibilityAttribute' from
assembly 'mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
at System.ModuleHandle.ResolveType(Int32 typeToken,
RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount,
RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken,
RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[]
methodInstantiationContext)
at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[]
genericTypeArguments, Type[] genericMethodArguments)
at
System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord
caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module
decoratedModule, MetadataToken decoratedToken, RuntimeType
attributeFilterType, Boolean mustBeInheritable, Object[] attributes,
IList derivedAttributes, RuntimeType& attributeType,
RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean&
isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(Module
decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount,
RuntimeType attributeFilterType, Boolean mustBeInheritable, IList
derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(Assembly
assembly, RuntimeType caType)
at System.Reflection.Assembly.GetCustomAttributes(Type
attributeType, Boolean inherit)
at
System.Xml.Serialization.TempAssembly.AssemblyAllowsPartialTrust(Assembly
a)
at
System.Xml.Serialization.TempAssembly.AssemblyAllowsPartialTrust(Assembly
a)
at
System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[]
xmlMappings, Type[] types, String defaultNamespace, Evidence evidence,
CompilerParameters 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.XmlReturn.GetInitializers(LogicalMethodInfo[]
methodInfos)
at
System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[]
methodInfos)
at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type
type, LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type
type, HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)
 
J

John Horst

I am assuming you developed the web services in 2.0. Make sure your
target server is running 2.0 as well.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top