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 7859029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:44:24+00:00 2026-06-02T21:44:24+00:00

I have an MVC3 application that uses the standard accountcontroller that comes with visual

  • 0

I have an MVC3 application that uses the standard accountcontroller that comes with visual studio to authenticate users.

I want to share specific parts of my program with people, much like google shares documents in google docs when you do that via email; in other words I don’t want to give anyone access to the pages (In which case I could just remove the Authorize attributes) but I do want users to share pages based on a url with a hash in it, and have them skip the login.

I think I would like to generate the hash based on a page and link it to an anonymous user, which would then have to be auto-logged in if the hash is correct

How would I do that?

  • 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-02T21:44:27+00:00Added an answer on June 2, 2026 at 9:44 pm
    1. Create a table in database with shared pages information(controller, action, documentId, hash, expiresAt, etc)
    2. Override Authorize attribute and in OnAuthorizationvalidate url params in your database.
        public class SharedAuthorize:AuthorizeAttribute  
        {  
            public override void OnAuthorization(AuthorizationContext filterContext)
            {  
                var documentHash = int.Parse(filterContext.RouteData.Values["hash"].ToString());
                if (!HashRepository.CanWeRead(documentHash,controller, action, documentId))
                {
                    return false;
                }
                return true;
            }
        }
    
    

    This is just an idea=))

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

Sidebar

Related Questions

I have a pretty standard .NET MVC 3 application that uses Ninject for dependency
i have created an mvc3 web application that uses forms based authentication. one part
In my MVC3 application, I have a queries class specific to each controller that
MVC3 VB.NET Razor view Application... I have a view that uses a for each
I have developed a MVC3 application in that I want use the Check boxlist
I have a simple MVC3 application that I want to retrieve some configuration details
I have an ASP.NET MVC 3 application that uses the Ninject.MVC3 extension to setup
I have a ASP.NET MVC3 application that handles time-consuming processes (copying a large file
I used to have a standard ASP.NET MVC 3 application that was Ninject-wired via
I have an MVC3 application that has a custom HandleErrorAttribute so that I can

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.