RPXLib.dll throwing the exception The remote server returned an error: (500) Internal Server Error

238 Views Asked by At

I am trying to build the site login facility as single sign on. some how I come across to the site Janrain where I found the API's to do so. also I am trying this in my asp.net MVC application. so that I was following the steps given over here I followed exact steps what are given, so I think no need to give code here. But In my action as:

public bool signin(string token)
        {
           // string token = token_url;
            RPXLib.RPXService service = new RPXLib.RPXService(new RPXLib.RPXApiSettings("https://singlesignontest.rpxnow.com/api/v2/auth_info", "56fd9a76a5da4dffb9a437fe09564544b209c622"));
            try
            {
                RPXLib.Data.RPXAuthenticationDetails userDetails = service.GetUserData(token); //*Exception here* 
                return true;
            }
            catch (RPXLib.Exceptions.RPXAuthenticationErrorException ex)
            {
            } return false;
        }

I am getting exception at denoted line of code. I am getting token value properly. but could not proceed a head. Exception is :

The remote server returned an error: (500) Internal Server Error.

Stack Trace:

[WebException: The remote server returned an error: (500) Internal Server Error.]
   System.Net.HttpWebRequest.GetResponse() +5313085
   RPXLib.RPXApiWrapper.Call(String methodName, IDictionary`2 queryData) in D:\Development\Projects (3rd Party)\RpxLib\src\RPXLib\RPXApiWrapper.cs:50
   RPXLib.RPXService.GetUserData(String authenticationDetailsIdentifier) in D:\Development\Projects (3rd Party)\RpxLib\src\RPXLib\RPXService.cs:156
   SingleSignOn.Controllers.HomeController.signin(String token) in D:\ParallelMinds\Study Material\MVC\SingleSignOn\SingleSignOn\Controllers\HomeController.cs:37
   lambda_method(ExecutionScope , ControllerBase , Object[] ) +140
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
   System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +52
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254
   System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +314
   System.Web.Mvc.Controller.ExecuteCore() +105
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8674318
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

and asks for to open RPXLibWraper.cs from path.

 D:\Development\Projects (3rd Party)\RpxLib\src\RPXLib\RPXApiWrapper.cs

what I have to do ?

1

There are 1 best solutions below

0
On

i acctually had the same issue now and solved it. I am using their helper c# class and the path /api/v2/ is hard coded there. So you cant have that path in th https://rpxnow.come/api/v2/ string also, which is a inparam to the new Rpx() call. So just send in the url without the /api/v2/ to the new Rpx() call. Solved it for me.

Good luck!