Ask a questionAsk a question
 

QuestionIssue with VS Tools ( May CTP)

  • Monday, June 01, 2009 12:29 PMvenkatMreddy Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I was able to debug and run my app pretty smoothly before. Morning i had a notification that new CTP is available, Do u want to update?

    i just said Yes. Then onwards, if F5 i got this messaged.

    In VS, Status:  waiting for service deployment  then messagebox with

    "Role instances did not start with in the time allowed. Please try again. If you continue to encounter this problem try shutting down the Development Fabric."

    i tried shutting down fabric/machine, everytime I'm getting the same.

    please help

    Thanks,
    Venkat


All Replies

  • Monday, June 01, 2009 12:47 PMBrentDaCodeMonkey Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Double-check the solution's startup project. Make sure its still set to the cloud services project and not the individual web or worker roles.

  • Tuesday, June 02, 2009 1:38 AMMichael Hart Hotmail Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I had exactly the same problem - it seems there's an issue with the development fabric only attaching to web roles after Application_Start has completed (or something like that).

    In my case, I was getting exceptions during my app initialisation as I needed to be running in full trust - I hadn't had an issue with this previously. Adding enableNativeCodeExecution="true" to my web role fixed the problem for me.


    If this isn't the problem you're having, I'd check the Windows Event Viewer for any exceptions you might be getting. And perhaps star this issue:


    Hope that helps,

    Michael
  • Thursday, June 04, 2009 12:13 AMBrian Howden Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Chalk me up as another "I have the exact same problem".  My app worked in dev with the March build.  I upgraded to the May ctp and get the same issues as this thread.  enableNativeCodeExecution="true" did not make any difference for me.  I have uninstalled and reinstalled VS 2008, sp1, the Azure toolkit and SDK, SQL Server, and SP1 of Vista but none of it makes any difference.  On the last reinstall I followed the script at:
    http://blogs.msdn.com/edunhill/archive/2009/05/19/getting-started-with-azure-1.aspx as closely as I could.  The only difference was I was using Vista so the .NET framework shows up in the windows programs as .NET 3.0 and I am using the dev version of SQL server 2008 but the DSINIT worked fine.

    If I hadn't seen it working under the March CTP I wouldn't have believed it ever worked!  Isn't anybody else having the same issue?

    Brian
  • Thursday, June 04, 2009 2:14 AMMichael Hart Hotmail Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Brian - do you see any possibly related exceptions in Visual Studio's Output console, or the Windows Event Viewer?

    I still think this is an issue to do with Application_Start - if an exception is thrown, or a break point is set, etc - if Application_Start doesn't return, this alert is displayed (and the fabric will shutdown).
  • Thursday, June 04, 2009 4:30 PMPita.O Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I made two installations last night, and both were flawless:

    In one case, I use 64-bit Vista SP2 and Visual Studio 2008 SP1. I successfully installed the MayCTP upgrade over the MarchCTP but before doing that, I first followed the process for applying those 3 hotfixes listed on the download page  here .

    In the second case, I use 32-bit Windows 7 RC and VS 2010 Beta. I successfully installed a clean copy of MayCTP

    Pita.O: http://www.arizentax.com/
  • Thursday, June 04, 2009 4:48 PMBrian Howden Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I was actually using Windows 7 with the March ctp and it ran fine locally but I was having trouble deploying to the cloud.  On the theory that I should be trying with supported products I did a clean Vista / VS 2008 install.  The May ctp came available the same day so I used it and that is when my problems started.  The output window in VS gives the following:

    CCT: Warning: enableNativeCodeExecution has been enabled for role 'WebRole' on a 32-bit workstation. The use of native code execution features such as P/Invoke may require migration to 64-bit to work correctly as Windows Azure Hosted Services run in a 64-bit environment. See http://go.microsoft.com/fwlink/?LinkId=145047 for details.

    CCT: Role instances did not start within the time allowed. Please try again. If you continue to encounter this behavior please try shutting down the Development Fabric.

    The event viewer shows:

    An unhandled exception occurred and the process was terminated.

    Application ID: /LM/W3SVC/1/ROOT

    Process ID: 2508

    Exception: Microsoft.ServiceHosting.ServiceRuntime.RoleException


    The details pane of the event viewer shows:

    An unhandled exception occurred and the process was terminated. Application ID: /LM/W3SVC/1/ROOT Process ID: 2508 Exception: Microsoft.ServiceHosting.ServiceRuntime.RoleException Message: Role Start Failed StackTrace: at Microsoft.ServiceHosting.ServiceRuntime.RoleManager.StartRole() at Microsoft.ServiceHosting.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.StartRole() at Microsoft.ServiceHosting.ServiceRuntime.Implementation.Loader.RdRuntimeBootstrapper.StartRoleUnderRdRoleRuntime(Object o) at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj) InnerException: System.Security.SecurityException Message: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. StackTrace: at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Environment.GetEnvironmentVariable(String variable) at Microsoft.ServiceHosting.ServiceRuntime.Internal.RuntimeCommon.GetRoleEntryPointProxyFactory(String& data) at Microsoft.ServiceHosting.ServiceRuntime.Internal.RuntimeCommon.GetEntryPoint(Boolean isWebRole) at Microsoft.ServiceHosting.ServiceRuntime.Internal.WebRoleMain.RoleRoot.Initialize() at Microsoft.ServiceHosting.ServiceRuntime.RoleManager.StartRoleInternal() at Microsoft.ServiceHosting.ServiceRuntime.RoleManager.StartRole()


    This all backs up your theory but so far I don't have any ideas why it is throwing the exception.

    Thanks for the thoughts.

    Brian

  • Thursday, June 04, 2009 11:47 PMMichael Hart Hotmail Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Any way to narrow down which part of your Application_Start is throwing the exception (assuming it is in Application_Start)?

    I ended up just commenting things out until it worked and then worked backwards.

    (Edit: Also, just in case you haven't yet - if you've got any worker roles, set enableNativeCodeExecution for them too - it may be that RoleEntryPoint.Start suffers from the same problem as Application_Start)
  • Friday, June 05, 2009 12:00 AMBrian Howden Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    At the moment, I created a new Azure project and selected the Web Cloud Service template, Inserted hello world between the div statements in the aspx file and hit F5.  When that failed, I edited the ServiceDefinition config file to set the native code exectution to true but it didn't make any difference.  Which file is the Application_Start in?  The only role at the moment is the one running the aspx file.

    Brian
  • Friday, June 05, 2009 1:07 AMMichael Hart Hotmail Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hmmm, right - I didn't realise it was happening for you with such a simple template. Application_Start is usually in Global.asax.cs, but you may not even have that file in such a simple app.

    The only thing I can think of would be that it's a permissions problem somewhere, but I don't know enough about Azure to really speculate where. Are you running Visual Studio as Administrator? If not, that may help.
  • Friday, June 05, 2009 4:06 PMBrian Howden Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Re Admin.  Yes.  It squwaks if you select an Azure project without admin rights.  I am assuming it is something pretty stupid but I am not sure what.  I guess the next step is to try one of the prebuilt virtual machines MS supplies with a trial license of VS.

    Brian
  • Monday, June 08, 2009 12:13 AMWally McClureMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I just started getting this error when I pointed my app to run against the local data store.  I've tried all of the suggestions.  any one have any other suggestions?

    I'm not even getting to my application_onstart event.  I've got a break point in my first executable line.

    FYI, I cleaned up my web.config file and removed a couple of unused sections that I had put in.  Once I did that, the problem went away.  I'm able to debug again.  Yippee.

    Wally

    MVP in ASP.NET - ASPInsider - Author - Otherwise I am a loser.
  • Tuesday, June 09, 2009 10:36 AMijharkin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a work-around which may help some people with this error message, from studying the Cartrackr cloud app.
    http://blog.maartenballiauw.be/post/2008/12/09/Track-your-car-expenses-in-the-cloud!-CarTrackr-on-Windows-Azure-Part-1-Introduction.aspx
    which kept working when everything else broke in the May CTP

    In global.asax remove all code from

    Application_Start

    and move your data store initialising code to
    Application_BeginRequest

     

    I tried this after all the suggestions above failed, but they were still applied to my code
  • Thursday, June 18, 2009 8:12 PMJohn Ngo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You will get this error if Windows Communication Foundation HTTP Activation and ASP.NET are disabled.  Make sure these Windows Features are enabled.  It shows you how to do so here:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=11b451c4-7a7b-4537-a769-e1d157bad8c6&displaylang=en


    • Edited byJohn Ngo Thursday, June 18, 2009 8:14 PM
    •  
  • Friday, June 19, 2009 6:03 PMRomb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You will get this error if Windows Communication Foundation HTTP Activation and ASP.NET are disabled.  Make sure these Windows Features are enabled.  It shows you how to do so here:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=11b451c4-7a7b-4537-a769-e1d157bad8c6&displaylang=en


    It doesn't help. I installed May CTP keeping those instructions and checked them in Windows Vista features again - they're on.
    However the error persists.
  • Monday, June 22, 2009 2:45 AMSparkCode Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is there any fix for this ? This is a highly annoying error that is significantly affecting our project ?

    The startup build time on the project takes 4-5 minutes on local environment - if it starts at all - making it virtually impossible to work?

    This comment

    I was also getting the same problem - it seems it was to do with a linked DLL requiring full trust, and this DLL was being loaded during Application_Start - the only way I realised this was throwing an exception was by looking at the Event Viewer as there was no other output.

    Adding enableNativeCodeExecution="true" to my web role fixed the problem for me - but this was a totally non-obvious solution, so it would be good if this issue could be fixed.

    Makes absolutely no difference for me ?
  • Tuesday, June 23, 2009 2:09 AMSparkCode Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Does anyone from MSFT have a answer to this ? 

     Currently - project has this: 

    1. When I start project without debugging I get errors (I get yellow screens of death) without details to identify the problem.
    2. When I start with debugging to break on line with error I get azure sdk exception:
       Role instances did not start within the time allowed.  Please try again.  If you continue to encounter this behavior please try shutting down the Development Fabric.

    There must be a fix to this ? Really appreciate some help ?
  • Wednesday, June 24, 2009 9:32 PMJim NakashimaMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Very sorry for the inconvenience -- we are trying to isolate a repro and debug the issue.  More to come.
    Jim Nakashima, Microsoft. (This post is provided "as-is")
  • Wednesday, July 01, 2009 10:05 PMaggieben Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    I had exactly the same problem - it seems there's an issue with the development fabric only attaching to web roles after Application_Start has completed (or something like that).

    In my case, I was getting exceptions during my app initialisation as I needed to be running in full trust - I hadn't had an issue with this previously. Adding enableNativeCodeExecution="true" to my web role fixed the problem for me.


    If this isn't the problem you're having, I'd check the Windows Event Viewer for any exceptions you might be getting. And perhaps star this issue:


    Hope that helps,

    Michael

    I tried this, but to no avail.  Here's the full record from the event log:

    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 7/1/2009 4:57:50 PM 
    Event time (UTC): 7/1/2009 9:57:50 PM 
    Event ID: 66d143ee7f674eeb9ca97f0c3c69c723 
    Event sequence: 4 
    Event occurrence: 1 
    Event detail code: 0 
     
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT-1-128909590695579972 
        Trust level: RdTrust 
        Application Virtual Path: / 
        Application Path: C:\Users\Ben\Development\<snip>\Projects\WellDone\Azure WellDone\WellDoneCloudService\bin\Debug\WellDoneCloudService.csx\roles\Web\ 
        Machine name: ANAKIN 
     
    Process information: 
        Process ID: 7952 
        Process name: RdRoleHost.exe 
        Account name: Anakin\Ben 
     
    Exception information: 
        Exception type: HttpException 
        Exception message: The underlying connection was closed: An unexpected error occurred on a send. 
     
    Request information: 
        Request URL: http://127.0.0.1:5100/do.__rd_runtime_init__?shutdownEvent=1B8FBE2B70-D19F-4050-A641-8273CB5666081D 
        Request path: /do.__rd_runtime_init__ 
        User host address: 127.0.0.1 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: Anakin\Ben 
     
    Thread information: 
        Thread ID: 7 
        Thread account name: Anakin\Ben 
        Is impersonating: False 
        Stack trace:    at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
     
     
    Custom event details:


    I've tried everything I can find.  The above suggestions didn't help anything.  I can open the fabric UI and see the Web Role trying to start, but it just goes from a start state to a stop state with no other information printed to the log.  I've double checked that the IIS7 components required by the fabric were installed, and I've explicitly started both the fabric, the storage service, and VS2008 as administrator.

    I get nada.  If it's of any use to anyone, I'm trying to write a MVC web role project that hits the table storage as done in the chanel9 video of the PDC2008 deep dive on table storage.
    ben
  • Wednesday, July 01, 2009 10:30 PMaggieben Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Finally discovered the issue.  In the PDC2008 video, it appeared at first to me that the demo web role was referencing a local storage service, when in fact it was hitting the real storage service.

    I amended my web.config to refer to the storage service at 127.0.0.1 using the documented local storage account and key, and all worked as expected.


    ben
  • Thursday, July 16, 2009 8:16 AMCheryl Simpson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Just thought I'd throw this one out.  I was having the same problem.  My app was working fine until one change, then it wouldn't get past the stupid 'Role Init' bug.  I realized that when I added a new event handler for handling JSON connections using AJAX, I copied and pasted the new entry.  While I did change the class it was pointing to, I forgot to update the NAME of the handler.  So, I ended up with two handlers with the same name.

    As soon as I fixed this name issue, the bug went away. 

    Just one more area to look into when you run across this bug! 
  • Tuesday, July 21, 2009 5:49 PMJim NakashimaMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Wanted to update this thread with the latest.  The "Role instances did not start with in the time allowed." error message can actually be shown in multiple situations, it's a bit of a catch all -- it is shown when we timeout trying to get the roles running and the devfabric responds back that they are ready to go.

    In the July release of the Tools + SDK, we know that we solved at least one of the issues in which people were seeing this problem.  Please uninstall, reinstall and try again.  (we have some reports of folks having to manually uninstall everything and reinstall before the problem went away so please give that a try)

    If you continue to see issue with this, please let us know -- we want to isolate and fix any outstanding issues that may remain (hopefully there aren't any, fingers crossed).

    Thank you.


    Jim Nakashima, Microsoft. (This post is provided "as-is")
  • Wednesday, July 22, 2009 9:06 AMChander Damodaran Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I had the exact same issue upgrading from Mar 2009 CTP, i just followed the pre-requisites section and then additionally installed .NET Services July 2009 CTP and then reinstalled Windows Azure SDK and Visual Studio tools of July 2009, the problems disappeared.

    Hope this helps!

    Chander
  • Tuesday, July 28, 2009 11:35 PMrevivingtheweb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    So i am getting this issue with July 2009 CTP...   Here is the security event that keeps popping up when i try to run my Cloud Service.  This is only occurring with the CGI Web Role...

    BODY{font:x-small 'Verdana';margin-right:1.5em} .c{cursor:hand} .b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none} .e{margin-left:1em;text-indent:-1em;margin-right:1em} .k{margin-left:1em;text-indent:-1em;margin-right:1em} .t{color:#990000} .xt{color:#990099} .ns{color:red} .dt{color:green} .m{color:blue} .tx{font-weight:bold} .db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier} .di{font:small Courier} .d{color:blue} .pi{color:blue} .cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888} .ci{font:small Courier;color:#888888} PRE{margin:0px;display:inline}
    - < Event xmlns =" http://schemas.microsoft.com/win/2004/08/events/event " >
    - < System >
      < Provider Name =" Microsoft-Windows-Security-Auditing " Guid =" {54849625-5478-4994-a5ba-3e3b0328c30d} " />
      < EventID > 5032 </ EventID >
      < Version > 0 </ Version >
      < Level > 0 </ Level >
      < Task > 12292 </ Task >
      < Opcode > 0 </ Opcode >
      < Keywords > 0x8010000000000000 </ Keywords >
      < TimeCreated SystemTime =" 2009-07-28T23:31:17.787Z " />
      < EventRecordID > 66710 </ EventRecordID >
      < Correlation />
      < Execution ProcessID =" 648 " ThreadID =" 7536 " />
      < Channel > Security </ Channel >
      < Computer > Mike-Lap-Gate </ Computer >
      < Security />
      </ System >
    - < EventData >
      < Data Name =" ErrorCode " > 2 </ Data >
      </ EventData >
      </ Event >

    THis is the message:
    Windows Firewall was unable to notify the user that it blocked an application from accepting incoming connections on the network.

    Error Code:    2


    What should i do to resolve this?
     
    Regards,
    Michael
  • Wednesday, July 29, 2009 12:02 AMrevivingtheweb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    To add...  enableNativeCodeExecution is set to true...

    If i look through Windows Firewall, i cannot see where anything was blocked...

    Michael
  • Tuesday, August 04, 2009 3:31 PMrevivingtheweb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Anybody got any ideas on this?

    Regards,
    Michael
  • Friday, August 21, 2009 4:50 AMsp$ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi jim,
    I am also having the same problem in july CTP.
    This is the error message that i m getting in Visual studio.

    CCT: Role instances did not start within the time allowed. Please try again. If you continue to encounter this behavior please try shutting down the Development Fabric.

    When i check the event Viewer This is the error i am getting.

    + System

      - Provider

       [ Name]  ASP.NET 2.0.50727.0
     
      - EventID 1310

       [ Qualifiers]  32768
     
       Level 3
     
       Task 3
     
       Keywords 0x80000000000000
     
      - TimeCreated

       [ SystemTime]  2009-08-21T03:37:13.000Z
     
       EventRecordID 36095
     
       Channel Application
     
       Computer ComputerName
     
       Security
     

    - EventData

       3008
       A configuration error has occurred.
       8/21/2009 9:07:13 AM
       8/21/2009 3:37:13 AM
       b549675291374fd2b9eebdb49b823b78
       1
       1
       0
       /LM/W3SVC/1/ROOT-1-128952994303775416
       Full
       /
       Path
       
       4516
       RdRoleHost.exe
       Domain Name
       HttpException
       The path is too long after being fully qualified. Make sure the full path is less than 260 characters and the directory name is less than 248 characters.
       http://127.0.0.1:5100/do.__rd_runtime_init__?shutdownEvent=%7B33F08E55-5BC8-453F-932E-2D1E9E3F0468%7D
       /do.__rd_runtime_init__
       127.0.0.1
       
       False
         Domain Name
       6
        Domain Name
       False
       at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) 


    Any Help on this error.


    sps
  • Friday, August 21, 2009 8:55 AMNeil Mackenzie Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    sp$ -

    Uninstall Azure SDK & Visual Studio Tools for Azure
    Reboot
    Reinstall Azure SDK& Visual Studio Tools for Azure.

    This seems to have worked in the past for people with the "Role instances did not start within the time allowed" error.