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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:48:29+00:00 2026-06-15T21:48:29+00:00

I have been trying to set a custom resourceProviderFactory at the web.config file but

  • 0

I have been trying to set a custom resourceProviderFactory at the web.config file but its always ignored, my web.config file looks like the following

<globalization culture="auto" resourceProviderFactoryType="MyProject.CustomResourceFactory, MyProject"></globalization>

My CustomResourceFactory class is never fired, setting a breakpoint at the constructor is never reached.

Misspelling the class name in the globalization section does not raise any exceptions, is that normal ?

I’ve tried this in more than one project (thinking that the project I’m working on is misconfigured or something) but the same results.

I’m using C# asp.net MVC3,

Does anyone have a clue why this happens, and is there a way to change the ResourceProviderFactory at runtime ?

Thanks.

  • 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-15T21:48:31+00:00Added an answer on June 15, 2026 at 9:48 pm

    I ran into the same issue, and didn’t quite understand your comment on the first answer. Now that I’ve solved it I do, but I thought I’d elaborate for anyone else.

    http://publicityson.blogspot.ca/2010/11/aspnet-mvc-razor-view-engine-and.html

    He created helpers to call his custom resources as the razor requirement of calling
    ViewContext.HttpContext.GetGlobalResourceObject(classKey, resourceKey) in the view is really long, which resulted in something like:

    public static class CommonHtmlExtensions
    {
        public static object GetGlobalResource(this HtmlHelper htmlHelper, string classKey, string resourceKey)
        {
            return htmlHelper.ViewContext.HttpContext.GetGlobalResourceObject(classKey, resourceKey);
        }
        //several other methods.
    }
    

    Allowing him to use @Html.GetGlobalResource("CommonText", "Some_ResourceKey") in a razor view.

    Also very useful to keep things strongly typed and usable in dataannotations, the link below shows how to use T4 templates to create constants for every resource item in your database.
    http://carrarini.blogspot.ca/2010/08/localize-aspnet-mvc-2-dataannotations.html

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

Sidebar

Related Questions

I have been trying to set AlarmManager for Specific date, but it is not
I have been trying to build a user control with some custom properties set
I have been trying to set up Eclipse and the Arduino libraries. I have
I have been trying to set the scroll of my page to a certain
I have been trying to set the value of a hidden input by using
For while I have been trying to set the Page Scaling of Excel page
for around 5 consecutive days i have been trying to set up my computer
I have been trying out the MoreLikeThis Bundle to bring back a set of
trying to display data only after variables have been set. $(document).ready(function () { function
Have been trying to encrypt an xml file to a string so that 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.