程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> .NET實例教程 >> ASP.NET 拒絕訪問

ASP.NET 拒絕訪問

編輯:.NET實例教程
     使用MICROSOFT的com組件編寫插入數據到Excel然後再下載到客戶機本機程序,在開發時測試通過,上傳到WIN2000服務器上後出現如下錯誤:
   Server Error in '/Webqr' Application.
  --------------------------------------------------------------------------------
  拒絕訪問。
  Description: An unhandled exception occurred during the execution of the current web request. Please revIEw the stack trace for more information about the error and where it originated in the code.
  
  Exception Details: System.UnauthorizedAccessException: 拒絕訪問。
  
  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 write 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.
  
  由於本機測試的時候就出現這種情況,在網上查找解決方法,嘗試解決的方法如下:
  1。提高IIS_USER的權限,將IIS_USER加入ADMINISTRATOR,個人覺得這樣做有安全風險,故不采用
  2。在開始-》運行 輸入dcomcnfg配置,Excelcom文件的安全性權限,編輯啟動權限,配置權限
  修改完成後出現錯誤
   Server Error in '/Webqr' Application.
  --------------------------------------------------------------------------------
  Object reference not set to an instance of an object
  
  http://www.cnblogs.com/sherry/archive/2006/07/25/459248.Html 
  
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved