Session variable in Silverlight
-
Hi, I am working on a silverlight application. In this I need to access session variables in silverlight application.For this I created a WCF service to get the session variable. For this I used the following code: In service [ServiceContract(Namespace = "")][AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] UserId = int.Parse(System.Web.HttpContext.Current.Session["LoginUserID"].ToString()); In web.config file: <serviceHostingEnvironment aspNetCompatibilityEnabled="true"> but I am getting the following error: System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. If any one have any idea to solve this or directly access the session variable in silverlight application please reply me. Thanks in advance.