ASP.NET WEB API中的电子邮件验证URL [英] Email Verification URL in ASP.NET WEB API

查看:105
本文介绍了ASP.NET WEB API中的电子邮件验证URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在ASP.NET WEB API中使用给定的URL进行电子邮件验证?

how can I use given URL for email varfication in ASP.NET WEB API?

var Email="test@test.com"
var key="122";

"http://localhost:50740/api/Users/VerifyEmail/" + Email + "/" + key




当我进入Web浏览器时,对其进行调试




when i enter into web browser, debug it

[HttpGet]
public HttpResponseMessage VerifyEmail(string email, string verificationKey)
{
}


动作方法的参数始终为空.

在Global.asax.cs中,我定义了以下路由


paramters of action method are always null.

in Global.asax.cs i have defined following route

routes.MapHttpRoute(
                name: "EmailVerification",
                routeTemplate: "api/{controller}/{action}/{email}/{verificationKey}",
                defaults: new { action = "VerifyEmail", email = "", verificationKey = "" }
             );	   


基本上,我希望处理具有两个参数email和key的验证电子邮件.

感谢您的答复.


basically, I want verification email to be handled which has two parameters email and key.

your response will be appreciated.

推荐答案


请参考 [
Hi,
Refer this[^] for the similar discussion.


这篇关于ASP.NET WEB API中的电子邮件验证URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