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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationExternal Webservice using ValidateUser - caching errorExternal Webservice using ValidateUser - caching error
Previous
 
Next
New Post
2/7/2010 7:49 AM
 

I'm hosting a web service on a separate domain to my DNN installation. In the service I have added references to the DNN DB in web.config, as well as the DNN assemblies to the web service bin folder.

I don't want to use IWeb for this because it is a separate domain and is only a web service.

I'm testing my web service and it's hitting the DNN DB and I have a webmethod that verifies an account based on username/password/portalid:

DotNetNuke.Entities.Users.UserController.ValidateUser(portalId, userName, password, "", "", "", userLoginStatus)

This is all working except there seems to be some caching after the verification.

I get this message returned from my service:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Absolute path information is required.
   at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
   at System.Web.InternalSecurityPermissions.PathDiscovery(String path)
   at System.Web.Caching.CacheDependency.Init(Boolean isPublic, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart)
   at System.Web.Caching.CacheDependency..ctor(String filename, DateTime start)
   at System.Web.Caching.CacheDependency..ctor(String filename)
   at DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.Insert(String CacheKey, Object objObject, Boolean PersistAppRestart)
   at DotNetNuke.Common.Utilities.DataCache.SetCache(String CacheKey, Object objObject, Boolean PersistAppRestart)
   at DotNetNuke.Common.Utilities.DataCache.SetCache(String CacheKey, Object objObject)
   at DotNetNuke.Entities.Host.HostSettings.GetHostSettings()
   at DotNetNuke.Common.Globals.get_HostSettings()
   at DotNetNuke.Common.Globals.get_PerformanceSetting()
   at DotNetNuke.Entities.Profile.ProfileController.GetPropertyDefinitions(Int32 portalId)
   at DotNetNuke.Entities.Profile.ProfileController.GetPropertyDefinitionsByPortal(Int32 portalId, Boolean clone)
   at DotNetNuke.Security.Profile.DNNProfileProvider.GetUserProfile(UserInfo& user)
   at DotNetNuke.Entities.Profile.ProfileController.GetUserProfile(UserInfo& objUser)
   at DotNetNuke.Entities.Users.UserInfo.get_Profile()
   at DotNetNuke.Entities.Users.UserInfo.set_FirstName(String Value)
   at DotNetNuke.Security.Membership.AspNetMembershipProvider.FillUserInfo(Int32 portalId, IDataReader dr, Boolean isHydrated, Boolean CheckForOpenDataReader)
   at DotNetNuke.Security.Membership.AspNetMembershipProvider.GetUserByUserName(Int32 portalId, String username, Boolean isHydrated)
   at DotNetNuke.Security.Membership.AspNetMembershipProvider.UserLogin(Int32 portalId, String username, String password, String verificationCode, UserLoginStatus& loginStatus)
   at DotNetNuke.Entities.Users.UserController.ValidateUser(Int32 portalId, String Username, String Password, String VerificationCode, String PortalName, String IP, UserLoginStatus& loginStatus)

I have no idea how to get past this message, anyone help out?

All I'm trying to do is use the DNN API to allow an external application to check if a user exists or not.

thanks,

Steve


Steve White
 
New Post
2/7/2010 5:04 PM
 

Ignore this, I was hitting an older version of DNN (4.5.1). I just tried with 4.9.2 and it worked fine locally.


Steve White
 
New Post
2/19/2010 4:37 AM
 

BTW where did you find an advantage using the DNN API rather than just the membership class of AspNetSqlMembershipProvider (Membership.ValidateUser method) ?.

If (Membership.ValidateUser(user,password)) Then..


Benoît Sarton
www.bsi.fr
www.dotnetnuke.fr
 
New Post
11/17/2010 7:57 AM
 
I've created a Web service to give access to my DNN 5.05.01 project from Silverlight and Flash using SOAP. I don't think I really need IWeb...

Here is my testing code :
...
using DotNetNuke.Security.Membership;
using DotNetNuke.Entities.Users;
...
public string HelloWorld()
{
   ...
    bool validuser = Membership.ValidateUser("myusername", "mypassword"); //<= It Works
    UserInfo ui = UserController.GetUserByName(0, "myusername"); // Not working
    ...
}
This last line generate a "Object reference not set to an instance of an object" exception.

Any idea ? Thanks
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationExternal Webservice using ValidateUser - caching errorExternal Webservice using ValidateUser - caching error


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