Getting Started with Razon View Engine in MVC3

ASP.NET MVC has always supported the concept of view engines. View engines are pluggable modules that implement several template syntax option. The default view engine for ASP.NET MVC uses the same .aspx/ .ascx.master file templates in ASP.NET Web Forms.

This article will show you how to go through the Razor View Engine to create a view of an application.

If you don’t know Razor, Razor is not a new programming language itself but uses a C# syntax for embedding a code in the page without using the ASP.NET delimters. It is a simply syntax view engine and was released as a part of ASP.NET MVC3.

Read the rest of the tutorial here: http://www.codeproject.com/Articles/639695/Getting-Started-with-Razor-View-Engine-in-MVC

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

How to Prevent Visual Studio Crash When Debugging MVC Web Applications

When trying to debug a MVC 5 web application in Visual Studio 2012, it would tend to crush. If you put the build to release mode, then you could run the application but not debug it. This problem usually occurrs when you are using IIS7  to host the site in the local development environment.

What could cause it is due to the fact that you have 7 worker process and several users logged into the site. When debugging the web application, Visual Studio has to attach it to the work process. When there is more than one, Visual Studio seems to not know which one it is attached to. This condition causes Visual Studio to crash.

 

In this tutorial we’ll show you the tip on how to prevent Visual Studio crashes when debugging your MVC website. This usually happens when you are using IIS7 to host your site in your development environment.

Read the rest of the blog here: http://www.codeproject.com/Tips/812792/Prevent-Visual-Studio-crash-when-debugging-MVC-web

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Why Responsive Web Design Is Good For Your Business

With the surge of tablet and mobile phone users, it’s great to have a business blog or website that implements a responsive web design. A responsive website means that its design and features are maintained even if your visitors browse it from their mobile phones and tablets. As a developer, it makes it possible to bring your website’s content effortlessly through the development of only one code base which makes update and maintenance simpler, and more cost effective.

This webinar, shows you why is it important to have a responsive web design for your business. Aaron Bushness and Ted Waller share the insights about the world of mobile and its impact on the revenue of growth in your business.

Watch the webinar here: https://www.youtube.com/watch?v=1vOSBStKZW4

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Send XML File From Client to Server Using REST in a Web API C# Solution

It is a common method to pass arguments to the URI to REST methods:

http://localhost:21608/api/boomerangingTelescopicPhraseMaze/gus/gus/42

What if you need to send something, though it is too long to fit within URI to an entire file? Here’s a much easier way:

        private void buttonIn_Click(object sender, EventArgs e)
        {
            String fullFilePath = @"C:\Platypi\Duckbills_JennyLind_CA.XML";
            String uri = @"http://localhost:21608/api/dplat/sendxml";
            SendXMLFile(fullFilePath, uri, 500);
        }

        public static string SendXMLFile(string xmlFilepath, string uri, int timeout)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);

            request.KeepAlive = false;
            request.ProtocolVersion = HttpVersion.Version10;
            request.ContentType = "application/xml";
            request.Method = "POST";

            StringBuilder sb = new StringBuilder();
            using (StreamReader sr = new StreamReader(xmlFilepath))
            {
                String line;
                while ((line = sr.ReadLine()) != null)
                {
                    sb.AppendLine(line);
                }
                byte[] postBytes = Encoding.UTF8.GetBytes(sb.ToString());

                if (timeout < 0)
                {
                    request.ReadWriteTimeout = timeout;
                    request.Timeout = timeout;
                }

                request.ContentLength = postBytes.Length;

                try
                {
                    Stream requestStream = request.GetRequestStream();

                    requestStream.Write(postBytes, 0, postBytes.Length);
                    requestStream.Close();

                    using (var response = (HttpWebResponse)request.GetResponse())
                    {
                        return response.ToString();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                    request.Abort();
                    return string.Empty;
                }
            }
        }

Read the entire code here: http://www.codeproject.com/Tips/811436/How-to-Send-an-XML-File-From-a-Client-to-a-Server

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

How To Build an Excel View Engine for ASP.NET MVC

If you see an interesting data in MVC application, we expect to be able to download it as Excel spreadsheet. If the application cannot do it, then there is no use telling the user that it is too difficult.

Every time you display a grid of data in Excel, someone will export it in Excel. This shouldn’t be really a requirement since users expect it to happen – an inevitable part of any application that developers should make it easy to provide.

In this post we’ll show you how to build an Excel view Engine for ASP.NET. You’ll see how to apply the MVC framework and design pattern to solve the common recurring problem.

 

View the post here: https://www.simple-talk.com/dotnet/asp.net/building-an-excel-view-engine-for-asp.net-mvc/

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Microsoft Breaks Down The Confusing SharePoint Patch Procedureyout

Microsoft, this week has provided insights to its SharePoint Server 2013 process. What confused developers, wsas the release of the August Cumulative Update for SharePoitn 2013. This version of the update came with the caveat about having to install the July CU first. This lead to conclude that August CU wasn’t a cumulative update after all.

This was then corrected by the Microsoft MVP, Todd Klindt that the August CU is not cumulative. He wrote in his blog post that it does not include the patches from the July 2013 CU. To fix this, install SharePoint Server 2013 SP1, The July 2014 CU, then the August 2014 CU.

Read the rest of the post here: http://mcpmag.com/articles/2014/08/20/confusing-sharepoint-patch-process.aspx

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

How to Secure ASP.NET MVC Applications with ASP.NET Identity

ASP.NET offers Forms Authentication as part of its authentication schemes. Developers use Forms Authentication along with membership, roles and profile features to provide security to the web applications. The needs of authentication schemes in web application have changed. This article will explain how ASP.NET MVC application from the ground up.

ASP.NET Identity is a new authentication system that is intended to replace the existing membership system of ASP.NET. ASP.NET Identity is an OWIN (Open Web Interface for .NET) based library.

 

In this post, you’ll be guided on how to implement security using ASP.NET Identity in an ASP.NET MVC application from the ground up.

Read the rest of the tutorial here: http://www.codeguru.com/csharp/.net/net_asp/mvc/securing-asp.net-mvc-applications-with-asp.net-identity.htm

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Getting Started with AngularJS and ASP.NET MVC Part 2

In the first part of this tutorial, we taught you the basics of AngularJS/ASP.NET MVC application that contains the following:

The boilerplate code to build a Single Page Application (SPA).

Basic routing.

Login and register forms.

However, the application still has a lot of problems in which we are going to solve in part two. This post is shorter, but it has everything in it in one place.

 

In this part, we are going to solve the following:

Ugly URL’s

Ugly views

Basic routing

 

Learn more about this tutorial by visiting this blog post: http://www.codeproject.com/Articles/806500/Getting-started-with-AngularJS-and-ASP-NET-MVC-P

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

SQL Server Microsoft SQL Server Migration Assistant V6.0 Released

Every company makes a different decision about the database to use when they start. However, as soon as they move forward and their decisions mature, which, of course is based on the best interest of the organization. Many organizations make different decisions on database like MySQL, Oracle, Access and as the time pass by, they learn that they want to make a move on a different platform.

So hre are the different tools to help you with that:

SQL Server Migration Assistant is a free supported tool from Microsoft that simplifies the database migration process from Sybase Adaptive Server Enterprise to SQL Server and Azure SQL DB, SSMA automates and all aspects of migration including migration assessment analysis, schema, and SQL statement conversion, as well as migration testing.

Read the rest of the tools here: http://blog.sqlauthority.com/2014/08/09/sql-server-microsoft-sql-server-migration-assistant-v6-0-released/

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS