Categories
.NET ASP.NET MVC Setup Umbraco

Umbraco CMS with ASP.NET MVC – Part 3 Inside Visual Studio

In this post for Umbraco CMS we will learn regarding creating Visual Studio Solution. Main motive behind creating VS Solution is to work in proper structured manner and when work in team it is helpful so that Team can Commit their file changes under Source Control when developing with Umbraco CMS.

In the Introduction post you can read the brief roadmap about posts on Umbraco CMS and MVC development. Part 2 of this series describes about Umbraco installation and IIS configurations.

For this post I have used Visual Studio 2013 but 2012 version will also do. This version of Umbraco is using .NET Framework 4.5

Step 1 – Create Blank Solution for UMBRACO CMS

Start Visual Studio and use the shortcut for create new project i.e. Ctrl+Shift+N

Create a Blank Visual Studio Solution.

In Visual Studio 2013, Navigate to ‘Visual C#‘ > ‘Web’ > Select ‘ASP.NET Web Application‘ as can be seen in the screen below.

Create Empty Web Solution

Note: If you are using Visual Studio 2012 or else the step to create Blank Solution may be different. For example in Visual Studio 2012 you can navigate to ‘Visual C#’ > ‘Web’ > Select ‘ASP.NET MVC 5 Empty Project’.

Considering you have followed the Part 2 regarding Umbraco Installation and Site root folder; keep the backup of the Umbraco site root folder specifically web.config, Global.asax and ‘Views’ folder.

Then uncheck the option for “Create directory for solution”

Set the Location to the Umbraco site root folder.

Set the Solution name. Here we have created Solution with name “UmbracoMvc” and then click “OK”

Next in the “New ASP.NET Project” dialog, Select template “Empty” and tick the “MVC” check box option

Select Blank Application Type

Then click “OK”.

Step 2 – Verify the Solution Structure and Physical Files

After this you can verify the folder structure is created as below screen. Here “Umbraco” is the Solution Folder and “UmbracoMvc” is the Project Folder.

Blank Solution Directory View

After we create blank solution, Visual Studio replaces the existing Umbraco web.config and other imp. files due to this behaviour of VS; we need to restore the files and folders (shown in below screen) from the original version that we have in backup, that we took in previous step, to “UmbracoMvc” project folder.

Copy extracted source code to IIS website root directory

Now we have successfully created blank solution and recovered the files needed. So we need to verify that the Umbraco site is still working at URL ‘http://UmbracoMvc/’.

STEP 3 – Include NECESSARY files in the Solution

Open Visual Studio’s Solution Explorer and select option “Show All Files” highlighted in screen below.

Select Show All Files in Visual Studio Solution

Next include the files and folder as required but do not include the folders named “Umbraco” and “Umbraco_Client” because those part we will not work. I have shown in below screen what I have included in my solution.

Files and Folder Included as part of the Umbraco Web Application project

STEp 4 – Umbraco MVC Configurations

In Umbraco MVC, we generally not define routes. For this reason we will clean up the routes definition from “RouteConfig.cs” as shown in screen below.

Remove or Empty the Route Config

Next we will configure the Umbraco site for default rendering to MVC as shown in the screen below.

Open the “umbracoSettings.config” from “Config” folder and change the template’s default Rendering to “Mvc”.

Default Rendering Engine to MVC

Note: This will affect the creation of new Templates from Umbraco Client/Administration region. Also in new version of Umbraco default rendering is ‘Mvc’, so you can skip this part for Umbraco version 7.1.1

Conclusion

So we have completed the exercise to Create Visual Studio Solution for Umbraco Web development and we also did configurations for ASP.NET MVC 5 version. After this much you can add the source files and folders to any Source Control that works for you. Your Team will love to work in Umbraco CMS after these efforts.

In the next post we will see the how Umbraco CMS works with MVC or in other words how to cook the ASP.NET MVC recipe in Umbraco and also migration points for converting existing ASP.NET MVC sites to Umbraco MVC.

 

