我有一个使用C#在VS2010中编写的Windows窗体应用程序,并在app.config
文件中获得以下错误:
Message 4 Could not find schema information for the attribute 'name'
Message 8 Could not find schema information for the attribute 'name'
Message 12 Could not find schema information for the attribute 'name'
Message 5 Could not find schema information for the attribute 'serializeAs'
Message 15 Could not find schema information for the element 'CCP_Utility.Settings1'
Message 2 Could not find schema information for the element 'CCP_Utility.Properties.Settings'
Message 3 Could not find schema information for the element 'setting' …
Run Code Online (Sandbox Code Playgroud) 背景:我的老板尝试使用公共和私有部分向我输出ASC密钥,但每当我收到文件时,私有部分永远不会加载,它不会解密任何文件.
我们尝试使用以下方法导出ASC密钥:
Windows应用程序GNU隐私助手(包含在gpg4win中)
Error: "Decryption failed. Secret Key Not available."
Run Code Online (Sandbox Code Playgroud)如何正确导出秘密或私有asc密钥来解密gpg文件?
我正在创建一个基于旧项目的项目,因为它具有我需要使用的许多功能.我想重命名所有目录和解决方案名称以获得新项目的名称.在Documents\Visual Studio 2008\Projects下,我能够更改初始目录和解决方案文件名,但不能更改包含bin,obj和properties文件夹的子目录的名称.当我更改该子目录的名称时,打开解决方案时将不会打开任何文件.
如何在VS2008中更改项目的文件夹名称,以便它将所有文件作为解决方案的一部分加载并仍然有效?
是否存在可以根据文本框宽度显示路径的智能文本框控件(WinForms).例如,如果路径很短,它将显示整个路径(C:\ myfile.txt),但如果路径很长,它将显示开始和结束(C:\ SomeFolder ...\foo\MyFile.txt ).显示的字符长度应由文本框使用其宽度(动态)计算.欢迎任何商业或开源建议.非常感谢你.
使用VB.NET,如何使用Active Directory将sid转换为组名?
例如:我需要获得"group_test"而不是"S-1-5-32-544"
我正在使用的代码是:
Public ReadOnly Property Groups As IdentityReferenceCollection
Get
Dim irc As IdentityReferenceCollection
Dim ir As IdentityReference
irc = WindowsIdentity.GetCurrent().Groups
Dim strGroupName As String
For Each ir In irc
Dim mktGroup As IdentityReference = ir.Translate(GetType(NTAccount))
MsgBox(mktGroup.Value)
Debug.WriteLine(mktGroup.Value)
strGroupName = mktGroup.Value.ToString
Next
Return irc
End Get
End Property
Run Code Online (Sandbox Code Playgroud)
或类似的东西?
currentUser = WindowsIdentity.GetCurrent()
For Each refGroup As IdentityReference In currentUser.Groups
Dim acc As NTAccount = TryCast(refGroup.Translate(GetType(NTAccount)), NTAccount)
If AdminGroupName = acc.Value Then
ret = "999"
End If
If UsersGroupName = …
Run Code Online (Sandbox Code Playgroud) 我正在使用表单身份验证和gettnig以下错误:
'/'应用程序中的服务器错误.
找不到存储过程'dbo.aspnet_CheckSchemaVersion'.描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.
异常详细信息:System.Data.SqlClient.SqlException:找不到存储过程'dbo.aspnet_CheckSchemaVersion'.
来源错误:
在执行当前Web请求期间生成了未处理的异常.可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息.
堆栈跟踪:
[SqlException(0x80131904):找不到存储过程'dbo.aspnet_CheckSchemaVersion'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception,Boolean breakConnection)+2030802
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,Boolean breakConnection)+5009584
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()+234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj)+2275
System.Data.SqlClient. SqlCommand.FinishExecuteReader(SqlDataReader ds,RunBehavior runBehavior,String resetOptionsString)+215
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,Boolean async)+987
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior) cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String method,DbAsyncResult result)+1 62
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result,String methodName,Boolean sendToPipe)+178
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()+137
System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider,SqlConnection连接) ,String [] features,String version,Int32&schemaVersionCheck)+392
System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection)+84
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username,Boolean updateLastLoginActivityDate,Int32&status,String&password ,Int32&passwordFormat,String&passwordSalt,Int32&failedPasswordAttemptCount,Int32&failedPasswordAnswerAttemptCount,Boolean&isApproved,DateTime&lastLoginDate,DateTime&lastActivityDate)+827
System.Web.Security.SqlMembershipProvider.CheckPassword(String username,String password,Boolean updateLastLoginActivityDate,Boolean failIfNotApproved,String&salt,Int32& passwordFormat)+105
System.Web.Securit y.SqlMembershipProvider.ValidateUser(String username,String password)+106
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)+60
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)+129 System. Web.UI.WebControls.Login.AttemptLogin()127
System.Web.UI.WebControls.Login.OnBubbleEvent(对象源,EventArgs的)101 System.Web.UI.Control.RaiseBubbleEvent(对象源,EventArgs的参数)+ 37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)+125
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)+167
System.Web.UI.WebControls.Button.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String …
背景:在部署在本地计算机上无错误编译的应用程序后,我收到内部服务器500 24 50错误.部署应用程序的服务器具有大量安全性并且运行IIS 7.5,因此我需要为每个目录指定读写访问权限.此应用程序使用Windows身份验证和Web服务通过代理填充下拉框.我认为连接到Web服务可能存在问题,或者文件的读/写安全性问题,或者活动目录身份验证存在问题.
由于某种原因,Internet Explorer刚刚显示无法加载网页错误.
Google Chrome中出错:
500 – Internal Server Error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Run Code Online (Sandbox Code Playgroud)
日志文件详情:
#Software: Microsoft Internet Information Services 7.5
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2011-05-18 13:54:46 W3SVC1 FL-TPA-WEB-01 172.17.1.25 GET / - 80 -
172.17.1.25 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;
+Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET4.0C;+.NET4.0E) - -
invitations.myagencyservices.com 500 24 50 1380 …
Run Code Online (Sandbox Code Playgroud) 不幸的是,我在网上找到的自定义角色和成员提供商背后的表单身份验证代码的所有示例都是用VB.NET代码编写的,我需要一个C#代码.请帮忙!!!!
我需要一个代码隐藏,它将执行以下操作:
Default.aspx代码:
<asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false">
<LayoutTemplate>
<span class="failureNotification">
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
</span>
<asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification"
ValidationGroup="LoginUserValidationGroup"/>
<div class="accountInfo">
<fieldset class="login">
<legend>Account Information</legend>
<p>
<asp:Label ID="usernameLabel" runat="server" AssociatedControlID="username">Username:</asp:Label>
<asp:TextBox ID="username" runat="server" CssClass="textEntry"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="username"
CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required."
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="passwordLabel" runat="server" AssociatedControlID="password">Password:</asp:Label>
<asp:TextBox ID="password" runat="server" CssClass="passwordEntry" …
Run Code Online (Sandbox Code Playgroud) c# asp.net forms-authentication roleprovider membership-provider
如何修复Windows窗体设计器中的设计时错误?
当我点击MyMainForm.cs [Design]页面调出WinForms时,我收到以下错误:
To prevent possible data loss before loading the designer, the following errors must be resolved:
The class name '?' is not a valid identifier for this language.
Instances of this error (1)
1. Hide Call Stack
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnNamespacePopulateTypes(Object sender, EventArgs e)
at System.CodeDom.CodeNamespace.get_Types()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Run Code Online (Sandbox Code Playgroud)
以下是我在MainForm.Designer.cs中的错误:
Warning 1 The class name '?' is not a valid identifier for this …
Run Code Online (Sandbox Code Playgroud) 我正在使用带有OpenFileDialog和FileBrowserDialog的C#开发WinForms应用程序,我想:
我怎么能做到这一点?
c# ×5
asp.net ×4
.net ×1
encryption ×1
file-browser ×1
filenames ×1
gnu ×1
gnupg ×1
iis-7.5 ×1
login ×1
multi-select ×1
path ×1
private-key ×1
roleprovider ×1
sid ×1
textbox ×1
usergroups ×1
vb.net ×1
wcf ×1
wcf-binding ×1
wcf-security ×1
web-config ×1
winforms ×1