我已经开发了asp.net应用程序和windows桌面应用程序系统。我的客户可以上传图像到asp.net应用程序(只有一个文件夹)。因此,如果有人上传shell脚本并执行,就可以窃取其他客户端的数据库文件。Asp.net应用程序可以在windows server 2008 r2(web服务器版)操作系统和IIS7.5下运行,目前具有管理员权限。我没有域和域控制器,因此没有高级用户权限管理。"applicationpoolidentiy“也没有用(我甚至打不开页面)。我想也许我可以拒绝执行上传的脚本?有没有可能。或者,有没有更好的方法来保护服务器不受上传脚本的影响?
在PowerShell Desired State Configuration中,您可以定义以下功能:
Node $MachineName {
# define the IIS Role
WindowsFeature IIS {
Name = “Web-Server”
}
# define the SQL Role
WindowsFeature SQL {
Name = “SQL-Server”
}
# require ASP.NET 4.5
WindowsFeature ASP
我得到以下错误:
ASP.NET is not authorized to access the requested resource. Consider granting access
rights to the resource to the ASP.NET request identity. ASP.NET has a base process
identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used
if the application is not impe
在IIS 6中,ASP错误与行号和问题描述一起显示。例如,
{call dbo.spGetCommunityInfo(xx)}
Microsoft SQL Native Client error '80020005'
Invalid character value for cast specification
/communitydetail.asp, line 42
IIS7改变了ASP错误的处理方式,并显示了一些不太有用的内容。例如,
Internal Server Error
The server encountered an internal error or
我正在尝试设置这本书,以便在IIS下运行数据库应用程序,并授予ASP.NET对数据库的访问权限。这本书的名字是:
Murach的ASP.NET 4网络编程与C# 2010 (Murach:培训和参考)
这本书附带了两个文件来做到这一点:
运行此文件的 "grant_access_windows_7_vista.bat“:"grant_access_windows_7_vista.sql”
以下分别是文件:
@ECHO off
:: batch file for
:: Murach's ASP.NET 4 Web Programming with C# 2010
::
Windows 7极限
IIS7
首先,我启用了IIS中的所有设置,可以查看IIS的默认页面,但是当我试图在C:\inetpub\wwwroot\MyWeb中查看页面时,我常常会得到一个404错误。
然后我试着:
ASP
ISAPI扩展
请求过滤
它甚至没有给我显示默认的IIS页面。然后我试着:
ASP
ASP.NET
ISAPI扩展
默认文档
静态含量
请求过滤
它给我显示了默认页面,但是当我试图查看目录中的文件时,Chrome说链接似乎被破坏了。目前,我的设置是:
IIS管理控制台
.net扩展性
asp
我得到以下错误:
ASP.NET is not authorized to access the requested resource. Consider granting access
rights to the resource to the ASP.NET request identity. ASP.NET has a base process
identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used
if the application is not impe
似乎View in Browser选项并不真正需要IIS,而且它似乎可以很好地处理ASP页。那么,如果没有web服务器,它是如何工作的呢? 他们曾经有一个开发人员web服务器(Cassini),这是很久以前的事了,那么在visual studio中有什么内置的功能吗?如果不需要IIS,谁来处理asp页面的请求? 我已经安装了IIS,所以我不确定是否正在为页面提供服务,但似乎没有IIS它也可以工作,因为我没有在IIS中配置任何东西,新的ASP.NET项目也可以开箱即用,还可以直接执行该页面的asp页面选项的View in Browser选项。