Azure

Labels
AJAX(112) App Studio(6) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(177) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(8) OAuth Scopes(1) OAuth2(11) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(10) PKCE(2) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(178) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(80) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(2) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Azure
Saturday, July 6, 2013PrintSubscribe
How to Configure Azure Factory Project

With the release of Windows Azure, Microsoft has provided a great cloud database, storage, and computing service platform. Windows Azure offers many benefits, such as guaranteed 99.95% uptime, automatic OS and service  patching, integrated network load balancing, and easy scaling.

While the Windows Azure cloud may offer the perfect platform to deploy your next web application, you still need to build this application. This is where Code On Time’s Azure Factory comes in. All you have to do is paste in your SQL Azure database connection string, and hit Generate. In a minute, your advanced web application will start in your default browser, complete with sorting, adaptive filtering, reporting, charts, and much more. Hit Publish, and the application will be packaged. Upload the published deployment package to Windows Azure, and within minutes you’ll have your app running in the cloud.

Need to add more features and customize your app? Just make your changes in the easy to use Project Designer. While no coding is needed to make a great app, you can always open the source code in Visual Studio and change it to precisely fit your requirements.

The following article will explain how to generate and deploy an Azure Factory application. View our learning system if you need help setting up a Windows Azure account or creating a database using SQL Azure tools.

In order for the application created in this article to work properly, make sure to install Microsoft Azure SDK.

Creating the Azure Factory Project

Start the app generator, and click on Create a new web application. Select Azure Factory.

Creating a new Azure Factory project.

Enter a name, select your preferred language, and press Create.

Entering a name and specifying a language for the project.

Press Next to navigate to the Database Connection page. Click on the “…” button.

Enter your server username and password. If you already have an SQL Azure database, then enter the name in the Database field. If you don’t have a database, you can quickly create one using the web application generator. The next few steps explain how to create a sample Northwind database, include ASP.NET Membership and Roles, and add Session State management.

In the Database textbox, enter “Northwind”. Press Create to create the database.

Creating the 'Northwind' database.

In the Sample Tables dropdown, select Northwind and press Install.

Installing the Northwind database.

Under Membership section, press Add button. ASP.NET Membership will be installed in the database.

Adding ASP.NET Membership and Roles provider into the database.

By default, Azure Factory applications are configured to use two extra-small server instances in the cloud. If you use multiple instances, then Session State management must be included in the application. Under Session State, press Add. Press OK to confirm the installation.

Adding Session State management into the database.

Press OK to save the connection string. Press Next twice to get to the Reporting page.

Enabling reporting in the web app.

Check the box to enable reporting, and keep pressing Next to reach the Theme page. Select “Azure” theme.

Selecting the 'Azure' theme.

Hold down Shift key, and press Next. This shortcut will take you to the Summary page. Press the Generate button.

Wait until the generator finishes, and your default browser will open with your new web application. While the application is running on your computer, the database is located in the cloud. You can log in and start using the app immediately.

Deploying the Web App

It’s time to deploy the app to Azure. Go back to the generator, and click on the project name. Press Publish.

Publishing the web app from Code On Time generator.

When the process is complete, the publish folder will be opened and will contain two files, CloudApp.cspkg and ServiceConfiguration.cscfg.

Navigate to the Azure Portal. In the bottom left corner, press New. Select Compute | Cloud Service | Custom Create.

Creating a new cloud service in the Azure portal.

Specify a URL, check the box next to “Deploy a cloud service package”, and click on the right arrow.

Specifying a URL for the new cloud service.

Next, specify a deployment name and select the two file locations. Mark the Environment as “Staging”. Click on the check icon to start deployment.

Specifying parameters for publishing the new cloud service.

Press OK, and Windows Azure will start the deployment process. This step may take up to 15 minutes. Once the status of the deployment changes to Ready, use the SITE URL link found under DASHBOARD tab to view the app running in the cloud.

If you look at the URL, you will notice that it uses the ID of the deployment, not the requested DNS Name. This is because the deployment is a staging deployment. You can go back to the management portal, and choose Swap to change it into a production deployment. Now you can use the DNS Name you specified during creation of the hosted service.

When you are ready to deploy a new project revision, create a new staging deployment. Test the new deployment in the cloud. If everything is working as expected, then swap the virtual IP address of the staging deployment with the production one. Click Swap button at the bottom of the screen to do so.

SWAP button at the bottom of the screen will swap the staging and production environments.

When VIP swapping has finished, the previous application revision will become a staging deployment. Shut it down if you don’t need it. Continue upgrading staging deployment with the new revisions of the application, and swapping them later with production.

Wednesday, June 19, 2013PrintSubscribe
ASP.NET 4.5, DotNetNuke 7, Upload on Insert, CKEditor, Dynamic Wait Indicators, Azure SDK 2.0, Native CSV Import, Container “page”

Code On Time release 7.0.9.0 includes major enhancements  providing the foundation for the upcoming Mobile Client Library and 2nd generation datasheet view. Both will be included in the follow-up release in July of 2013.

