相关疑难解决方法(0)

如何删除AspxAutoDetectCookieSupport

我的网站上有很多网址www.mysite.com/Display.aspx?ID=128

以用户身份显示给用户

www.mysite.com/Display.aspx?ID=128&AspxAutoDetectCookieSupport=1

如何删除AspxAutoDetectCookieSupport.

我知道它必须在web.config中使用cookie做一些事情,但在哪里?如果我删除它会带来什么影响.怎么删除?

asp.net

10
推荐指数
1
解决办法
2万
查看次数

ASP.NET WebApi:(405)方法不允许

我有一个Web Api控制器.它表现得很奇怪.当我使用PostMan时,我可以在Web Api上访问POST方法,但是当我从.net使用HttpWebRequest时,它返回(405)Method Not Allowed.我把Web Api代码放在这里:

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;

namespace MyProject.Controllers
{
    public class TestController : ApiController
    {
        [HttpPost]
        public int buy(OrderResult value)
        {
            try
            {
                if (value.InvoiceDate != null && value.Result == 1)
                {
                    return 0;
                }
            }
            catch{}

            return -1;
        }
    }

    public class OrderResult
    {
        public int Result { get; set; }
        public long InvoiceNumber { get; set; }
        public string InvoiceDate { get; …
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc asp.net-web-api

9
推荐指数
2
解决办法
2万
查看次数

标签 统计

asp.net ×2

asp.net-mvc ×1

asp.net-web-api ×1