Keep sharing your ideas and suggestions in the comments.

Liked this post? Then spread this post to your friends.

 

Categories
.NET ASP.NET IIS MVC Setup Umbraco

Umbraco CMS with ASP.NET MVC – Part 2 Installation

In this post we will see how to start with Umbraco CMS website development with ASP.NET MVC.

In previous Introduction post here you can read the brief roadmap about posts on Umbraco MVC.

Step 1 – Download Latest Umbraco release

Download fresh installation of Umbraco CMS from Official Umbraco Site. For this post Umbraco version 7.1.1 is used and use full source code release package highlighted in bold “UmbracoCms.7.1.1.zip” in screen below.

Download Umbraco full source code release package

Step 2 – Extract the package

After downloading release package in ‘.zip’ format extract the package to temporary location.

Extract Umbraco source code to temporary location

 

Step 3 – Setup the website in IIS

After extracting the release package, the next step is to copy the extracted content to IIS web root directory by creating new folder for the Umbraco MVC website or configure the extracted folder in IIS directly in next steps.

The extracted content will look something as shown below screenshot

Copy extracted source code to IIS web root directory

Now Add a new Website in IIS. To open IIS manager you may use the cmd command ‘inetmgr.exe’.

Add a Website in IIS

Now the Add Website configuration dialog will show up. Configure the Website as below with local domain binding ‘umbracomvc’ on port ’80’

Add a Website - Configuration Dialog in IIS

Now the IIS Website is configured.

Step 4 – Create Local-only domain binding

We have configured the IIS Website with local binding definition in above steps but to correctly resolve and browse host name ‘http://umbracomvc/’ we need to configure the hosts entry in the local system with local IP address. Hosts file configuration and file path is shown in screenshot below.

Edit hosts file to point to local only domain

Note: Open the notepad or notepad++ in Administrator mode. Additionally after this configuration use the cmd command ‘ipconfig /flushdns’

Step 5 – Start Umbraco Installation

After above steps browse the website in browser at URL ‘http://umbracomvc/’ (refer ‘Host Name’ configured in IIS Website Configuration Dialog for the URL if changed in your case). When browsing for first time Umbraco will automatically initiate the Installation wizard and ask for following – Configure the licence (if any), Database connection, User credentials for Umbraco Admin, Starter Kit theme.

Few excerpts from the installation wizard are shown below:

1. Installation Welcome screen

Open browser and start umbraco installation

2. Select ‘No thanks, do not install a Starter Kit’ in Starter Kit Selection Step

Select No Starter Kit

3. Final step screen

Umbraco Installation final step

4. Verify the Umbraco Admin panel access at http://UmbracoMvc/Umbraco/ with configured user credentials in Installation wizard

Umbraco Administration

Note: Above Installation wizard screenshot were captured using Umbraco CMS version 7.0.4 but later upgraded to Umbraco CMS version 7.1.1

Conclusion

In this post we went thru steps to download & install Umbraco CMS on local system. In the next post we will see how to create Visual Studio Solution for this website.

 

I hope this post was easy to understand and screenshot images helped you to visually connect with the minimum required steps.

If you liked this kindly like or subscribe. Keep comments flowing if you have any ideas or suggestions.

Categories
.NET Personal Productivity Setup Utility

How to install .NET Framework 2.0 and 3.5 on Windows 8 in Offline Mode

I have installed Windows 8 few days back. And during some initial programs setup I noticed that Windows 8 does not include .NET 3.5 (include .NET 2.0 and 3.0) by default. However it did contained the setup in the OS disc.

So question is, How to install the .NET framework 3.5 including .NET 2.0 and 3.0 ?

Solution is answered as below.

I had found my solution on Microsoft support ? here.

This an Re-post of the same with corrections.

Steps below shows how we can install /enable the .NET Framework 3.5 (include .NET 2.0 and 3.0) feature in offline mode i.e. without using internet:

Step 1: Insert Windows 8 DVD or mount ISO image. The source of this feature can be found in folder E:\sources\sxs (In this case E: drive letter will be on which Windows 8 Media is located).

