Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
ASP.NET Web API 中处理程序和过滤器的依赖注入
我正在尝试连接我的 Web Api 项目以使用 Castle Windsor 进行 IoC 我已经通过以下方式为我的控制器做到了这一点这篇优秀的文章 http blog ploeh dk 2012 10 03 DependencyInjec
APIController“执行”方法?
In an ApiController操作 我需要在操作完成执行后立即关闭与数据库的连接 在控制器下我重写OnActionExecuted来实现这一目标 我将如何在ApiController action Thanks 你可以覆盖Execu
aspnetwebapi
aspnetapicontroller
asp.net web api 中具有两个参数的方法
如何使用 ASP NET Web Api 创建具有两个参数的方法 这样我就可以像 localhost controller param1 param2 那样调用它 您还可以在查询字符串中使用特定参数名称来调用 url api actions
aspnetwebapi
有没有办法在 asp.net core 3.1 Rest-API 中使用 Identity Server 功能
我正在使用 asp net core 3 1 在服务器中使用 Rest API 的项目 以 Angular 作为单页应用程序的前端 从每个客户端 用户需要提供其用户名和密码才能访问 Web API 的受保护部分 我想使用 Identity
c
ASPNETCore
aspnetwebapi
aspnetcoreidentity
aspnetcore31
.NET Web API - 添加日志记录
我正在寻找有关处理 API 日志记录的最佳方法的帮助 我想将所有请求和响应记录到 sql 或文本文件 如果这是最好的方法 目前我已经在 SQL Server 的日志表中插入一行 我使用名为 LogAction 的静态方法来执行此操作 并在
c
NET
API
logging
aspnetwebapi
如何在 Web Api 中将对象作为参数传递
我想在我的 web api GET 和 POST 方法中将对象作为参数传递 我的代码是 HttpGet Route mytest list model public IHttpActionResult GetAllTypes TestMod
ASPNETMVC
aspnetwebapi
aspnetwebapi2
在实体框架中定义两个外键作为主键
在实体框架中 我想使用两个外键作为另一种实体类型的主键 public class CustomerExtensionValue Values for extended attributes of a customer Key Column
c
EntityFramework
aspnetwebapi
如何检测Web Api Post请求Json中的重复键
当请求 Json 包含重复键时 我需要从 ASP NET Web API Post 请求返回 400 错误 例如 如果请求是 key1 value1 key2 1000 key2 2000 key3 value3 那么我希望由于有两个 ke
c
json
aspnetwebapi
jsonnet
deserialization
ASP.NET Core Web API 模板中没有个人用户帐户身份验证选项
我有点困惑为什么最新的 ASP NET Core Web API 模板中没有个人用户帐户身份验证选项 是否仍然可以按照 MVC 模板的方式实现个人用户帐户 或者是否有意义 假设我正在创建一个独立的 Web API 它将包含我的所有业务逻辑和
aspnet
aspnetwebapi
ASPNETCore
aspnetidentity
aspnetcorewebapi
ASP NET Web API 路由模板
我有一个名为 Agency 的实体 具有以下 api GET http localhost 37331 api agency start 1 limit 10 status 1 GET http localhost 37331 api ag
aspnet
aspnetwebapi
routes
aspnetwebapirouting
WebAPI 2.2 上的 Elmah.axd - 未找到 HTTP 资源
我试图在我的浏览器中访问 elmah axd 但它返回 message No HTTP resource was found that matches the request URI http services domain com elm
aspnetwebapi
aspnetwebapi2
elmah
aspnetwebapirouting
从 WebAPI 发送大文件。内容长度为 0
我正在尝试将大文件 GB 从一个WebAPI NET Core 发送到另一个WebApi Net Core 我已经设法发送较小的文件作为多部分请求的一部分 就像上一篇文章中那样 link https forums asp net t 209
c
aspnet
aspnetwebapi
ASPNETCore
使用 EnableCors 时“请求的资源不支持 http 方法‘OPTIONS’”
我想在 Asp net Web Api 中的一项特定操作上启用 CORS 我正在尝试这样做 Route api mycontroller myaction HttpPost EnableCors https example com post
c
aspnetwebapi
CORS
EntityFramework 6 中的 IDbCommandInterceptor 线程安全吗
使用 DbInterception add 方法注册时 IDbCommandInterceptor 实例是否被视为线程安全 我已经实现了一个符合 IDbCommandInterceptor 接口的类 并且正在跟踪调用其中一个执行方法时命令的
c
aspnetwebapi
entityframework6
使用全局 Web API 过滤器属性进行 Unity 依赖注入
参考这个CodePlex 统一文章 http unity codeplex com discussions 446780我能够使用 WebAPI 控制器获取过滤器属性 如下所示 MyFilterAttribute public class
c
aspnetwebapi
unitycontainer
在 Asp.net Web API 中处理 CORS 预检
我的架构中有三个应用程序 它们位于同一服务器上 但具有不同的端口号 A Token Application port 4444 Asp net WebApi B API Application port 3333 Asp net WebAp
c
angularJS
aspnetwebapi
httpheaders
CORS
如何在 Web api 2、odata 中隐藏元数据
我已经使用定义了 odata 路由MapODataServiceRoute in my WebApiConfig config Routes MapODataServiceRoute CompanyoOdata odata GetImpli
aspnet
ASPNETMVC
aspnetwebapi
ODATA
aspnetwebapi2
WebAPI如何处理嵌套资源?
我正在寻找有关使用 WebAPI 2 时最佳实践的意见和建议 假设我有两个控制器 用户和书籍 并且想要接受这些路由 users user id books lt books owned by user id books lt all boo
NET
REST
aspnetwebapi
Azure 中的 ASP.NET MVC 4 和 Web API - 未找到 HTTP 资源
使用 Visual Studio 2012 我创建了一个简单的 Windows Azure 项目 云项目 其中包含 ASP NET MVC 4 网站 我没有对模板进行任何更改 我只是尝试使用Azure 网站 https www window
aspnet
Azure
aspnetmvc4
aspnetwebapi
如何从 ModelState 键中删除前缀?
例如 有一个Web Api操作方法 public HttpMessageResponse Post UserDto userDto if this ModelState IsValid return this Request CreateE
NET
aspnetwebapi
«
1 ...
5
6
7
8
9
10
11
...63
»