Dear Friends, I need urgent help Pls
I will explain my problem i little more detail
I have a DNN site "http://newversion.kginfotech.com" .After logs in to this site I have a Link module for redirecting to two another modules .
1.Link1
2.Link2
When user wil click Link1 A new window will come ie. http://newversion.kginfotech.com/F1/ASPProject (It is an ASP.net
application)
When user wil click Link2 A new window will come ie. http://newversion.kginfotech.com/F2/SilverlightProject (It is a silverLight
application)
Now my requirement is Both project page load needs current username of DNN site(http://newversion.kginfotech.com)
For that I created a webservice in DNN site with the code below
<%@ WebService Language="VB" Class="WebServiceDNNUser" %>
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports DotNetNuke.Entities.Users
http://www.newversion.kginfotech.com/")> _
_
Public Class WebServiceDNNUser
Inherits System.Web.Services.WebService
#Region "GetUsername()"
_
Public Function GetUsername() As String
Dim strUsername As String = ""
' Get the current user
Dim objUserInfo As UserInfo = UserController.GetCurrentUserInfo()
strUsername = objUserInfo.UserID
' If the user is not -1 they are logged in
If objUserInfo.UserID > -1 Then
strUsername = objUserInfo.Username
End If
Return strUsername
End Function
#End Region
End Class
I called this webservice from my both project correctly and I am getting logged username from DNN site in my silverlight
application ie.Link2 page.
The problem is From Link1 page( http://newversion.kginfotech.com/F1/ASPProject) When I try to get the current username of DNN .It is always returns the objUserInfo.UserID as "-1"
This is the issue I am facing.
How can I solve this?