Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8661567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:31:37+00:00 2026-06-12T16:31:37+00:00

I override AuthorizeCore function in mvc for authentication and authorization this working fine when

  • 0

I override AuthorizeCore function in mvc for authentication and authorization this working fine when I call a view form controller. but now i have a view that contain some links for reports i want to show report to users that has access rights. I can hide links of reports but unable to restrict direct url.

fine with this url request [http://MyDomain:1426/Company/Index] but
not goes to authorizecore method when url is : [http://MyDomain:1426/Reports/GrpView?OfferID=1] (because I have no controller for reports)
is there any way in MVC to filter view urls ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:31:38+00:00Added an answer on June 12, 2026 at 4:31 pm

    It’s not very clear what the Reports/GrpView handler that is providing your reporting functionality is. It doesn’t seem to be an ASP.NET MVC controller action as you would have decorated it with the [Authorize] attribute and specified the roles.

    If this is some legacy WebForms page or a handler you could use the <location> section in your web.config to control access:

    <location path="Reports/GrpView">
        <system.web>
            <authorization>
                <!-- deny access to all users -->
                <deny users="*"/> 
    
                <!-- allow access to users in the "admins" role -->
                <allow roles="admins"/> 
            </authorization>
        </system.web>
    </location>
    

    The Authorize attribute (and any custom attributes deriving from it) are intended to be used only to secure access to ASP.NET MVC controller actions. If you are not using ASP.NET MVC for your reporting services you cannot use those mechanisms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add simple Authentication and Authorization to an ASP.NET MVC application. I'm
I override the function getView(), but when debug I found it never be invoked,
protected override Boolean IsValid(String propertyValue) { return !String.IsNullOrEmpty(propertyValue) && propertyValue.Trim().Length > 0; } This
I override ProcessCmdKey() in my MDI parent form class and have some keyboard shortcut
Possible Duplicate: Java: Always override equals? should I override equals function for any class
I'm trying to override a JSP in Liferay 6.1, namely html/portlet/enterprise_admin/settings/authentication.jsp. I have created
im trying to override the add() but it will not compile public class AVLTree<E
@Override public void onClick(View v) { if(v.getId()==R.id.cvp11 && v.getId()==R.id.cvp22 && v.getId()==R.id.cvp32) yc.start(); else if(v.getId()==R.id.cvp12
I'm confused on ASP.NET MVC caching and authorization and in dire need of some
In ASP.NET MVC, I would like to somehow do custom authorization using the MvcSiteMapProvider.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.