Select to_char(sysdate,'Q') from dual;--指定日期的季度
Select to_char(sysdate,'MM') from dual;--月份
Select to_char(sysdate,'WW') from dual;--当年第几周
Select to_char(sysdate,'W') from dual ;--本月第几周
Select to_char(sysdate,'DD') from dual;--当月第几天
Select to_char(sysdate,'D') from dual 阅读全文>>
ASP.NET MVC5 post提交数据时报:An asynchronous module or handler completed while an asynchronous operation was still pending.错误,测试的时候提交正常数据不报错,如果提交包含javascript和html等数据的时候报以上错误,经测试系安全验证异常错误,但是界面上并未显示相关异常信息
解决方法,在Action上添加[ValidateInput(false)]Attribute关闭验证就不会报错,但是安全性考虑建议使用AntiXSS白名 阅读全文>>
用如下方法获取UserId报空引用异常
public class BaseController : Controller { protected SiteContext db = new SiteContext(); protected Guid userId; public BaseController() { userId = Guid.Parse(User.Identity.GetUserId()); } }
由于Controller未初始化完成,User为空,重写初始化方法,在初始化(ba 阅读全文>>
做ASP.NET MVC开发的时候,经常会出现一下错误:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specifie 阅读全文>>
使用如下代码加载css:
<link href="/Content/css/home?v=zhVOIpUNuvCOZhJyBcQWpMlozayor4te6k-pM29wHqI1" rel="stylesheet"/>
报403 - 禁止访问: 访问被拒绝。
您无权使用所提供的凭据查看此目录或页面。
解决方法:
如上链接MVC Bundle的处理规则是:
如果服务器存在/Content/css目录,则按照常规文件请求文件系 阅读全文>>
GET方式的直接使用
$file_contents = file_get_contents('http://localhost/operate.php?act=get_user_list&type=json')
POST方式得用下面的(需要开启PHP curl支持)。
$url = 'http://localhost/operate.php?act=get_user_list&type=json'; $ch = curl_init (); curl_setopt ( $ch, CURLOPT_URL, $u 阅读全文>>
热门文章
- MVC4使用[Authorize(Roles="admin" - 218234次
- 微信公众号接口:40016 invalid bu - 62762次
- MVC上传文件时HttpPostedFileBase - 36413次
- 微信公众平台接口进行开发Token验... - 33778次
- 黑客十五年:寻找被黑金毁掉的黑客 - 31512次
- 黑市交易 – 女性肉鸡价格比男性贵 - 29595次
- SQL、LINQ与Lambda随机取N条数据 - 29486次
- Beyond Compare 4 key 注册码 - 28351次
- Windows下netsh端口转发进行渗透 - 28224次
- 【原创】微信公众平台接口调试工具 - 26309次