Click here to Skip to main content
15,920,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Note: Below issue happening in Azure Cloud Service not in Computer Emulator(local).

i have an MVC application (site1-C#.NET-MVC) hosted in Azure using site1 web role into cloud service. i hosted new site (site2-web application-VB.NET) under one cloud service.
Both sites are under one cloud service and running good.
but site2 has a upload file functionality for which i am using LocalResource for which we need RoleEnvironment. site2 not able to place file into LocalResource, upon checking RoleEnvironment.IsAvailable is always FALSE.

To Fix it i have create new role (site2 role) into project and deployed to cloud.
So now i have site1 role(which host site1) and site2 role(which host site2). But still RoleEnvironment.IsAvailable throwing FALSE. :(

i have done remote debugging as well.
site1 -> https -> port:443
site2 -> https -> port:553

Update2: I verified RoleEnvironment.CurrentRoleInstance, it is returning NULL
Updated 29-Feb-16 22:06pm

1 solution


Added correct version on Azure dll in reference.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900