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

  • SEARCH
  • Home
  • 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 994171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:32:14+00:00 2026-05-16T06:32:14+00:00

It’s most common practice to register routes in Application_Start event within global.asax.cs/vb file. But

  • 0

It’s most common practice to register routes in Application_Start event within global.asax.cs/vb file. But you need to have access to this file to do so. Fine.

I either don’t have or don’t want to. I’m trying to integrate Asp.net MVC application into a Sharepoint 2010 site and don’t want to create my custom global application class that would also register routes for me and change the Sharepoint’s Global.asax file and put a different class definition in it. My application wouldn’t be accepted because I would be doing unsupported things to Sharepoint.

I was wondering if it was possible to register routes some place else then? There are two alternatives that first popped into my mind:

  1. Write an HttpModule and abuse application start event as well. This way I would inject application start event code without mangling with global.asax that I can’t access. Adding another HttpModule in web.config is something I can do.

    Note: Application-level events are not accessible in modules. Bummer. They can only access request-level events.

    Important: … or so I thought. If you check accepted answer it’s actually possible to handle application-level start event. Indirectly and reliably it is possible.

  2. Write an HttpModule and abuse some other event like request start. Of course I would also have to keep some data somewehere that my routes have already been registered and that registration would happen only the first time round.

Are there any better ways/places to register routes?

  • 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-05-16T06:32:14+00:00Added an answer on May 16, 2026 at 6:32 am

    Catching Application Start event in an HttpModule is possible

    If you check my other question you will see this is easily possible. I’ve done it afterwards and I can assure you it works.

    I’ve also blogged about this feature… Twice:

    • Writing a custom IHttpModule that handles Application_OnStart event
    • How to correctly use IHttpModule to handle Application_OnStart event
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
This could be a duplicate question, but I have no idea what search terms
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I need to clean up various Word 'smart' characters in user input, including but
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.