This is a migrated thread and some comments may be shown as answers.

[Solved] Q1 2012: menu has problem with customs authorization filters issue

8 Answers 79 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 20 Feb 2012, 06:05 AM
Hi Telerik support team,

In my project I using telerik menu and create a custom AuthorizeAttribute, in my customs I override method HandleUnauthorizedRequest to hand unauthorized accept from client request and It work fine on version Telerik 2011.3.1115. but when I upgrade to new version telerik 2012.1.215.40 It get a issues at function "HandleUnauthorizedRequest" and if I comment that function it work as well, and after i try uncomment code in that function without my code, the function have only command as below:

 

protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext)

{
base.HandleUnauthorizedRequest(filterContext);
}

but it still get error, and see below for detail error:

2012-02-17 16:13:33,666 [10] ERROR WFS.WebScheduler.Web.MvcApplication Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.
System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. ---> System.Web.HttpException (0x80004005): Execution of the child request failed. Please examine the InnerException for more information. ---> System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
   at WFS.WebScheduler.Web.Helpers.WebSchedulerAuthorizeAttribute.HandleUnauthorizedRequest(AuthorizationContext filterContext) in E:\Work\Projects\Waveform System\Wip\SourceCode\WaveFormSystems\WFS.WebScheduler.Web\Helpers\WebSchedulerAuthorizeAttribute.cs:line 56
   at System.Web.Mvc.AuthorizeAttribute.OnAuthorization(AuthorizationContext filterContext)
   at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerAuthorization.IsAccessibleToUser(RequestContext requestContext, String controllerName, String actionName, RouteValueDictionary routeValues) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\Infrastructure\Implementation\ControllerAuthorization.cs:line 75
   at Telerik.Web.Mvc.Infrastructure.Implementation.NavigationItemAuthorization.IsAccessibleToUser(RequestContext requestContext, INavigatable navigationItem) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\Infrastructure\Implementation\NavigationItemAuthorization.cs:line 38
   at Telerik.Web.Mvc.UI.NavigationItemContainerExtensions.WriteItem[TComponent,TItem](TItem item, TComponent component, IHtmlNode parentTag, INavigationComponentHtmlBuilder`1 builder) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\NavigationItemContainerExtensions.cs:line 29
   at Telerik.Web.Mvc.UI.NavigationItemContainerExtensions.<>c__DisplayClass5`2.<WriteItem>b__1(TItem child) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\NavigationItemContainerExtensions.cs:line 58
   at Telerik.Web.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\Extensions\EnumerableExtensions.cs:line 61
   at Telerik.Web.Mvc.UI.NavigationItemContainerExtensions.WriteItem[TComponent,TItem](TItem item, TComponent component, IHtmlNode parentTag, INavigationComponentHtmlBuilder`1 builder) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\NavigationItemContainerExtensions.cs:line 58
   at Telerik.Web.Mvc.UI.Menu.<>c__DisplayClass4.<WriteHtml>b__3(MenuItem item) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\Menu\Menu.cs:line 171
   at Telerik.Web.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\Extensions\EnumerableExtensions.cs:line 61
   at Telerik.Web.Mvc.UI.Menu.WriteHtml(HtmlTextWriter writer) in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\Menu\Menu.cs:line 171
   at Telerik.Web.Mvc.UI.ViewComponentBase.ToHtmlString() in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\ViewComponentBase.cs:line 215
   at Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.ToHtmlString() in f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\ViewComponentBuilderBase.cs:line 154
   at Telerik.Web.Mvc.{Dynamic}.MenuBuilder.IHtmlString.ToHtmlString()
   at System.Web.HttpUtility.HtmlEncode(Object value)
   at ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in e:\Work\Projects\Waveform System\Wip\SourceCode\WaveFormSystems\WFS.WebScheduler.Web\Views\Shared\Site.Master:line 24
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Control.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.Mvc.ViewPage.ProcessRequest(HttpContext context)
   at ASP.views_scheduler_index_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b1acf060\61198aa6\App_Web_zf52w2sy.1.cs:line 0
   at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass1.<ProcessRequest>b__0()
   at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.<Wrap>b__3()
   at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
   at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
   at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap(Action action)
   at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.ProcessRequest(HttpContext context)
   at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
   at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
   at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)
   at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
   at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
   at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext)
   at System.Web.Mvc.WebFormView.RenderViewPage(ViewContext context, ViewPage page)
   at System.Web.Mvc.WebFormView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
   at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   at System.Web.Mvc.Controller.ExecuteCore()
   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
   at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
   at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

Is the any deferrent change in new version telerik impact on it??

Thanks,

,

 

 

 

8 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 21 Feb 2012, 05:16 PM
Hello Robert,

 
This is not a known issue. From Q1 2012 (2012.1.214) release of Telerik Extensions for ASP.NET MVC uses OnAuthorization instead of AuthorizeCore method. I will need a test project to review the issue locally.

Kind regards,
Georgi Krustev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Reid
Top achievements
Rank 2
answered on 10 Mar 2012, 08:23 PM
Hello Georgi,

I am also getting this error with the last release, I updated today.  I also got the griffin error in 2011.3.1306.

It appears to be related to the open source at codeplex:
https://telerikaspnetmvc.svn.codeplex.com/svn/2011.Q2.712/Source/SharedFiles/SourceTfsSync.txt

Thanks,
Reid
0
Georgi Krustev
Telerik team
answered on 15 Mar 2012, 05:09 PM
Hi,

 
It seams that I have overlooked the stack trace. This is not a known issue. We will need a test project, which replicates the problem in order to proceed with the investigation.

Regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Reid
Top achievements
Rank 2
answered on 15 Mar 2012, 06:23 PM
Ok I wil try that.  In the meantime a screen shot should be sufficient I would hope?  Showing the dialog prompting you for the source file at runtime?  It appears to be tied to the GridModel class.

Thanks,
Reid
0
Georgi Krustev
Telerik team
answered on 20 Mar 2012, 09:44 AM
Hello Reid,

 
You can post the screen shot, but I am not sure if it will be sufficient to determine what cause the issue. If we cannot find out what cause the problem we will need a test project to proceed with the investigation.

Kind regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Reid
Top achievements
Rank 2
answered on 20 Mar 2012, 03:52 PM
Georgi,

Here is a screenshot from the application that is sending exceptions in email to me compliments of ELHAH.  I have seen this at rtune where it copes up with a dialog asking for the source.  But here you can see it bubbling from an f: drive location.

Thanks,

Reid
0
Georgi Krustev
Telerik team
answered on 23 Mar 2012, 09:40 AM
Hello Reid,

 
From what I can see, the problem is related with the global resouce files of the grid. Did you update them to the latest one provided in the App_GlobalRecources folder.

Regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Reid
Top achievements
Rank 2
answered on 23 Mar 2012, 01:25 PM
Georgi,


I did not know that those files are required.  My solution did not have that folder with those contents.  I mirrored that into the solution, hopefully that is what it needed.  If I don't post back then it worked.

Thanks,
Reid
Tags
Menu
Asked by
Robert
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Reid
Top achievements
Rank 2
Share this question
or