惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
D
Docker
WordPress大学
WordPress大学
罗磊的独立博客
J
Java Code Geeks
博客园 - 【当耐特】
博客园 - 司徒正美
雷峰网
雷峰网
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
B
Blog

博客园 - 猪头

remote: Repository not found. fatal: repository 'https://github.com/***/***.git/' not found Scaffold-DbContext 命令参数 MVC 5 调用存储过程参数配置方法-Procedure or function 'UP_***' expects parameter '@****', which was not supplied. mvcmovie sample 在window10 下的部署问题(HTTP Error 500.19 - Internal Server Error) Window 无法完成请求的更改,找不到引用的汇编,错误代码 0X80073701 VS2017离线版的SSDT安装包(包括SSIS) sql2008r 收缩数据库日志log文件;删除errorlog文件的方法 解决window2012 IIS8 配置的网站无法下载exe文件的问题 商品房买卖合同备案 收房注意事项!--经典! 商河水木清华业主告媒体书 商河水木清华全体业主告开发商书 商河县水木清华全体业主给县委县府的一封信 大家不要在水木清华买房子了,我的都一年了,还没交房! 呼吁所有商河水木清华业主拒绝不合理的交房流程 说说无耻的商河水木清华开发商2013"交房 拒绝无效的“交房”写给所有商河水木清华业主 HDD 格式化错误 E:31:00 --如何备份DV里的数据 Windows 7 Sp1 x64 无法安装英文语言包(已解决)
VS2017 ASP.NET MVC 5.0 开部署问题汇总
猪头 · 2019-03-04 · via 博客园 - 猪头

1[SqlException (0x80131904): 拒绝了对对象 '****' (数据库 '***',架构 'dbo')的 EXECUTE 权限。]

“/”应用程序中的服务器错误。


SQL 2012 拒绝了对对象 '***' (数据库 '****',架构 'dbo')的 EXECUTE 权限。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.Data.SqlClient.SqlException: 拒绝了对对象 '' (数据库 '',架构 'dbo')的 EXECUTE 权限。

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。


备注:如果有多个数据库链接,都要检查对应的数据库连接串

 2. X.PagedList 如何只获取一页的数据?使用类:StaticPagedList

(1)

public class UserController : Controller
{
    public object Index(int? page)
    {
        var pageIndex = (page ?? 1) - 1; //MembershipProvider expects a 0 for the first page
        var pageSize = 10;
        int totalUserCount; // will be set by call to GetAllUsers due to _out_ paramter :-|

        var users = Membership.GetAllUsers(pageIndex, pageSize, out totalUserCount);
        var usersAsIPagedList = new StaticPagedList<MembershipUser>(users, pageIndex + 1, pageSize, totalUserCount);

        ViewBag.OnePageOfUsers = usersAsIPagedList;
        return View();
    }
}

(2)

@model X.PagedList.IPagedList<Model123>
@using System.Web.Optimization
@using X.PagedList.Mvc

 @Html.PagedListPager(Model, page => Url.Action("Author", new { page }))

3.Templates can be used only with field access, property access, single-dimension array index, or sing

var tmpDate = item.PoesyDate.ToString("yyyy-MM-dd");

 @Html.DisplayFor(modelItem => tmpDate)|

4.Exeption handle:

(1)Application_Error:can't catch 404 error for static files such as html/jpg/JS

(2)if set up Application_Error,[ <customErrors mode="On" defaultRedirect="Error"/>] will not work

(3)HandleErrorAttribute will only control error

 4.Get 404 code in MVC:  (HttpException)ex).GetHttpCode()