Sending emails from Azure

by Damiaan Peeters 2. September 2012 18:55

There are a few ways to send you e-mail from azure.

As I wrote in the azure forums november last year, these are some options:

  • A free SMTP server from Live, Gmail or yahoo
  • Your proper smtp server (from your internet provider with smtp authentication)
  • Office 365.  Use exchange to send out e-mail.  It costs $ 4,50/month for an account.  Office 365 offers exchange mailboxes as well as POP3 and SMTP connections.  The exchange mailboxes can be accessed using Exchange Web Services
  • Another solution, but it will require extra development, is the Amazon simple e-mail service (http://aws.amazon.com/ses/)

But you might be interested in one additional option.  Sendgrid is a SMTP gateway provider.  They offer currently a free 25000 emails / month subscription for Windows Azure users. Sending e-mails can be done using an API or just over regular SMTP. 

Create azure sql user

by Damiaan Peeters 11. June 2012 14:22

Just a small note for myself on creating sql user using the SQL statements.

Connect to the MASTER and create a login.

create login myNewLogin with password = 'myPassword'

The connect to the database itself and give the new login access

create user myNewUser FOR LOGIN myNewLogin

EXEC sp_addrolemember N'db_datareader', N'myNewUser'
EXEC sp_addrolemember N'db_datawriter', N'myNewUser'

 

There is a lot to read on MSDN

My tools for Azure

by Damiaan Peeters 20. June 2011 17:56

Lately you see more azure development.  It’s true that Microsoft is highly investing in the platform (and the marketing). As lot of people know Microsoft doesn’t always provide the best tools themselves, but they do support partners to build tools. 

So, what tools am I using currently?  I use

I use also (not storage related but very useful)

  • Spotlight on azure (in Beta from Quest - monitor resources on an instance, see link below)
  • Greybox (easily kill active deployments quickly - http://greybox.codeplex.com – when developing with staging environments, you can't miss this tool !)
  • SqlExaminer & sql data examiner (synchronize you SQLAzure with local or other DB's - http://www.sqlaccessories.com/  - recently had a major upgrade for Azure)

You can find a lot of (paying) tools http://www.cerebrata.com/
or from Quest (all in beta and currently free): http://www.questcloudtools.com/

Scale up on Azure (and pay less)

by Damiaan Peeters 23. April 2011 01:47

Ok, you win a contest and receive an Windows Azure and SQL Azure Extended subscription worth € 500. This package includes 750 hours of a small compute instance and even 1 Business Edition database (up to 10 GB relational database).  Not bad, right?  Many thanks of course for the Belgian Umbraco User Group and Microsoft.

Last few weeks I’ve been testing around with Azure and I am starting to get confortable with it.  Even so confortable I looked at the invoices which contained almost 30 pages for last month only.  Thirty pages, while I didn’t do many heavy things.  And this all for the total amount of € 4,61.

If you want to digg into the € 4,61 split up, you will see that there is € 1.42 for relation databases. And even € 3,19 for compute hours. While this should be included in the package (that’s what they promised me …)

image

If you want to know why:

I was using EXTRA SMALL compute instances and WEB databases instead of SMALL and BUSINESS versions.

Solution

Upgrade your database: login into http://windows.azure.com go to databases and click on the manage button.  Enter your sql credentials and UPGRADE your SQL database:

ALTER DATABASE yourdatabasename
MODIFY (EDITION =  'business', MAXSIZE=10GB)

Then change the CSDEF file and REDEPLOY your solution (this can’t be changed post-deployment)

<ServiceDefinition name="<service-name>" upgradeDomainCount="<number-of-upgrade-domains>">
  <WebRole name="<web-role-name>" vmsize="[ExtraSmall|Small|Medium|Large|ExtraLarge]" >
  or
  <WorkerRole name="<worker-role-name>" vmsize="[ExtraSmall|Small|Medium|Large|ExtraLarge]">

Configuration exception when migrating a ASP.NET application to a Azure webrole

by Damiaan Peeters 31. March 2011 01:50

Ok.  I found why I got a configuration exception every time I launched my azure project (in visual studio 2010). 

I have installed Azure Tools 1.4, on my Visual Studio 2010 SP1.

The problem

When I launched the appFabric / Azure Compute Emulator, I got a my visual studio telling my that I he didn’t have any trace or disassembly information. 

The most annoying part of this situation is that my WebRole Entry point wasn’t started neither.

This was the error (cut some path’s out to keep it readable).

System.Configuration.ConfigurationErrorsException was unhandled
  Message=Configuration system failed to initialize
  Source=System.Configuration
  BareMessage=Configuration system failed to initialize
  Line=0
  StackTrace:
       at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
       at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
       at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
       at System.Configuration.ConfigurationManager.GetSection(String sectionName)
       at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
       at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
       at System.Diagnostics.DiagnosticsConfiguration.Initialize()
       at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
       at System.Diagnostics.TraceInternal.InitializeSettings()
       at System.Diagnostics.TraceInternal.get_Listeners()
       at System.Diagnostics.Trace.get_Listeners()
       at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
       at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
       at Microsoft.WindowsAzure.Hosts.WaIISHost.Program.RunEntryPoint(Parameters parameters)
       at Microsoft.WindowsAzure.Hosts.WaIISHost.Program.Main(String[] args)
  InnerException: System.Configuration.ConfigurationErrorsException
       Message=Configuration file [CUT].WL.dll.config does not have root <configuration> tag (C:\Users\[CUT]\approot\bin\[CUT].WL.dll.config line 2)
       Source=System.Configuration
       BareMessage=Configuration file [CUT].WL.dll.config does not have root <configuration> tag
       Filename=C:\Users\damiaan.COMM-IT\[CUT]\approot\bin\[CUT].WL.dll.config
       Line=2
       StackTrace:
            at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
            at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
            at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
            at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
       InnerException:

Solution

So what does it mean.  If you open up the config file mentioned in the (inner) exception. You might notice this is not a complete configuration file.  For me it was my App.Settings file. 

What I did?  I moved my app.Settings into my Web.config file.  And gone was the error.

I think this is a bug. So, I posted it to Microsoft Connect so you can review it overthere:

https://connect.microsoft.com/VisualStudio/feedback/details/654955/system-configuration-configurationerrorsexception-when-starting-website-hosted-by-azure-appfabric-compute-emulator#tabs

Who.I.am

Certified Umbraco Master, Part of Umbraco Certified partner comm-it, .Net and Azure developer, seo lover. Magician in my spare time.

Month List