You could set the Location header:

public HttpResponseMessage Get()

{

var response = Request.CreateResponse(HttpStatusCode.Found);

response.Headers.Location = new Uri("http://www.google.com");

return response;

}

How to Redirect in ASPNET Web API的更多相关文章

  1. ABP官方文档翻译 5.1 Web API控制器

    ASP.NET Web API控制器 介绍 AbpApiController基类 本地化 其他 过滤器 审计日志 授权 反伪造过滤器 工作单元 结果包装和异常处理 结果缓存 校验 模型绑定器 介绍 A ...

  2. .NET Core 3 Web Api Cors fetch 一直 307 Temporary Redirect

    .NET Core 3 Web Api Cors fetch 一直 307 Temporary Redirect 继上一篇 .net core 3 web api jwt 一直 401 为添加JWT- ...

  3. Web API 入门指南 - 闲话安全

    Web API入门指南有些朋友回复问了些安全方面的问题,安全方面可以写的东西实在太多了,这里尽量围绕着Web API的安全性来展开,介绍一些安全的基本概念,常见安全隐患.相关的防御技巧以及Web AP ...

  4. Web API 使用上安全吗?

    Web API入门指南有些朋友回复问了些安全方面的问题,安全方面可以写的东西实在太多了,这里尽量围绕着Web API的安全性来展开,介绍一些安全的基本概念,常见安全隐患.相关的防御技巧以及Web AP ...

  5. Web API 安全问题

    目录 Web API 安全概览 安全隐患 1. 注入(Injection) 2. 无效认证和Session管理方式(Broken Authentication and Session Manageme ...

  6. Web API 入门指南 - 闲话安全(转)

    Web API 安全概览 安全隐患 1. 注入(Injection) 2. 无效认证和Session管理方式(Broken Authentication and Session Management) ...

  7. Web API入门指南(安全)转

    安全检测的工具站点:https://www.owasp.org/index.php/Category:Vulnerability_Scanning_Tools Web API入门指南有些朋友回复问了些 ...

  8. Web API 入门指南

    Web API 入门指南 - 闲话安全2013-09-21 18:56 by 微软互联网开发支持, 231 阅读, 3 评论, 收藏, 编辑 Web API入门指南有些朋友回复问了些安全方面的问题,安 ...

  9. ASP.NET Web API 2 external logins with Facebook and Google in AngularJS app

    转载:http://bitoftech.net/2014/08/11/asp-net-web-api-2-external-logins-social-logins-facebook-google-a ...

随机推荐

  1. Microsoft实现的IOC DI之 Unity 、Service Locator、MEF

    这几个工具的站点 Microsoft Unity  http://unity.codeplex.com Service Locator http://commonservicelocator.code ...

  2. poll() can't detect event when socket is closed locally?

    from https://stackoverflow.com/questions/5039608/poll-cant-detect-event-when-socket-is-closed-locall ...

  3. windows操作系统查看占用端口的进程

    在开发中有时我们需要确定哪个占用了8080端口,在windows命令行窗口下执行: netstat -aon|findstr 命令执行后打印出来的结果如下所示:

  4. iOS 使用宏 常量 报错 expected expression

    报错的代码: 报错原因:多写了一个分号!

  5. U盘装win7系统

    首先在互联网下载UltraISO光盘映像文件制作/编辑/格式转换工具,(当然还有其它如WinISO.WinImage.Daemon Tools等)然后在准备一个4GB容量以上(含4GB)的优盘或者移动 ...

  6. JS 日期实用方法

    var DateUtil = function(){ /** * 判断闰年 * @param date Date日期对象 * @return boolean true 或false */ this.i ...

  7. JVM调优系列:(五)JVM常用调试参数和工具

    转自:http://blog.csdn.net/opensure/article/details/46715769 JVM常用调试参数: –verbose:gc在虚拟机发生内存回收时在输出设备显示信息 ...

  8. SharePoint 2013 安装.NET Framework 3.5 报错

    环境描述 操作系统:Windows Server 2012 R2 Datacenter版本 安装报错 中途接手安装SharePoint Server 2013 with sp1,配置向导报错如下: A ...

  9. uvc Android

    1) The kernel is V4L2 enabled, e.g.,CONFIG_VIDEO_DEV=yCONFIG_VIDEO_V4L2_COMMON=yCONFIG_VIDEO_MEDIA=y ...

  10. 进一步优化ListView

    之前我已经分享过一篇:viewHodler的通用写法,就是专门用来优化listview的加载的,但是对于复杂的布局,我们还需要在listview滑动和不滑动时进行自己的处理,今天我看到一篇文章就是讲这 ...