Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUpgrade to DNN 7.02 and my Webservices (ASMX) stops working?Upgrade to DNN 7.02 and my Webservices (ASMX) stops working?
Previous
 
Next
New Post
2/4/2013 7:32 PM
 

Background:

I have a production DNN 6.0x site running home grown modules I developed.  The modules utilize a LOT of jQuery that invokes, via AJAX, local web services.  This is working in production using IIS 7, .NET Framework 4.0, etc.

I downloaded my production site and stood up a similar environment on my development laptop that mirrors my production website with express purpose of testing the DNN 7.02 upgrade which I did perform.  Everything works except my web services.  

Here are snap shots of the code and exception.  Any help is appreciated.

 

This is not the actual webservice but a dummied up one which still yields the exception

A call to a generic AJAX handler

jQuery call to web service

The exception

 
New Post
2/5/2013 9:00 AM
 

Did you setup your webservices using the DNN Services Framework? I ask, because when I set those up yesterday, albeit in DNN 6.2.3, there was no ASMX involved. It's setup as a separate class object that responds to controller/action requests much like ASP.NET MVC

 
New Post
2/5/2013 12:05 PM
 

No, I didn't set the services up using the Framework.  haha!  At the time, it seemed an extra effort and far easier to go outside the framework.  I even googled up a few articles that confirmed people took that route.  But yah, when I read that DNN 7.0 was switching to MVC4/Web API I thought that might spell trouble for me with regard to the services I set up.  I haven't gone throught the source code yet but I'm sure that has something to do with it.

I will convert one of my services over to use the DNN framework for my 6.2.x site, confirm it works there, then test it in 7.0.2 and see if it works there too.  I'll report what happens on this thread just in case others are having this problem.

I guess this is what you get when you have a framework and work outside of it! :)

 
New Post
2/7/2013 11:29 AM
 

Update:

When I first started working on my production site several years ago, I didn't initially choose dnn but was writing a site from the ground up.  I chose to use Spring.net framework to help manage my objects, layers, some AOP, etc.  Then I reversed course and started implementing my existing logic into DNN 5.x site but kept Spring.net.  Well before finishing the site DNN 6.0 came out and I upgraded (in development) to that and kept coding which included the ASMX services I had already developed.  Then DNN 6.2.x came out with MVC Web Service support.  I looked into switching gears and going that route but decided not to since my services were already up and working.

Long/short the error is happening due to Spring.net and my attempt to get Dependcy Injection into my ASMX services.  I don't yet know why the Spring.net WebServiceExporter is wrapping my object with an incompatible proxy with regard to DNN 7.00.  In many ways I don't care I guess.  I've been toying around with using DNN Services to implement Web Services and may convert my ASMX files to it (who needs SOAP anyway?)  This is especially so since DNN has its own authentication and securtiy measures in place whereas I had to write my own for my ASMX services.

If I can get Spring to DI my business logic into the DNN Services I'll create, I'll definetely move in this direction which should position my site to be able to go to DNN 7 in the future...after I convert the DNN Services to WEB-API.

For those interested here is the full exception dump I was getting:

NotSupportedException: Cannot serialize interface System.ComponentModel.ISite.]
System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throw ) +5143354
System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +100
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +452

[InvalidOperationException: There was an error reflecting 'get_SiteResult'.]
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +5117302
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access) +289
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, Boolean openModel, String key, Boolean writeAccess) +175
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +3245

[InvalidOperationException: Method RenterWS.get_Site can not be reflected.]
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +1784908
System.Web.Services.Description.SoapProtocolReflector.ReflectMethod() +188
System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding) +1613
System.Web.Services.Description.ProtocolReflector.Reflect() +737
System.Web.Services.Description.ServiceDescriptionReflector.ReflectInternal(ProtocolReflector[] reflectors) +621
System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +148
System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri) +196
System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +322
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +160

[InvalidOperationException: Unable to handle request.]
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +818060
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +302

[InvalidOperationException: Failed to handle request.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +744088

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +640
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
Spring.Web.Services.WebServiceHandlerFactory.System.Web.IHttpHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) +632
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +89
Spring.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +730
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +490
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

 
New Post
3/18/2013 10:41 AM
 
For anyone interested, I've successfully converted my SOAP services over to work within the DNN services framework and managed to maintain integration with spring.net.

I also updated my development test bed to DNN 7.0.x and with some small effort made those new services still work in DNN 7.0.x AND still have complete spring.net integration.

If any interest, I will post code snippets on this site.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUpgrade to DNN 7.02 and my Webservices (ASMX) stops working?Upgrade to DNN 7.02 and my Webservices (ASMX) stops working?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out