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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0PortalController.GetCurrentPortalSettings returns null when used in web service after update to 4.8PortalController.GetCurrentPortalSettings returns null when used in web service after update to 4.8
Previous
 
Next
New Post
1/18/2008 5:07 PM
 

Dear all,

 

I have been running my site on dotnetnuke for some time now. I made a lot of desktop development and I have developped several User control using Ajax and web services. I have migrated my site to 4.8 and since I cannot access the portal settings located in the current context from my asmx page... The web service is called from Javascript to fill up some drop down? Any idea where that come come from?

 

Thanks for your help.

 

Alexandre

 
New Post
1/19/2008 10:45 AM
 

Do you have a code example that you can post?



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
2/12/2008 10:33 AM
 

I'm having the same problem.  I'm working on a desktop application that needs to integrate with DNN, therefore I've created web services to access it.  It's been working fine... up until 4.8.

The problem is in UrlRewriteModule.vb at line 306

If Request.Url.LocalPath.ToLower.EndsWith(".aspx") = False _
    AndAlso Request.Url.LocalPath.ToLower.EndsWith(".asmx") = False _
    AndAlso Request.Url.LocalPath.ToLower.EndsWith(".ashx") = False Then
    Exit Sub
End If

 

 The problem with this code is that when a web service method gets called it get called in the form of

http://domaind/file.asmx/MethodName

Note: there is no query parameter and the URL.LocalPath does not end with ".asmx" so the URL Rewrite routine aborts prior to the rewrite happening and prior to the portal ID etc getting stuffed into the Context object that the GetCurrentPortalSettings pulls the information from.

I had thought that I'd just fix my code so that it does not depend on this method.  But, there are too many other core methods that I'm using that require the object returned from this method.  So, I'm stuck either 1) Not using 4.8 (blah!) or 2) fixing the code so that it either does not check for asmx OR so that it uses Contains instead of ends with.  I'll probaby go with the later.

Hope this finds it's way to bug fixes.

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0PortalController.GetCurrentPortalSettings returns null when used in web service after update to 4.8PortalController.GetCurrentPortalSettings returns null when used in web service after update to 4.8


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