我刚刚将我的Windows Forms项目从.NET 3.0升级到.NET 3.5,并且升级将以下内容添加到我的app.config文件中:
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
</providers>
</roleManager>
</system.web>
Run Code Online (Sandbox Code Playgroud)
我认为system.web仅适用于Web项目.这看起来不对吗?
我有一个基于NAnt的脚本,我在连接到SQL Server 2008 Express的本地PC上运行,也在我的本地PC上运行,使用.sql文件删除和重新创建数据库 - 这很好用,这里没问题.
当我在另一台PC上重新创建相同的设置时出现问题,我在我的NAnt脚本中得到错误说:
System.InvalidOperationException: The 'SQLNCLI' provider is not registered on the local machine.
at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at NAnt.Contrib.Util.SqlHelper..ctor(String connectionString, Boolean useTransaction)
at NAnt.Contrib.Tasks.SqlTask.ExecuteTask()
at NAnt.Core.Task.Execute()
at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
at NAnt.Core.Project.Execute()
at NAnt.Core.Project.Run()
Run Code Online (Sandbox Code Playgroud)
我在网上搜索过,发现在论坛中有人建议我需要安装Microsoft SQL Server Native Client,并从此URL获取.(不可否认,我只安装了Native Client部分) …
设置:Windows 7,IIS7.我正在开发一个通过本地IIS服务器查看的应用程序,而不是内置的调试Web服务器.所以我的应用网址是http://localhost/foo/bar.aspx.有没有 <customErrors>在我的web.config部分,我还没有在IIS中更改的设置.
如果发生任何错误,我总是会出现以下错误屏幕:
HTTP错误500.19 - 内部服务器错误 web.config文件中的部分不允许使用
绝对物理路径"C:\inetpub\custerr"system.webServer/httpErrors.请改用相对路径.
这是我的applicationhost.config内容:
<httpErrors errorMode="Custom" lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
<error statusCode="401" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="401.htm" />
<error statusCode="403" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="403.htm" />
<error statusCode="404" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="404.htm" />
<error statusCode="405" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="405.htm" />
<error statusCode="406" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="406.htm" />
<error statusCode="412" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="412.htm" />
<error statusCode="500" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="500.htm" />
<error statusCode="501" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="501.htm" />
<error statusCode="502" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="502.htm" />
</httpErrors>
Run Code Online (Sandbox Code Playgroud)
如何摆脱此配置错误,以便查看详细错误?
我试图删除ie中的图像边框,但我得到了一些奇怪的行为.
这是我的代码:
img {border: none}
Run Code Online (Sandbox Code Playgroud)
<img src="..." border="0" style="border: 0"/>
Run Code Online (Sandbox Code Playgroud)
但它仍然无法正常工作,IE调试器显示我的图像border: medium.我的div比每张图片大10px.
我正在使用dataTables.js jQuery插件.
我的表的第一列是行计数器,所以我不希望它被用户排序.最后一列包含一些用户可以在一行上执行的操作链接.如何使这两列无法使用?
注意:我正在使用数据表的管道(服务器端进程)模式.
使用Google Apps脚本,有没有办法将Google Spreadsheet数组中的值写入范围而不进行循环?
我正在考虑以下内容,将每个名称放入单元格中 A1:A3
function demoWriteFromArray() {
var employees=["Adam","Barb","Chris"];
ssActive = SpreadsheetApp.getActiveSheet();
rgMyRange = ssActive.getRange("A1:A3");
rgMyRange.setValue(employees)
}
Run Code Online (Sandbox Code Playgroud)
上面的问题是执行后,A1:A3都包含={"Adam","Barb","Chris"} and display "Adam".
我试图让bootstrap div成为全身长.
这是我到目前为止所尝试的:http: //jsfiddle.net/bKsad/315/
html, body {
min-height: 100%
}
.wrap {
height: 100%
}
.sidebar {
background-color:#eee;
background-repeat: repeat;
padding:0;
min-height:100% !important;
position:relative;
}
.sidebar .sidebar-content {
height:100%;
width:100%;
padding: 5px;
margin:0;
position:relative;
}
Run Code Online (Sandbox Code Playgroud)
随着右栏的长度增长,我希望侧栏也能做同样的事情.
我知道必须有一个更简单的方法来检查,但这就是我现在正在做的事情.
if (g.charAt(0) == 'a' || g.charAt(0) =='b' || g.charAt(0) =='c' ||
g.charAt(0) == 'd' || g.charAt(0) =='e' || g.charAt(0) =='f' ||
g.charAt(0) == 'g' || g.charAt(0) =='h')
Run Code Online (Sandbox Code Playgroud) 我有两个不同的数据库模式中定义的相同表类型.当我尝试从一个模式调用SP到另一个模式作为参数传递类型时,我收到以下错误:
"操作数类型冲突myCustomType与myCustomType不兼容"
我有以下代码:
CREATE TYPE myCustomType AS TABLE
(
somevalue INT,
somevalue2 INT
);
Run Code Online (Sandbox Code Playgroud)
USE DB1
GO
CREATE PROC1(
@myVar myCustomType READONLY
)
AS
BEGIN
EXEC db2.dbo.PROC2 @myVar
END
GO
USE DB2
GO
CREATE PROC2(
@myVar myCustomType READONLY
)
AS
BEGIN
--do something with myVar
END
Run Code Online (Sandbox Code Playgroud)
USE db1
GO
DECLARE @myVar myCustomType
INSERT into @myVar(1,2)
EXEC PROC1 @myVar
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
我有一个bootstrap 3崩溃的问题,在以编程方式打开面板后,可以在重新打开第一个面板时保持另一个面板打开.
我的HTML:
<button type="button" class="btn showpanel">Show panel 3</button>
<button type="button" class="btn hidepanel">Hide panel 3</button>
<button type="button" class="btn openpanel">Open panel 3</button>
<button type="button" class="btn closepanel">Close panel 3</button>
<hr/>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#panel1">Panel 1</a>
</h4>
</div>
<div id="panel1" class="panel-collapse collapse">
<div class="panel-body">
Contents panel 1
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#panel2">Panel 2</a>
</h4>
</div>
<div id="panel2" class="panel-collapse collapse">
<div …Run Code Online (Sandbox Code Playgroud) html ×2
sql-server ×2
.net ×1
.net-3.5 ×1
app-config ×1
arrays ×1
char ×1
collapse ×1
css ×1
datatables ×1
http-error ×1
if-statement ×1
iis ×1
iis-7 ×1
java ×1
jquery ×1
nant ×1
nantcontrib ×1
sidebar ×1
sql ×1
winforms ×1