Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Publish or Deploy website in our local machine using asp.net

Sep 4, 2010
Here I will explain how to publish or deploy the website in local machine. To publish website first we need to check whether IIS installed in our local machine or not and whether that IIS working properly or not because sometimes IIS will not work properly even that IIS already installed in our local machine for that reason we need to check all these conditions before going to publish or deploy our website in local machine. 

After that now open the application in visual studio whatever the application we need publish. 

1.  1) Open the website in that top we have options Build click on that you will find Publish website click on that it will open one wizard in that it will ask target location i.e., the place to save the published application (ex: Create one folder on desktop or any location give that path by using browse button beside of that textbox).

2.  2) Click on publish it publish all the files into target folder i.e., target location.

3.  3) Now go to the folder whatever we have given in target location copy that folder and place it in wwwroot folder(path of that folder is C:\Inetpub\wwwroot)

4.  4) Now open the Run in StartMenu and type inetmgr  and Click Enter it will automatically redirect to IIS

5.  5) Open the local computer in that open the websites after that open the Default website in that you will find our website because you have already placed our published website in to wwwroot folder. wwwroot folder is the default path for IIS if we place any websites into wwwroot folder it will automatically displays under Default Website

6.  6) Click on the your website right side it will display all of your published pages select whatever the page first you need to run right click on that and click browse it will display your published website.

7.  7) At that time if you get any error please right click on website in Default Website goes to Properties and click on Create button and click Ok button. Now browse your default page.

This is the one way to publish the website

Another way is

1.  1) Type inetmgr in run command it will open IIS
 
2.  2) Click on local computer in that open the websites after that open the Default website and right click on Default website in that click New option in that select Virtual Directory click on that one wizard will open click on NEXT after that it will ask Alias name give some name to display in Default website click Next now it will ask path for website give the path of your website whatever the application you to want publish or deploy after that click Next in that select Read, Run Scripts click next click finish button.

3.  3) Now your website has been published open that website in Default website select the Default page right click on that select browse option now your website will display.

4.  4) At that time if you get any error please right click on website in Default Website goes to Properties and click on Create button and click Ok button. Now browse your default page.


If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

28 comments :

LOPA said...

Hi..
I have one major doubt..
How to deploy website with database..means in which path i have to keep my database if that will be in SQL

vana said...

After clicking the create button also my website is not working , when i come to browse.

Mr. Thiya said...

please throw light on how to deploy a web site with database ??????

Gautam Singh said...

but i want to online publish wcf services.

Raghav said...

inetmgr does not open IIS in window7 so what should i do now

Anonymous said...

inetmgr doesn't open!!!!
is there any other way ?

Suresh Dasari said...

If that is the case you should directly open it go to ControlPanel >> Administrative Tools >> click on Internet Information Services (IIS) Manager

Anonymous said...

Thanks I found this solution & it worked for me ...Open Control Panel, Programs & Features, Turn Windows Features on or off, Internet Information Services, Web Management Tools and choose the IIS Management Console...done.

Anonymous said...

I have an error where is properties I
can't find it ??

Anonymous said...

He dude plz help me in my project
i'm having problem in shopping cart pagr

Anonymous said...

will it work for visual studio 2008

Dinesh said...

friend, i have created one website..now i need to host in another machine.for that i need to copy whole database with asp.net pages in websetup format(exe). can you tell me how to achieve this?

Suresh Dasari said...

@Dinesh.....
Check this post i explained clearly how to create setup project to deploy in client machine http://www.aspdotnet-suresh.com/2012/04/visual-studio-create-setup-project-to.html

Anonymous said...

hi it was gud to see ur post!!

H@R$H said...

Good Articles

Anonymous said...

hi,suresh please tell me how to add my DNS to it so that i can ue url and everybody san see it using internet.
it would be very helping

Jatin said...

gr8...

Anonymous said...

Right click doesnot have properties.Could you please post where the properties option is?

Atul Enjoying with studies said...

Method GetUserDetails() is not showing while running service page only helloword is showing.

Gopinath Sastha said...

sir i can't understand a 5th point

Anonymous said...

hi.. I am not getting IIS server... what should i do to get it started? also please let me know how should i know that IIS is installed on my pc or not? thank you..

arvind said...

hello suresh i am getting internal server error

Praveen Reddy said...

sir can't we select direct inetpu/wwwroot folder in the place of targetfolder when we are browsing

Sateesh Kumar said...

The following error is displayed after performing this task :
Click on the your website right side it will display all of your published pages select whatever the page first you need to run right click on that and click browse it will display your published website.

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.

Harish Palsule said...

Following Error Display :

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.








It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\inetpub\wwwroot\online1\web.config line 23)

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\inetpub\wwwroot\online1\web.config line 29)

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\inetpub\wwwroot\online1\web.config line 35)

Dhana V said...

Dear Suresh..,

Your posts are very usefull and understandable keep posting the concepts... :)


Thanks and Regards,
Dhanna V

Nelapati Srihari said...

Dear Suresh
this type of error is occur
how to solve this problem
Error 1 This application is already precompiled.

n narendran said...

Mr. Anonymous ,

If that is the case you should directly open it go to ControlPanel >> Administrative Tools >> click on Internet Information Services (IIS) Manager

...Open Control Panel, Programs & Features, Turn Windows Features on or off, Internet Information Services, Web Management Tools and choose the IIS Management Console...done.

Give your Valuable Comments

Other Related Posts

© 2010-2012 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.