1

I decided to write an administration tool for my ASP.NET 4.0 website that has Membership Capabilities too.

I have the business layer ready for the following activities,

  1. The number of users logging in to the website per day.
  2. Average spend time of the user who is logged in.
  3. Pages accessed by the user who is logged in.
  4. Frequency of the User logins per month.
  5. etc etc. Even though checking the above listed activities is possible by directly peeking in to the Database or Google Analytics, I prefer them to appear them at one place as I have other activities to be followed depending on the data I see from this.

I prefer to use charts (open source jquery charts).

My concern is where should I start building the admin pages like in the exisiting web application as the users accessing or in a separate web application (is this really possible)?

If in a separate web application is possible how could I map the domain to the new web application for admin.

navule
  • 3,212
  • 2
  • 36
  • 54

3 Answers3

1

i just suggest you can create a folder named "Admin". there you create the all implementation

  1. Use Authorization for security of the Admin Portal
  2. Logging

for authorization

add this to your web.config in Admin FOlder. (add-> web.config in admin folder)

<location path="folder">
    <system.web>
        <authorization>
            <allow roles="Admin" />
            <deny users="*" />
        </authorization>
    </system.web
</location>

for the Jquery graph charts use JqPlot

Ravi Gadag
  • 15,735
  • 5
  • 57
  • 83
1

Since you are using the built-in ASP.NET Membership, it'd probably be easiest to just make a sub-folder (like any other folder in your application) called "Admin" or whatever you prefer, and then secure this folder with a web.config file specifically in that folder. You can easily secure the folder either by role or by user.

<system.web>
    <authorization>
        <allow roles="YOURRoles"/>
        <deny users="*"/>
    </authorization>
</system.web>

MSDN Entry

For the charting, one option is Highcharts. There is a .NET library (DotNet.Highcharts) to make it easy to manage Highcharts from the code-behind. I've used it before and thought it was user-friendly.

MikeSmithDev
  • 15,731
  • 4
  • 58
  • 89
0

I'd suggest you create a subfolder in your application domain and work on your administration tool there

It is possible to have two separate web apps in the following manner

  • Two apps do not share code - You can make them access the same database and not share code
  • Two apps share code - You can pack some of your logic into separate projects and make your web apps reference them. All can happen in the same solution file. You can even make your new admin app refer to the original app in the same manner.
  • Two apps share bit of logic - You can expose some of the logic via an API and make the other web app access the API

I'd suggest you just do the first and the easiest option.

Ege Akpinar
  • 3,266
  • 1
  • 23
  • 29
  • suppose my domain is running on 111.111.111.111 how come I access the admin tool said the I have followed your 1st suggestion Two apps do not share code. You are saying that it is possible to have two separate web apps. I think the appdomain is limited to one static ip. Am I missing something. Please do clarify. – navule Jan 22 '13 at 17:11
  • If you have a domain, you can use subdomains (www.mysite.com would go to first web app, admin.mysite.com would go to second web app) Or if you have to stick to using IP's without domain name, then you can use ports 111.111.111.111 would go to first web app, 111.111.111.111:81 would go to second web app (remember, default HTTP port is 80 so 111.111.111.111 is indeed 111.111.111.111:80) You can even have www.mysite.com/admin go to web app 2, even though it's a separate app – Ege Akpinar Jan 23 '13 at 11:37