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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:21:02+00:00 2026-05-31T18:21:02+00:00

This is my first azure project and I’m not sure if I’m doing something

  • 0

This is my first azure project and I’m not sure if I’m doing something wrong.
I’m trying to get some configuration inside an MVC 3 webrole and for this I’m using:

RoleEnvironment.GetConfigurationSettingValue(KeyName)

When I run the application on the emulator i get his error:

BC30451: 'RoleEnvironment' is not declared. It may be inaccessible due to its protection level.

I tried to add the full namespace like this:

Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(KeyName)

And I get this error:

BC30456: 'ServiceRuntime' is not a member of 'WindowsAzure'.

However, I can access the RoleEnvironment inside the “OnStart” event of the WebRole class.
So, is it the expected behavior? If yes, how am I supposed to read configuration through the whole project?

Thanks in advance;

  • 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-31T18:21:04+00:00Added an answer on May 31, 2026 at 6:21 pm

    I started a new solution based on seanost suggestion and it worked well, so I figured the problem wasn’t VS. After a few try and errors I finally found a solution, I just don’t have an explanation for it 🙂

    Under my MVC project I have a folder called “App_Code”.
    Since i come from web forms development I’m use to the name so I created this folder to keep some classes. If I try to access “RoleEnviroment” from a class inside this folder the project compiles but won’t even open, no matter what I try to access it will throw the same error.

    If I rename the folder or move the files to another folder (let’s say “Code”), it just works.
    As I said before, I just don’t know why it happens (and it doesn;t really matter now 🙂

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

Sidebar

Related Questions

Some background.... We're venturing into Azure for the first time and are trying to
I'm trying to write my first Azure application with Visual Studio 2008. Whenever I
I have string like this first#second, and I wonder how to get second part
I have MVC project on Windows Azure. This project has WebRole with method OnStart.
I was reviewing the Exercise 1: Building Your First Windows Azure Application inside the
Ive just activated my Azure account, created ny first Asp Mvc 3.0 project (just
I have followed this tutorial to create the first azure application http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010 Because after
I try change identity for application pool on Windows Azure. My project uses this
I've just migrated and deployed my first Azure Web Role this week and now
This first bit works: $my_id = 617; $post_id_7 = get_post($my_id); $title = $post_id_7->post_excerpt; echo

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.