English 中文(简体)
第405号法令 GET 不允许采用的方法
原标题:Getting 405 Method Not Allowed on a GET

在我的网站上浏览以下链接,产生了405个:

<a href="/unsubscribe/confirm?emailUid=<%= ViewData["emailUid"] %>&hash=<%= ViewData["hash"] %>" class="button">Yes, unsubscribe me.</a>

The Confirm Action being calls from the Unsubposition Chief:

    [HttpGet]
    public ActionResult Confirm( string emailUid, string hash)
    {
        using ( UnsubscribeClient client = new UnsubscribeClient() )
        {
            UnsubscribeResponse response = client.Unsubscribe( emailUid, hash );
            return View( response );
        }

    }

简单 st。 当I F5公司运作时,但当我担任国际交易日志(7.5和6)的东道国时,我发现错误。

与此相比,我大为损失。 我对这个网络表示鼓励,但似乎无法找到造成这种情况的原因。

最佳回答

我发现我的问题。 由此可见,我的国际空间法学会组合是一个问题。 在6号国际调查中,我确实允许在名录中执行文字,因此我不会为我的服务东道国开张。 一旦我改变这种状况,我不再收到405个错误......

许多人对其他答复表示感谢。 我肯定会利用Html助手。

问题回答

<%= Html.ActionLink(
    "Yes, unsubscribe me.",
    "Confirm", 
    "Unsubscribe", 
    new { emailUid = ViewData["emailUid"], hash = ViewData["hash"] }, 
    new { @class = "button" }
) %>

ViewData? 请删除赞成强烈分类的观点和看法模式。 每一次,我都看到有人使用<条码> 字典>。 我不得不说这一点。

底部中实际提供的超文本素材是什么? 产生的《世界投资倡议》是否有效?

将这项工作改为:

 <%= Html.ActionLink("Yes, unsubscribe me.", "Confirm", "Unsubscribe", new { emailUid= ViewData["emailUid"], hash = ViewData["hash"]})%>

• 确保产出的URL有效,任何无效性质均适当越出,因为充分确保<代码>和>;作为<代码>和amp;amp;

如果贵国在<代码>emailUid或hash 上有一个时期,则需要加以编码。 这不是唯一的问题,但我怀疑这里的情况。 http://msdn.microsoft.com/en-us/library/system.web.httputility.urlencode.aspx” rel=“nofollow”HttpUtility.UrlEncode on these Value before concatenating them into the URL.

为什么405? 与此类似,国际空间法研究所6 没有关于推定的“档案延期”的描述。 它根本不是档案的延伸,而是没有在《欧洲权利法》中规定期限,它不知道什么。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签