Banner Ad

Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Monday, September 7, 2015

How to Hosting Asp.net MVC Web Application in Local Machine?

By Francis   Posted at   2:32 PM   IIS No comments

                     In this post I’m going to discuss about how to host an ASP.Net MVC Application in your  local machine. Most of the steps to deploy a web form application and MVC applications are equivalent.

Prerequisite:

           In order to explain the steps, I assume you have a complete ASP.Net MVC Application that is ready to build with out any error.

Step 1:

Publish you MVC application in a local file path, using publish option in Visual Studio.

publishOptionInVS

For this example, I have published my application in the below path like : C:\MVCDemo

ASPNETPublishedFiles

Step 2:

Create a Virtual directory in IIS and mapped the above published file path to it.

MVCAppVirtualDirectory

If you have any doubts in creating virtual directory refer my below blog posts:

Create virtual directory on IIS using Visual Studio.

Create Virtual directory on IIS

Step 3:

You are almost done! The only thing pending is you need to browse the website, that just published. This is where most of the ASP.Net developer (especially who is a newbie to ASP.Net MVC), what they were doing : Expand the Virtual directory –> Views –> Switch to content view –> select the cshtml file –> right click on it and click “Browse”, which throws 404 Error in browser.

BrowseMVCFile

404Error

 

The above issue is common to all ASP.Net developers, who are all comes with ASP.Net  WebForm background. In order to browse the  mvc application, you need to mention the path in the form like “http://localhost/YourControllerName/YourActionMethod", which is the url routing pattern specified by default.

 

ASPNetApplication

 

Hope this helps!

Sunday, October 5, 2014

ASP.Net Forums–FAQ #6: ASP.Net Session Expired Problem

By Francis   Posted at   12:29 AM   IIS Tips and Tricks 1 comment
session_expired
Most of the asp.net application using session, especially data driven applications. Mostly these kind of application using “Inproc” mode of session. During development the developer does not face any kind of problem with the session. When deploy the application the problem arise one by one. In this post I just want to share some thoughts and my professional experience on this issue.

Tuesday, September 24, 2013

Create Virtual Directory in IIS

By Francis   Posted at   7:19 PM   IIS Tips and Tricks No comments
                  In previous posts I have explained how to create a virtual directory from Visual Studio.
In this post I’m going to tell how to create a virtual directory in IIS.
What is Virtual Directory?:
Virtual directory meant that, it is a mapping between the actual web application files and IIS. That is we map the website files to the IIS in Virtual Directory. If you see in IIS, it look like a directory but it actually points the exact web application path.
Create Virtual Directory:
Here I’m going to create a virtual directory in IIS for the web application which is located in the path :
“G:\DotNetExamples\AllInOne”.
Step 1:
Open IIS. To open IIS, press windows key + R key, which opens “Run” window and type “inetmgr” and press enter, which opens the IIS.
IIS-Create_Virtual_Directory-1
Step 2:
In IIS, Right click on the “Default Web Site” and select the “Add Application” in the float menu.
IIS-Create_Virtual_Directory-2
Step 3:
In this “Add Application” window, we need to specify the “Virtual Directory” name and the physical directory where the actual web site files are located. Leave the application pool as is. Click OK.
IIS-Create_Virtual_Directory-3
Step 4:
Now the Virtual Directory has been created under the “Default Web Site”. To test the application Right click the virtual directory and choose “Manage Application à Browse” which will open the application in the respective default browser.
IIS-Create_Virtual_Directory-4
IIS-Create_Virtual_Directory-5
Hope this helps!



















Sunday, January 1, 2012

IIS – An Introduction

By Francis   Posted at   6:31 AM   IIS No comments
In my last post I gave a small intro about Visual Studio. This time I come with the small introduction about IIS (Internet information Services), which is formerly called as Internet Information Server. Of course, it’s also Microsoft implementation. IIS is the second web server, used next to Appache Web server. IIS is an integral part of Windows, which means IIS comes as a built in package. By default, the IIS feature not installed in Windows OS, user must install the necessary components. As it name implies, it is a Web server. A web server receives the request/requests and serves the output to the client. Typically, the output is in HTML format.
Connect with Us