使用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.Unhorized System.UnhorizedAccessception: 拒絕存取。
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 0on IIS 6) that is used if the application is not impersonating. If the application is impersonating via
. 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