使用VS2017在ASP.Net Core 1.1中添加"AddSession"时出错.
'IServiceCollection'不包含'AddSession'的定义,并且没有扩展方法'AddSession'可以找到接受类型'IServiceCollection'的第一个参数(你是否缺少using指令或汇编引用?)
的.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Session" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference
Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
错误:
session asp.net-core asp.net-core-1.0 visual-studio-2017 asp.net-core-1.1
最新版本的Protractor(4.0.9),chromedriver(2.24),chrome(54.0).当我们执行browser.navigate().back()时,我们可以观察到以下错误.
失败:未知的错误:缺失或无效ARG值(会话信息:铬= 54.0.2840.71)(驱动程序信息:chromedriver = 2.24.417431(9aea000394714d2fbb20850021f6204f2256b9cf),平台= Windows NT的6.1.7601 SP1 x86_64的)(警告:服务器未提供任何堆栈跟踪信息)命令持续时间或超时:5.36秒构建信息:版本:'2.53.1',修订版:'a36b8b1',时间:'2016-06-30 17:37:03'系统信息:主机:'HW0705 ",IP: '172.16.28.83',os.name: 'Windows 7的',os.arch: 'AMD64',os.version: '6.1',java.version: '1.8.0_60'驱动程序信息:org.openqa .selenium.chrome.ChromeDriver Capabilities [{applicationCacheEnabled = false,rotate = false,mobileEmulationEnabled = false,networkConnectionEnabled = false,chrome = {chromedriverVersion = 2.24.417431(9aea000394714d2fbb20850021f6204f2256b9cf),userDataDir = C:\ Users\IN02137\AppData\Local\TEMP\scoped_dir7732_2284},takesHeapSnapshot = TRUE,pageLoadStrategy =正常,databaseEnabled =假,handlesAlerts = TRUE,hasTouchScreen =假,版本= 54.0.2840.71,p latform = XP,browserConnectionEnabled =假,nativeEvents =真,acceptSslCerts =真,locationContextEnabled =真,webStorageEnabled =真,browserName =铬,takesScreenshot =真,javascriptEnabled =真,cssSelectorsEnabled =真}]会话ID:aafe05d9edb4edf638aa556a5ca6b2cb [14点50: 28] E/launcher - 与远程浏览器通信时出错.它可能已经死了.
我们无法使用新版本执行任何关键操作,有人可以帮助我们.
我正在尝试使用多选复选框下拉列表来过滤或搜索jquery数据表中的列.例如,如果它是城市列,则表格应该过滤或搜索我是否按照复选框下拉菜单检查两个引用,并在下拉列表中显示已检查引用的结果.我尝试了很多方法来寻找解决方案但是,我现在无法破解它.如果有人可以帮助解决这个问题,我们非常感谢.提前致谢.我只是将jquery代码放在下面供您参考.
<head>
<meta charset="utf-8">
<title>jQuery Datatable</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="http://davidstutz.github.io/bootstrap-multiselect/dist/css/bootstrap-multiselect.css">
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="http://davidstutz.github.io/bootstrap-multiselect/dist/js/bootstrap-multiselect.js"></script>
<style>
* {
margin:0;
padding: 0;
}
#wrap {
width: 100%;
margin: auto;
}
.addcolr {
color: green;
}
</style>
<script>
/*$(document).ready(function() {
$('#example th').each(function() {
alert(this.textContent);
});
});*/
$(document).ready(function() {
$('#example').DataTable({ …Run Code Online (Sandbox Code Playgroud) 我正在尝试在代理后面使用 Visual Studio 社区,但我不断收到错误。
我已将以下内容添加到D:\myVisualStudioInstall\Common7\IDE\devenv.exe.config
<system.net>
<settings>
<ipv6 enabled="false"/>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy bypassonlocal="true" proxyaddress="http://myProxy.com:8080" />
</defaultProxy>
</settings>
</system.net>
Run Code Online (Sandbox Code Playgroud)
我在启动时收到错误:
无法识别的元素“defaultProxy”。(C:\ Users \ me \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ devenv.exe.config第1304行)
我这里哪里出错了?我在网上找到的所有内容都告诉我 defaultProxy 应该是该元素的名称,但也许对于社区版来说存在一些差异?我已经在 Windows 凭据管理器中检查了我的凭据,它似乎可以正常工作,因为 IE 不再提示我输入这些凭据。
谢谢
如果我的陈述包含两个条件:
string searchx = "some string";
if ((searchx.Contains("a1")) || (searchx.Contains("a2")))
{
...
}
Run Code Online (Sandbox Code Playgroud)
但是如何用语句的单个变量获取值列表?
如果我有 a1, a2, a3, a4, a5, a6, a7, a8, a9...
我能用这种方式做到这一点,似乎是错误的尝试:
var valueList = new List<string> { "a1", "a2", "a3", "a4"};
Run Code Online (Sandbox Code Playgroud)
但只是为了解释我想要做什么,所以如果存在任何值valueList,则接受条件:
if (searchx.Contains(valueList))
{
...
}
Run Code Online (Sandbox Code Playgroud)
最好的,如果我可以得到多个值返回我猜或任何其他方式通过任何其他方式的单个变量获得更新的值列表,这可以这样对我有用吗?
我已经配置了一个FileSystemWatcher,以便它在一个文件夹上观察C:\folder.
当我将其正在观看的文件夹的名称更改为另一个文件夹时,它突然出现问题,并且它不会引发任何问题.
问题是:FileSystemWatcher如果对正在观察的同一个"对象"进行更改,是否会引发某些事件?
我在 C# 中得到了这个连接字符串:
strg_SQL_Connection = @"Server=Server\Instance; Database=DB;UID=domain\user; Password=password;";
Run Code Online (Sandbox Code Playgroud)
它总是尝试使用我不想要的开发计算机上登录的用户登录。我怎样才能解决这个问题?
c# ×4
.net ×1
asp.net-core ×1
checkbox ×1
css ×1
datatables ×1
javascript ×1
jquery ×1
list ×1
protractor ×1
proxy ×1
session ×1
sql ×1
sql-server ×1
windows ×1