Update:
Another error message:
Server Error in '/PracticeWebservice1' Application.
--------------------------------------------------------------------------------
Cannot serialize member System.ComponentModel.MarshalByValueComponent.Site
of type System.ComponentModel.ISite because it is an interface.
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.NotSupportedException: Cannot serialize member
System.ComponentModel.MarshalByValueComponent.Site of type
System.ComponentModel.ISite because it is an interface.
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:
[NotSupportedException: Cannot serialize member
System.ComponentModel.MarshalByValueComponent.Site of type
System.ComponentModel.ISite because it is an interface.]
System.Xml.Serialization.TypeScope.ImportTypeDesc(Type type, Boolean
canBePrimitive, Boolean throwOnNoDefaultCtor, MemberInfo memberInfo)
System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo
source, Boolean throwOnDefaultCtor)
System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo
source)
System.Xml.Serialization.StructModel.GetPropertyModel(PropertyInfo
propertyInfo)
System.Xml.Serialization.StructModel.GetFieldModel(MemberInfo memberInfo)
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, XmlSchemaForm form)
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, XmlSchemaForm form)
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel
model, String ns, ImportContext context, String dataType, XmlSchemaForm form,
Boolean repeats)
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel
model, String ns, ImportContext context, String dataType)
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping
accessor, FieldModel model, XmlAttributes a, String ns, XmlSchemaForm form,
Type choiceIdentifierType)
System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember
xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers)
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement)
[InvalidOperationException: There was an error reflecting
'GetAllProductsResult'.]
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement)
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String
elementName, String ns, XmlReflectionMember[] members, Boolean
hasWrapperElement)
System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter
xmlImporter, SoapReflectionImporter soapImporter, Boolean
serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle
paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault,
XmlReflectionMember[] members, Boolean validate)
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs)
[InvalidOperationException: Method ShopService.GetAllProducts can not be
reflected.]
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs)
System.Web.Services.Description.SoapProtocolReflector.ReflectMethod()
System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding)
System.Web.Services.Description.ProtocolReflector.Reflect()
System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type
type, String url)
System.Web.Services.Protocols.DocumentationServerType..ctor(Type type,
String uri)
System.Web.Services.Protocols.DocumentationServerProtocol.Initialize()
System.Web.Services.Protocols.ServerProtocol.SetContext(Type type,
HttpContext context, HttpRequest request, HttpResponse response)
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
[InvalidOperationException: Unable to handle request.]
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response)
[InvalidOperationException: Failed to handle request.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response)
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext
context, String verb, String url, String filePath)
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
System.Web.MapHandlerExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET
Version:1.0.3705.0
How to fixed this?
Thanks.
den2005
--
MCP Year 2005, Philippines
den 2005 said:
Hi,
I have problem testing my web service and which I would set a reference
to a web application. I am using a Domain account, VS .Net 2002, and C#. When
I typed the address: localhost\PracticeWebservice1\ShopService.asmx this is
error:
Server Error in '/PracticeWebservice1' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Could not load type 'PracticeWebservice1.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs"
Inherits="PracticeWebservice1.Global" %>
Source File: c:\inetpub\wwwroot\PracticeWebservice1\global.asax Line: 1
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET
Version:1.0.3705.0
What is needed to be done to solved this? Thanks in advanced.
den2005