Pergunta

I have a simple WebRole class in my Azure solution:

public class WebRole : RoleEntryPoint
{
    public override bool OnStart()
    {
        DiagnosticMonitor.Start("DiagnosticsConnectionString");

        // For information on handling configuration changes
        // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
        RoleEnvironment.Changing += RoleEnvironmentChanging;

        CloudStorageAccount.SetConfigurationSettingPublisher(
            (configName, configSettingPublisher) =>
            {
                string connectionString = RoleEnvironment.GetConfigurationSettingValue(configName);
                configSettingPublisher(connectionString);
            }
        );

        return base.OnStart();
    }
    // ...
}

For some reason, I can't get breakpoints in OnStart() to be hit when I run the project. Why might this be?

Foi útil?

Solução

One possibility is that your startup project is your web application instead of the cloud project. Make sure that the cloud project is the startup project, and then verify your app is running in the development fabric.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top