Windows 8 Media folder view
Windows 8 Media folder view

Step 2: Open cmd.exe (Command Prompt) with Administrative Privileges.

Step 3: Run the following command

dism.exe /online /enable-feature /featurename:NetFx3 /All /Source:"E:\sources\sxs" /LimitAccess

and then hit Enter.

Command Prompt showing installation of the feature.
Command Prompt shows installation of the feature completed.

 

Finish: After completing the installation of .NET Framework 3.5 you can see that the feature is enabled as shown in the screenshot below.

Windows features showing installed .NET 3.5
Windows features displays .NET 3.5 installed.

 

Categories
.NET ASP.NET C# HTML IIS Introduction JavaScript Setup SQL WCF Windows Azure Winforms WPF

Global Windows Azure Bootcamp at Ahmedabad 2013

This post is to share my experience with Global Windows Azure Boot camp event that happened in Ahmedabad.

About The Event

The event was about getting started with Windows Azure and Getting started with the Windows Azure Training Kit for any developers whether experienced or fresher and working on any programming platforms. The event was also about how real life applications can be benefited by using the power of cloud server and services.

WHAT IS WINDOWS AZURE ?

Windows Azure is Microsoft’s Cloud Platform which provides various hosting and architectural benefits along with scalability, reliability and which can scale the applications horizontal in very short time and minimum efforts. Windows Azure provides Cloud Hosting, Cloud Services, Cloud Mobile Services which enable Push notification to any platform (Really Any platform – iPhone, Android, Native application, Web applications) and many more features.

WHAT IS BOOT CAMP?

According to me, Boot camp is in other words Training Camp and in real life is much more fun. It’s an event where we, the developer, come with our tools and brains and collaborate to create and build in groups. In boot camp event people go to learn skills, usually skills involving physical or practical action rather than book subjects.

WHY IS IT GLOBAL WINDOWS AZURE EVENT?

It is because the event was happening at 90+ locations at the same time around the globe.

What was the Agenda of Event?

Start End Agenda Speaker
9:30 9:45 Registration
9:45 10:00 Welcome to GWAB!
10:00 10:45 Windows Azure – Complete Solution for Any Business Need Mahesh Devjibhai Dhola
10:45 11:00 Tea
11:00 12:00 Render Farm/Lab 1
12:00 13:00 Lab 2
13:00 14:00 Lunch/Networking
14:00 14:20 Windows Azure Real-life Application   Showcase Prabhjyot Singh Bakshi
14:20 15:00 Windows Azure for Mobiles Kaushal Bhavsar
15:00 16:00 Lab
16:00 16:15 Tea
16:15 16:45 Q&A/Giveaways
16:45 17:00 Thanks

How things went?

I think event was Awesome and I had learnt many things which I didn’t knew before. The Speakers removed the hesitation and fear of windows azure and cloud applications building that I had before the event. Event went good with the agenda and schedules although there were few examples and labs due to shortage of time, the speakers were nice and supportive to answer our questions and provided best guide they knew to clear the doubts. And they also helped in getting the Azure SDK that was +1 point to them. Initially Mahesh sir gave speech on the event agenda and introductions. Then went through the Windows Azure & its benefits, and applications that can be built with it. I must say event interactive session with him. He then introduced and made us familiar with the Windows Azure Portal to manage the sites. Then we went through the Render Lab deployment with some help. After lunch, Prabhjyot sir gave us some introduction about him and his team. He told about the cloud services and Windows 8 Application and some code examples built and already functional on the cloud. Then Kaushal Bhavsar showed us the Windows Azure Cloud Mobile Services and push notification services that Windows Azure provided using ‘Channel Url’ and that the push notification was available for use on any platform whether it is Web, native application, or mobile and on any Operating Platforms. Then some cool giveaways happened. My favorite was plural sight 1 year subscription but didn’t won it as there was only one of it but hey I got Cloud berry giveaway..

What was the cool thing about the event?

