抛出异常的RPXLib.dll远程服务器返回错误:(500)内部服务器错误

时间:2011-01-03 14:01:12

标签: asp.net-mvc-2 rpxnow

我正在尝试将网站登录工具构建为单点登录。一些我如何看到Janrain网站,我找到了这样做的API。我也在我的asp.net MVC应用程序中尝试这个。所以我按照here给出的步骤  我按照给出的确切步骤,所以我认为不需要在这里给出代码。但在我的行动中:

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;
        }

我在表示的代码行中得到异常。我正在获得令牌值。但无法继续前进。例外是:

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 

并要求从路径打开RPXLibWraper.cs。

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

我必须做什么?

1 个答案:

答案 0 :(得分:0)

我现在实际上遇到了同样的问题并解决了它。我正在使用他们的帮助程序c#类,并且路径/ api / v2 /在那里是硬编码的。所以你不能在https://rpxnow.come/api/v2/字符串中拥有该路径,这是新Rpx()调用的内容。所以只需将没有/ api / v2 /的url发送到新的Rpx()调用。解决了它。

祝你好运!