Tuesday, October 11, 2016

Asp .Net Core Part 2 : Using Visual Studio

Visual Studio 2015 is the most preferred tool for creating Asp .Net Core Applications. I am starting an Asp .Net Core Web Application from New Project option.


Staring with an Empty project so that we can gradually build the application instead of getting overwhelmed with a plenty of options.


In the Solution Explorer we can see project.json which we already explore in Part 1,




When I run the application I get the Hello World output.





public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.Run(async (context) =>
            {
                await context.Response.WriteAsync("Hello World from Shalvin!");
            });
        }

I am making alteration in WriteAsync method within Configure method.

By running the application again you can see the new output.





2 comments:

  1. Nice blog. Such a great information of Asp.net and Visual studio. Keep sharing and updating your blog it's provide valuable content.
    eCommerce Solution Provider

    ReplyDelete
  2. Very informative post with great details. Thanks for sharing your knowledge. I really appreciate your work. ASP.NET Company India

    ReplyDelete