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.0UserLogin in webservicesUserLogin in webservices
Previous
 
Next
New Post
1/14/2009 10:41 AM
 

Hi, I have a SilverLight control for Login users in a webservice.

 

Well, this rules ok in localhost and LAN, but when I update in production server I get an error. The code for my webservices is:

 <OperationContract()> _
    Public Function ValidateUser(ByVal portalId As String, ByVal PortalName As String, ByVal userName As String, ByVal Password As String) As String
        Dim loginStatus As UserLoginStatus = UserLoginStatus.LOGIN_FAILURE
        Dim objUser As UserInfo = UserController.ValidateUser(portalId, userName, Password, "", PortalName, "", loginStatus)

        UserController.UserLogin(portalId, userName, Password, "", PortalName, "", loginStatus, False)

        Dim eventArgs As UserAuthenticatedEventArgs = New UserAuthenticatedEventArgs(objUser, userName, loginStatus, "DNN")
        eventArgs.Authenticated = (loginStatus <> UserLoginStatus.LOGIN_FAILURE)
        eventArgs.Message = ""
        Dim result As Boolean = UserAuthenticated(Nothing, eventArgs, portalId, PortalName)
        Return result
    End Function

 

And I get null reference in UserController.UserLogin

 

Any Idea what is the problem?

Best Regards.

 
New Post
1/16/2009 2:13 PM
 

the most typical issue would be a lack of httpcontext, which is necessary for the code to work. In theory you could have a silverlight page or xap, that is running in the client, with no .net page running, therefore no httpcontext.

I recommend you take a look at Michael's blog @ http://www.dotnetnuke.com/Community/Blogs/tabid/825/BlogID/77/Default.aspx , he has a number of silverlight examples, and also a project calle IWeb for authenticating via webservices.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/19/2009 2:46 AM
 

The extrange thing is, that it rules in develop server when I try in LAN (http://192.168.1.100/....), but don't rules in production server. So I think the problem is configuration in web.config or similar.

I have posted the same problem in page of Michael (dotnetnuke and SilverLight), but he don't know the solutions too.

I have downloaded IWeb project from codeplex, if I learnd something in this, I posted the solutions.

 

Best Regards.

 
New Post
1/19/2009 3:35 PM
 

IWeb will authenticate you via web services but it wont log you in. Basically IWeb says "Is the user name and password good? Ok let the operation the user is trying to perform proceed".

I really think that this is all you really need. You don't want to log a person in via web services because to be "logged in" simply means you have an authentication token created and you don't have to enter your user name and password again.

The authentication token will work with web browsers and Silverlight applications.

However, to implement the code to support the authentication token via a web service client can be challenging for DotNetNuke because just knowing a client is authenticated is not enough. You also need to know what Portal they have access to and what roles they are in.

Once you finish coding around all this you realize that you will have less code if you simply pass the user name and password with each call.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0UserLogin in webservicesUserLogin in webservices


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