How to start Azure emulator using ASP.NET MVC project

I have an ASP.NET MVC project that uses Azure Storage and has been successfully deployed to Azure. However, when the project starts locally, it does not start the Azure emulator.

The only way I found running the Azure emulator is to make a shortcut to the "Windows Azure Cloud Service" and start it manually.

Is there a way to ensure that the Azure emulator starts when my application starts?

+5
source share
2 answers

I have a cloud service in the same project as my MVC site. Since you have already created an MVC project, try ...

  • Add a new Cloud project to your solution. SHOULD NOT CHOOSE ANY ROLE AT ADDITION.
  • ...
    • " - ..." MVC.
  • , : Cloud , .

VS2012, , .

+3

. , :

  • .
  • , VS, .
  • . , Application_Start(), [, , , :)]:

            protected void Application_Start()
            {
                AreaRegistration.RegisterAllAreas();
                WebApiConfig.Register(GlobalConfiguration.Configuration);
                FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
                RouteConfig.RegisterRoutes(RouteTable.Routes);
                BundleConfig.RegisterBundles(BundleTable.Bundles);
    #if (DEBUG)
                {
                    Process.Start(@"C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\devstore\DSServiceLDB.exe");
    
                }
    #endif
            }
    

, VS . , . , LocalDB .

0

All Articles