ASP.NET 4.5 has been available for awhile. We now offer support for the newest .NET Framework in  Web Site Factory, Web App Factory, and Azure Factory projects.

Starting with this release any new apps configured to use ASP.NET 4.5 (default option) will be created without dependency on Ajax Control Toolkit DLLs. We will be phasing out the toolkit by replacing any dependencies with jQuery equivalents. Existing projects that do use components of ACT will continue to be generated with the binary libraries.

Master page, theme, and script references where enhanced to further reduce application footprint and speed up page loading. Mobile client library requires this enhancement.

DotNetNuke 7 is now supported in DotNetNuke Factory. Create ASP.NET 4.0 line-of-business web apps as modules for the latest version of the populate open-source content management system. New theme Gravity is included to provide a matching look-and-feel for the apps packaged as DNN modules.

Upload on Insert is a frequently requested feature that was previously absent in the application framework. Binary content is uploaded independently from the data fields of a new record. This creates a unique challenge to delay uploading until a record has been successfully persisted. The new client library does just that. New projects will automatically include BLOB fields in createForm1 to allow upload on insert. Just make sure that the binary columns are not marked as required in the database. Drag binary fields to the createForm1 view to enable this capability in existing apps.

CKEditor is a popular web-based rich text editor embedded in many online products. We are offering a simple integration of this editor in any project created with the new release of the app generator. The built-in rich text editor is now implemented without server-side support and works entirely on the client, which makes it lightning-fast.

Dynamic Wait Indicators are now  a permanent feature of the client library. If a server-side operation takes longer than 3/4 of a second to complete, then a thin marquee line will be displayed at the top of the data view. Modal views will display a wait indicator at the top of a page. This applies to data paging/sorting/search, action execution, reporting, import, upload, and download. Consistent integration of dynamic wait indicators improves usability by offering intelligent visual clues about long running requests. Navigate to our demo web site and try printing a list of customers to see the wait indicator in action.

Azure SDK 2.0 is now supported in Azure Factory projects.

Native CSV Import classes are  implemented in web apps created with Premium or Unlimited edition. The new importer is built into the application framework, which eliminates the need for Microsoft Access Database Engine installation on the server. “Import” action is now also included under Actions menu of data views in Azure Factory web apps. Import dialog simplifies mapping of fields by hiding “mapped” fields from available mapping options.

Container “page” allows defining user controls that will be displayed in page header, title, sidebar, or footer.

The following enhancements, bug fixes, and features are included in this release:

  • ASP.NET 4.5 is now supported in Web App Factory, Web Site Factory, and Azure Factory projects.
     
  • Application Framework now includes a native CSV parser based on the work of Sébastien Lorion. Both SharePoint Factory and Azure Factory projects are now supporting the “Import” action with native CSV parsing.
     
  • Web Site Factory solution files are now located under [Documents]\Code OnTime\Solutions\Web Site Factory\PROJECT_NAME folder. The new solution file will be created if a website factory project is regenerated. If you are using a source control system then make sure to change the project bindings accordingly.
     
  • Theme file is referenced with the app generator version number in the page header.
     
  • Azure SDK 2.0 is now supported in Azure Factory.
     
  • Ajax Control Tookit 7.0429 is now integrated in the apps based on ASP.NET 3.5 and 4.0.
    Upgrade instructions for ASP.NET 4.0 projects:
    • Make sure to delete file ~/App_Code/Controls/RichEditor.* from the source code of your Web Site Factory project.
    • Delete the files MyCompany\Controls\RichEdit.* from other project types where MyCompany must be replaced with the Namespace of your project.
    • Select the project on the start page of the app generator and choose Refresh, do not select any controllers and click Refresh.
    • Re-generate the app.
       
  • Custom *.rdlc reports are now published with Web Site Factory projects.
     
  • CKEditor is seamlessly integrated in web apps created with Code On Time.
     
  • Removed references to "stub" images from the master page.
     
  • Main master page is not using “cellpadding”, “cellspacing” and “valign” attributes. It relies on new CSS rules instead.
     
  • Built in Rich Text editor and CKEDITOR will take at least as much space as specified by the CSS class "dataview-rich-text". Define a custom CSS rule with “width” and “height” property to set up a non-standard size for rich text editors.
     
  • Application pages include “lang” and “xml:lang” attributes in “html” tag when loaded in a browser.
     
  • Application framework stylesheet Core.css incorporates the core styles from AjaxControlToolkit to handle calendar, tab container, color picker, and HTML editor to minimize the number of CSS links in application pages.
     
  • Thanks to Giampaolo Bulleri for contributing Italian localization.
     
  • Membership component of the client library explicitly sets up the path to Authentication_JSON_AppService.axd of a web app when initialized.
     
  • App generator will place controls with IDs 'header', 'title', 'sidebar', and 'footer' into appropriate regions of a page if the controls belong to a page container 'page'.
     
  • Enter NoSeeAlso class in "Custom Styles" property of a page to hide the corresponding area created automatically by the class library.
     
  • The "Reset" button on automatic search bar has been replaced with "Clear" button. The new button will simply remove all filters.
     
  • BLOB fields can now be added to the "createForm1" or any other view that offers Insert command. BLOB uploading is deferred until the primary key is returned after a successful insert operation.
     
  • New projects will automatically include BLOB fields in 'createForm1'. Developers can add BLOB fields to existing data controller views 'createForm1' manually.
     
  • CSS class "dataview-loading" is added to a data view container when a data view makes a first call to fetch data. Class "dataview-loaded" will replace "dataview-loading" after the first call has been completed.
     
  • Client library will open a new window when the original of a BLOB field is downloaded by user. The data view will display a marquee indicating the download progress. The new window is twice smaller than the main browser window.
     
  • Server-side business rules (Code and SQL) do not interfere with Blob Adpaters updating utility fields.
     
  • Data fields with text mode set to "Static" work correctly in grid view when inline editin of row values is performed by a user.
     
  • Application framework includes FileSystemBlobAdapterBase class to allow override of file system blob adapter property IsPublic.
     
  • "Soft" date filters created with SQL business rules will correctly filter the data.
     
  • Import automatically adjust the list of the available unmapped fields to ease selection of mappings.
     
  • Main and Help master pages are using a short form of DOCTYPE declaration.
     
  • Methods AccessKey, SecretAccessKey and property Bucket of S3BlobAdapter are now virtual
Monday, April 29, 2013PrintSubscribe
Overview of Upload/Download Adapters

Large files are frequently stored in databases as BLOB fields (binary large objects). Code On Time offers out-of-the-box support for upload and download of content directly to BLOB table columns. However, common practice is to store the binary content outside of the database. There are numerous advantages to this approach:

  • Reduced database size
  • Simplified backup
  • Low cost of storing large amounts of data
  • Opportunity to create a content delivery network (CDN)

File System

The most common method to store external files is in the file system. The files can be saved on the same hard drive of the host machine, or on an external Network-Attached Storage (NAS) device. While these devices are simple to configure, they still will require maintenance to ensure redundancy and performance.

Azure Storage

Microsoft Azure Storage cloud platform is a high-redundancy and availability solution that stores all data in data centers managed by Microsoft. It offers geo redundant storage, affinity groups, and logging. Each storage account can open multiple “containers” that are accessed via HTTP requests using unique container keys. Containers may be declared as “public” if necessary.

Amazon S3

Amazon Simple Storage Service (Amazon S3) is another popular cloud solution that offers features similar to Microsoft Azure Storage. It offers data redundancy and high availability, enabling rapid scaling of application infrastructure. Each account can create multiple buckets to store data, which are accessed via HTTP requests using one or more “Secret Access Keys”.

Configuring an Upload/Download Adapter

Declare virtual BLOB fields by entering a few parameters in the BLOB Adapter Configuration of a data controller. The web application framework will perform REST requests to a specified storage system, making it possible to use any combination of adapters in a single application without creating dependencies on third-party libraries.

A physical table column storing the file name is required for each virtual BLOB field definition. It allows the application framework  to determine existence of binary content.

Optional utility table columns Length and Content Type may be specified. The matching data controller fields will enable the application framework to communicate the file type and size to the client browser.

The table below shows configuration parameters that may be used to set up an adapter.

Parameter Description Storage System
Access-Key-ID The Access Key ID of the specified Secret Access Key required to form secure requests to Amazon S3. S3
Account Name of the Azure Storage Account. Azure
Bucket The bucket that stores the binary content. S3
Container The container that stores the binary content. Azure
Content-Type-Field The name of the data controller field that stores the file content type (data type String). Optional
Field The name of the virtual BLOB field. Required
File-Name-Field The name of the field that stores the file name (data type String). Required
Key The key used to authenticate Azure Storage requests. Azure
Length-Field The name of the data controller field that stores the file length (data type Int). Optional
Path-Template The path to the binary content in the storage system. May include references to data controller field names and special names. Required
Storage-System The type of storage system that holds the binary content. Supported values are “File”, “Azure”, and “S3”. Required
Secret-Access-Key The Secret Access Key used in conjunction with Access Key ID to form secure requests to Amazon S3. S3

Configuring Path Template

The path template can reference data controller field names in curly brackets ({}). The following example references the data controller fields ProductID and PictureFileName. This path template will work with Azure and S3 storage systems.

Path-Template: Products/{ProductID}-{PictureFileName}

The file system path template must resolve as a physical path in the file system.

Path-Template: C:\Northwind\Customers\{CustomerID}-{PhotoFileName}

You can also specify a path relative to the application root when using file system storage.

Path-Template: ~\App_Data\Customers\{CustomerID}-{PhotoFileName}

Special names $Extension and $FileNameWithoutExtension can also be used in the path template with any storage system.

Path-Template: Products/{$FileNameWithoutExtension}-{ProductID}.{$Extension}

Most hosted storage systems (Azure, S3, Google Drive) are only supporting a limited set of characters in the path. The application framework will automatically replace non-alphanumeric characters with dash (-) when evaluating path templates.