我有一个ASPNET WebApi 2项目,在控制器中我有两个操作
public IHttpActionResult Get([FromUri] Company company)
{
//code
}
另一个:
[HttpGet]
[Route("api/company/quantity")]
public IHttpActionResult Count([FromUri] Company company)
{
//code
}
本公司类别:
public class Company
{
public Company()
{
我正在玩Laravel和实现Auth类来创建一个用户注册/登录系统,我使用cookie驱动程序,以便成员可以继续登录。
但大多数情况下,它不会让我登录,如果我一点击另一个链接,它就会立即登录我,我就退出了。最后,我会得到这个错误:
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cookie
/n
Apache/2.2.15 (CentOS) Server at server.l
我在不同的目录下有两个项目。第一个是我的Angular应用程序,第二个是Laravel 5.5后端。我已经创建了一个API,我想在我的Angular应用程序中调用它。当我尝试在Angular中获取API时,我得到了这样的响应:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote
resource at http://localhost/. (Reason: CORS header ‘Access-Control-Allow-
Origin’ missing).
这两个项目都是本地的
我想为我的laravel应用程序创建一个更逼真的开发环境。我想从apache开始我的laravel应用程序。
问题是,如果我试图通过URL (localhost.eu)访问项目,我总是会得到这个错误:
Forbidden
You don't have permission to access / on this server.
我到目前为止所做的事:
在Apache\conf中编辑了Apache\conf,我取消了这一行的注释:
LoadModule rewrite_module modules/mod_rewrite.so
在Apache\conf\extra中编辑了
如何在Visual Studio 2010中使用调试服务?我想要做的是在处理请求时逐步执行代码。
我通过右键单击解决方案中的网站项目(C:...\APIServiceSite)并选择"View in Browser“来运行服务。一切运行正常,我从服务中得到了预期的结果,但我找不到一种方法来单步执行同一解决方案中另一个项目(APIService)中的代码。