There are a couple of cool things,

  1. Alan Smith (@alansmith) who happens to be Microsoft MVP prepared something based upon his 256 worker role demo, if you want more in-depth info on the demo and the topic the check out read more from the blog post here.
  2. And we deployed the demo cloud application named renderlab on the windows azure ourselves through the labs with guidance and some efforts.
  3. Meet the Geeks – Mahesh Dhola, Jalpesh Vadgama, Kaushal Bhavsar, and Prabhjot Singh Bakshi.
  4. Meetup with other Ahmedabadi developers and learners.
  5. Lastly – Food, Giveaways (Gifts) and Windows Azure stickers.

HOW I CAME TO KNOW?

I came to know about Global Windows Azure Boot camp event going happening by Facebook post in AhmedabadDotnet Group. Go and Join the Group to get social with the Community on Facebook itself.

PS: Check the FAQ section of the event for more answers and information.

Here are few pictures from the event that I would like to share here,

Harsh Baid with Mahesh Dhola (on Right)
Harsh Baid accepting the Cloud Berry Giveaway from Mahesh Dhola (on Right)
Kaushal Bhavsar with Mahesh Dhola (on Left)
Kaushal Bhavsar accepting the Cloud Berry Giveaway from Mahesh Dhola (on Left)
Prabhjyot Singh Bakshi
Prabhjyot Singh Bakshi speaking at the event on Windows Azure Real-life Applications.
Mahesh Dhola
Mahesh Dhola speaking on Windows Azure – Complete Solution for Any Business Need.
Harsh Baid, Jalpesh Vadgama, Mahesh Dhola (left to right)
Group photo – Harsh Baid, Jalpesh Vadgama, and Mahesh Dhola (left to right)
Kaushal Bhavsar speaking on Windows Azure Cloud services
Kaushal Bhavsar speaking on Windows Azure Cloud services
The Great Handshake - Jalpesh sir and Mahesh sir (on right)
The Great Handshake – Jalpesh sir and Mahesh sir (on right) for Cloud berry giveaway

I hope you liked the post and event information. Share your experiences if you were also the part of the event Or May be some other event that you want to share with us.

 

Categories
.NET Setup

Installing .NET 3.5 service pack 1 along with application setup

Many of us would have been creating setups for applications either using WinForms or WPF and other such, but we really ignore the fact that users might not have all the prerequisites that our application requires to work.

Possibilities for that might be one or more as below:

  1. User do have .NET framework even installed.
  2. Users .NET framework installation is older or newer but not the required one.
  3. For example, user have .NET framework version 3.5 but not 3.5 SP1
  4. You have disabled to check .NET framework exists before application installs so application will not start all after installation, so users frusts and uninstalls your application.
  5. You have enabled to check and install .NET framework along with your application online, but you have ignored the fact that user might have no internet access on their system.
So what could we do for this ?
Solution is to include the .NET framework standalone setup installation in your application setup.
And steps to install the .NET framework 3.5 with the application are as follows:

Step 1 – Download the combined installation package for the .NET Framework 3.5 from Microsoft download site dotnetfx35.exe.
Folder view

 

Step 2 – After downloading this package, you have to extract the contents by running dotnetfx35.exe /x and it will prompt you with a location to extract the contents to a path.

Command prompt

 

Step 3 – Copy the contents of files and folder from {extracted path}\WCU\dotNetFramework to C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX35SP1
please note that to change ‘Program Files’ to ‘Program Files (x86)’ in above path if working on 64-bit system.

 

Step 4 – If you wish to get rid of the build warnings, you can update your PublicKey in the Product.XML with the following value: 3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001
Use this for both of the XPSEPSC* files.
Product.xml is located in ‘DotNetFX35SP1’ directory itself

 

Step 5 – In Visual Studio 2010, right-click on Setup project > Properties -> Prerequisites -> Select .NET Framework 3.5 SP1 > Below select the option “Download the prerequisites from the same location as my application” > Save changes

 

Step 6 – And last step is to rebuild the setup project and Test.

 

Reference links: