它总是说HttpContext不包含GetOwinContext()的定义,我尝试下载.net核心owin但我不知道如何实现相同的功能.下面的代码可以在asp.net 5中编译.
private IAuthenticationManager AuthenticationManager
{
get
{
return HttpContext.GetOwinContext().Authentication;
}
}
Run Code Online (Sandbox Code Playgroud) 我以前使用asp.net mvc4并将我的解决方案目录指向我的IIS网站位置,每次更新我的代码时,我只需单击重新构建我的解决方案,然后使用w3wp的"附加到进程".
在asp.net核心;当我将我的网站发布到文件系统时,我可以使用带有无托管代码的iis运行我的网站.但是当我将我的iis网站指向我的网站解决方案代码时,它显示502错误.我以前安装的所有asp.net核心模块.
我有一个$.post()名为“HasIncreasePoint”的请求,如果从服务器返回的数据表明成功(e.IsSuccess),我不想打开引导模式对话框,并完成点击事件过程。
$('a[data-toggle="modal"]').on('click', function (event) {
$.post("@Url.Action("HasIncreasePoint")", function (e){
if (e.IsSuccess) {
alert("error!please not to open the modal!");
event.preventDefault();
event.stopPropagation();
$('a[data-toggle="modal"]').off("click");
}else{
// From the clicked element, get the data-target arrtibute
// which BS3 uses to determine the target modal
var target_modal = $(e.currentTarget).data('target');
// also get the remote content's URL
var remote_content = e.currentTarget.href;
// Find the target modal in the DOM
var modal = $(target_modal);
// Find the modal's <div class="modal-body"> so we can populate …Run Code Online (Sandbox Code Playgroud) 如果TableA有1,000,000亿行(虽然在真实环境中是不可能的)并且主键因身份而增加,因此最大行为1亿个.现在我用一个Random()数字来匹配它的where语句.如下所示:
Select *
from TableA a
where a.PrimaryKey = [Random Number from 1 to 1 million Billion]
Run Code Online (Sandbox Code Playgroud)
如果Select语句执行100次,但我发现它在SQL Server中仍然非常快.
我的意思是如果随机数是一个大数字,那么如果Select * from Table where Pk=1000000,它必须与之前的所有记录进行比较,以查看该数字是否与主键列匹配.所以SQL的性能会非常低.
asp.net ×2
asp.net-core ×2
c# ×1
html ×1
iis ×1
javascript ×1
jquery ×1
owin ×1
sql ×1
sql-server ×1