1

Im writing a web app using C# with ASP.NET 4.5/Entity as a backend. With Angular.js handling most of the front-end/database query stuff. ASP.NET 4.5 makes it really easy to connect to our active directory using windows authentication.

However will I run into problems when I scrap all the razor templates, and replace it with regular HTML/CSS and angular scripts. All I really need the active directory stuff for is to create permission for who can pull what file from our database.

Im pretty new to web apps, so far ive like the entity framework alot, but if you guys know a more efficient way (better back end) to do this feel free to tell me.

My app basically needs to allow users to upload spreadsheets and videos, search for them, and only allow access to users that are in certain AD groups.

2 Answers 2

4

We solved this problem by using MVC to render the HTML templates. In your controller or directive set the templateUrl to an action which does whatever logic is necessary to render the template for that user. Also, be sure to check user permissions in your AJAX calls.

Sign up to request clarification or add additional context in comments.

Comments

-4

Figured it out. Made a new web api controller

then added this function

        public string getUser()
    {
        return User.Identity.Name;
    }

haha that was easy.

However if anyone sees any errors i may run into doing it this way. Please point em out

1 Comment

this is not a secure method. Anyone can read the username and use it to query your site

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.