VS2005-SQL2005 üzerinde problemsiz olarak çalışmakta olan Reporting Services projem, bir sabah gelip projemi açmak istediğimde çalışmamaya karar verdi. Hem tarayıcıda hem VS içerisinde şu hata ile karşılaşıyordum:

Event code: 3005 
Event message: An unhandled exception has occurred.
Event time: 22.02.2010 15:44:47
Event time (UTC): 22.02.2010 13:44:47
Event ID: 0e75e77490de4d3f8f881f3f3c94afd0
Event sequence: 20
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT/XYZ-1-129113197812168356
Trust level: Full
Application Virtual Path: /XYZ
Application Path: D:\Projeler\XYZ\
Machine name: JERRY

Process information:
Process ID: 5804
Process name: w3wp.exe
Account name: IIS APPPOOL\ASP.NET V2.0

Exception information:
Exception type: COMException
Exception message:

Request information:
Request URL: http://localhost/XYZ/Proposals/ProposalInfo.aspx?PROPOSALID=538
Request path: /XYZ/Proposals/ProposalInfo.aspx
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: ADV\xxx.yyyy

Thread information:
Thread ID: 6
Thread account name: ADV\xxx.yyyy
Is impersonating: False
Stack trace: at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods()
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname)
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters)
at General.PrepareBarcode(ReportViewer rptBarcode, String symbology, String codeText) in d:\Projeler\XYZ\App_Code\General.cs:line 336
at Barcode.DrawBarcode() in d:\Projeler\KSL-LMS-CRM\LAB_CRM\Barcode.ascx.cs:line 46
at Barcode.set_CodeText(String value) in d:\Projeler\XYZ\Barcode.ascx.cs:line 28
at Proposals_ProposalInfo.GetDetails(Int64 proposalid) in d:\Projeler\XYZ\Proposals\ProposalInfo.aspx.cs:line 257
at Proposals_ProposalInfo.Page_Load(Object sender, EventArgs e) in d:\Projeler\XYZ\Proposals\ProposalInfo.aspx.cs:line 72
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at SecurityGuard.OnLoad(EventArgs e) in d:\Projeler\XYZ\App_Code\SecurityGuard.aspx.cs:line 79
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Uzun süre Google'dan medet umdum ancak birebir bu hatayı alan hiç bir soruya rastlayamadım. Okuduğum ilgisiz bazı makaleler ve hatanın olduğu satırdaki metot adından da yola çıkarak (GetSecureMethods), sorunun bir yetkilendirme sorunu olabileceğini düşündüm. Web.config dosyamda ise gerekli impersonation bilgisi bulunuyordu ve şifreler/adlar doğruydu.

Eğer tanımlamalar tamamsa ve impersonation çalışmıyorsa sorunun WMI'da olabileceğini düşündüm. Aşağıdaki iki satır ile winmgmt servisini durdurup/başlattım.
net stop winmgmt
net start winmgmt


Ve tadaaa. Hem projem açılıyor hem da tarayıcıda düzgün görüntüleniyor :)

Kısacası; eğer yetkilerinizden eminseniz (her zaman olmayın, ben akşam çalışan sabah çalışmayınca emin olabildim) ve impersonation ayarlarınız da doğruysa ve hala yetki problemleri yaşıyorsanız, sorununz WMI olabilir. Ya bir bilgisayar restartı yada WMI servisini baştan başlatmak sorununuzu çözebilir...

Copyright Ali INAL ©2009 - Creative Commons Licence
preload preload preload

Taşındık!


Ali's Surprisingly Web blog'u, artık yeni, güçlü ve daha esnek altyapısıyla yeni adresinden yayın yapıyor. Yeni adresimiz: http://surprisingly.web.tr. Bu eski blog sayfalarındaki bütün içerik, yeni blog altyapısına da taşındı. Arzu ederseniz sizi yeni blog'umda ağırlamak isterim.
Yeni blog'a gitmek istiyorum Bu sayfayı okumak istiyorum

We've Moved!


Ali's Surprisingly Web Blog is now serving from a new, stronger and flexible system with a brand new address. Our new address: http://surprisingly.web.tr. Also we've migrated all old content from this blog to our new blog. If you wish, I want to welcome yo to my new blog.
I want to visit new blog I want to stay and read this page