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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:42:07+00:00 2026-05-16T08:42:07+00:00

I have written a VERY simple MVC application which just displays a single string

  • 0

I have written a VERY simple MVC application which just displays a single string from a Resource file. It works just fine on my local machine but when I deploy the project to the web server I get the error.

CS0103: The name ‘Resources’ does not
exist in the current context

You can very easily replicate exactly what I am doing in just 10 steps!

  1. Create a New MVC 2 Web Application.
    (File->New->Project->ASP.NET MVC 2 Web Application, say no to the Unit Testing Project)

  2. Add the “App_GlobalResources” folder.
    (right click the project and select Add->Add ASP.NET Folder->App_GlobalResources)

  3. Add a Resource File to this folder.
    (right click the folder and select Add->New Item…->Resources File. Name it Strings.resx)

  4. Add a single string to the Resource table.
    (Name = “HelloWorld”, Value = “I localized Hello World!”)

  5. Set the File Properties for the Resource File.
    (Click the file Strings.resx and int the Properties window set Build Action = “Embedded Resource” and the CustomTool = “PublicResXFileCodeGenerator”)

  6. Add a new Controller
    (Right click the Controllers folder and select Add->Controller… Name it HelloWorldController.cs)

  7. Add a the View
    (With the cursor in the Index method of the HelloWorldController.cs Press CTRL-M-V. Use the default values including View name = “Index”)

  8. Modify the View so that it displays our string from the resource file.
    Replace the content of the MainContent placeholder with

    <h2><%: Resources.Strings.HelloWorld %></h2>
    
  9. Run it locally to test that it works. Which it should.

  10. Publish it to a web server and visit the url “http://localhost/HelloWorld“

This is where I see the error described at the top.

I would imagine that the settings I’ve put on the ResX file are incorrect and the resource is not published to the server.

Help is greatly appreciated.

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-05-16T08:42:08+00:00Added an answer on May 16, 2026 at 8:42 am

    Ah ha! Figured it out. In LARGE part to this article:
    http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx

    Sounds like the App_GlobalResources folder is NOT cooperative with MVC. So I moved my ResX file to a new folder
    ~/Resources/Strings/Strings.resx

    This along with 1 minor change to set the File Property
    Custom Tool Namespace = Resources

    and Problem Solved!

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

Sidebar

Related Questions

I have written very very simple console application which supports some command line options.
I have written a very simple application to update my twitter status on a
I have written a very simple application tha accepts batches of telemetry log rows
I have a very simple DLL written in unmanaged C++ that I access from
I have written a very simple Java application. Can anyone tell me how to
Very simple question I am sure. I have a file called ACLReader.vbs which I
Background I have written very simple BBCode parser using C# which transforms BBCode to
I've written a very simple python numpy code. It have a strange behavior... from
I have written a relatively simple Java App Engine application which I would like
I have written a very simple bash script to help me migrate from dev

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.