我写了个读取文件的源代码,代码没有错,因为我用vs内置服务器看了,很正常,但是我用iis看,就出现了这样地问题。 Exception Details: System.UnauthorizedAccessException: Access to the path 'E:\ztx\website\File\abce.txt' is denied. 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 impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access. 
代码如下: FileStream aFile = null; 
aFile = new FileStream(@"E:\ztx\website\File\abce.txt",FileMode.Open); 
Response.Write("Ol");