在我的asp.net网站上,我使用asp.net表单身份验证,配置如下
<authentication mode="Forms">
<forms loginUrl="~/Pages/Common/Login.aspx"
defaultUrl="~/Pages/index.aspx"
protection="All"
timeout="30"
name="MyAuthCookie"
path="/"
requireSSL="false"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false" >
</forms>
</authentication>
Run Code Online (Sandbox Code Playgroud)
我有以下问题
什么应该是会话的超时值,因为我在表单身份验证中使用滑动到期,因为哪个会话将在表单身份验证之前到期.我该如何保护它?
在formauthentication注销后,我想在logout.aspx重定向页面,但它会自动重定向到loginpage.aspx.这怎么可能?
我使用以下SQL查询和ExecuteScalar()方法从Oracle数据库中获取数据:
sql = "select username from usermst where userid=2"
string getusername = command.ExecuteScalar();
Run Code Online (Sandbox Code Playgroud)
它向我显示此错误消息:
System.NullReferenceException:未将对象引用设置为对象的实例
当数据库表中没有行时,会发生此错误userid=2.
我该如何处理这种情况?
我在批处理文件中编写以下命令
REGSVR32 E:\Documents and Settings\All Users\Application Data\xyz.dll
Run Code Online (Sandbox Code Playgroud)
运行此命令后,我收到以下错误
LodLibrary(e:\Documents) failed specified module could not be found.
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
我在asp.net网页上遇到以下错误
Sys.WebForms.PageRequestManagerParserErrorException:无法解析从服务器收到的消息.此错误的常见原因是通过调用Response.Write(),响应过滤器,HttpModules或服务器跟踪来修改响应.
我的页面的场景如下
当我单击aspx页面上的一个按钮时会出现一个弹出窗口,但是当我点击用户控件上的按钮进一步负责网格填充/单击单选按钮以填充下拉列表时,出现上述错误.
在我的c #windows应用程序中,每当我在visual studio 2008中打开我的解决方案时,"MyApplication.vshost.exe"总是在窗口任务管理器 - >进程选项卡上可见.
当我试图杀死它时,它再次出现在Process选项卡中.
我没有得到vshost.exe创建的内容?为什么它不会从任务管理器中删除?我们怎样才能删除它?
我在我的C#代码中使用string.split()来读取制表符分隔文件.我正面临着代码示例中提到的"OutOfMemory异常".
在这里,我想知道为什么文件大小为16 MB会出现问题?
这是正确的方法还是没有?
using (StreamReader reader = new StreamReader(_path))
{
//...........Load the first line of the file................
string headerLine = reader.ReadLine();
MeterDataIPValueList objMeterDataList = new MeterDataIPValueList();
string[] seperator = new string[1]; //used to sepreate lines of file
seperator[0] = "\r\n";
//.............Load Records of file into string array and remove all empty lines of file.................
string[] line = reader.ReadToEnd().Split(seperator, StringSplitOptions.RemoveEmptyEntries);
int noOfLines = line.Count();
if (noOfLines == 0)
{
mFileValidationErrors.Append(ConstMsgStrings.headerOnly + Environment.NewLine);
}
//...............If file contains records also with header …Run Code Online (Sandbox Code Playgroud) 在我的一个ASP.Net网站中,我必须提供一个指向用户的链接,其中所有查询字符串参数都应加密.
我在想的是使用命令"aspnet_regiis"(用于加密web.config数据),将输出作为查询字符串传递到已发布的URL中.
当用户单击该链接时,我首先解密该字符串,然后获取查询字符串的原始数据.
我这样做是对的吗?是否有任何好的技术来加密和解密查询字符串?
常规ASP.NET安装将使用以下配置创建machine.config:
<system.web>
<processModel autoConfig="true" />
Run Code Online (Sandbox Code Playgroud)
我想在web.config中覆盖一些属性值,如:
<system.web>
<processModel
maxWorkerThreads="100"
maxIoThreads="100"
minWorkerThreads="40"
minIoThreads="30"
memoryLimit="60"
/>
Run Code Online (Sandbox Code Playgroud)
我想知道我是否必须在web.config中编写所有默认属性,否则它将自动从machine.config中获取processmodel的其他默认属性?
以下是processmodel的属性
<processModel
enable="true|false"
timeout="hrs:mins:secs|Infinite"
idleTimeout="hrs:mins:secs|Infinite"
shutdownTimeout="hrs:mins:secs|Infinite"
requestLimit="num|Infinite"
requestQueueLimit="num|Infinite"
restartQueueLimit="num|Infinite"
memoryLimit="percent"
webGarden="true|false"
cpuMask="num"
userName="{username}"
password="{secure password}"
logLevel="All|None|Errors"
clientConnectedCheck="hrs:mins:secs|Infinite"
comAuthenticationLevel="Default|None|Connect|Call|
Pkt|PktIntegrity|PktPrivacy"
comImpersonationLevel="Default|Anonymous|Identify|
Impersonate|Delegate"
responseDeadlockInterval="hrs:mins:secs|Infinite"
responseRestartDeadlockInterval="hrs:mins:secs|Infinite"
autoConfig="true|false"
maxWorkerThreads="num"
maxIoThreads="num"
minWorkerThreads="num"
minIoThreads="num"
serverErrorMessageFile=""
pingFrequency="Infinite"
pingTimeout="Infinite"
maxAppDomains="2000"
/>
Run Code Online (Sandbox Code Playgroud) 嗨,我想知道文本文件加密和ecryption的最佳加密技术.
我的场景:
我有两种类型的用户Administartor和Operators的软件.我们的要求是当管理员使用GUI输入数据并保存时加密文本文件.将为操作员输入该加密文件,他们只需选择它并使用该文件即可.操作员选择这些文件时,此文件应自动解密数据以供进一步计算.
请帮我看一下我应该使用哪种加密/解密技术?
网站,我想实现忘记密码.我正在使用以下步骤
请帮助我,不管我做得对不对?
是否还有其他安全机制?
[编辑] 谢谢,我收到你的回复.真的,这是一种安全的机制.但在这里我几乎没有怀疑
请帮忙?
asp.net ×5
c# ×3
encryption ×2
.net ×1
ado.net ×1
ajax ×1
asp.net-3.5 ×1
batch-file ×1
cryptography ×1
delphi ×1
forms ×1
oracle ×1
passwords ×1
processmodel ×1
query-string ×1
security ×1
session ×1
timeout ×1