相关疑难解决方法(0)

ASP.NET url MAX_PATH限制

我发现ASP.NET的一个问题,我知道至少已经让另外一个人难过了.我们试图使用HttpModule来处理Web应用程序的通配符请求.生成的url是动态的,可能长达数百个字符.不幸的是,aspnet_isapi.dll文件中似乎存在一个限制,它将url中路径的长度限制为MAX_PATH,其中硬编码为260个字符.

有没有其他人遇到这个并找到了解决这个限制的方法?查询字符串参数不是一个选项.

谢谢,格雷格巴拉德

asp.net url isapi max-path

10
推荐指数
3
解决办法
9010
查看次数

此请求的查询字符串的长度超过配置的maxQueryStringLength值

我正在尝试重定向到视图并继续在问题标题中发布错误.

在断点测试期间,通过代码iv的第一位的代码放在设置消息和设置异常之下.在返回重定向后继续显示下一页显示如下.

在此输入图像描述

向ErrorController和错误模型添加断点我发现代码永远不会到达那里.

我想要发布的视图是一个错误页面.这是代码,以帮助您看到问题.

RedirectToAction:

string message;
message = "An error has occured during the communication to lightstone, this is likely a timeout issue and could be the result of a bad connection. Please go back and try again.";
return RedirectToAction("Error", "Error", new { ex = ex.ToString(), message =  message});
Run Code Online (Sandbox Code Playgroud)

我的ErrorController中的操作:

public ActionResult Error(string ex, string message)
{
   ViewBag.Message = "Error";
   return View(new ErrorModel(ex, message));
}
Run Code Online (Sandbox Code Playgroud)

我的错误模型:

namespace MvcResComm.Models
{
    public class ErrorModel
    {
        public string ex { get; set; …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc-3

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

错误请求 - 无效的URL web api

我正在使用web-api并且我已将web配置文件设置为接受6144作为url的最大长度,如下所示

<system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime maxUrlLength="6144" 
                 relaxedUrlToFileSystemMapping="true"
                 targetFramework="4.5"/>
Run Code Online (Sandbox Code Playgroud)

当我用299个字符调用api时,一切正常,但是超过299个字符会导致错误的请求 - 无效的URL

示例网址:

http://localhost:56835/api/multibuys/10270001C1001034900|10358419P4001027620|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|10781772P4805004950|

asp.net-web-api

4
推荐指数
1
解决办法
3125
查看次数

网址限制

url是否有任何限制?有多少字符可以占用最大网址?感谢你.

asp.net

-1
推荐指数
1
解决办法
2303
查看次数

标签 统计

asp.net ×2

asp.net-mvc-3 ×1

asp.net-web-api ×1

c# ×1

isapi ×1

max-path ×1

url ×1