Solved

Publish ASP 2010 C# website

Posted on 2012-04-09
5
480 Views
Last Modified: 2012-04-10
I am having VERY VERY VERY hard time publishing my website on server.
PLEASE help.
The website is in C# ASP 2010 and the server is 2003 and I have IIS installed on it.
PLEASE PRETTY PLEASE include step by step instructions on how to do this.
I build the website on my computer which is on the domain and I need to publish it on the remote server.
0
Comment
Question by:pauledwardian
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 37826387
Here is a step by step approach for publishing-
http://www.beansoftware.com/ASP.NET-Tutorials/Deploy-ASP.NET.aspx

Make sure you have .net framework version 4.0 installed on your server.


Regards,
Rikin.
0
 

Author Comment

by:pauledwardian
ID: 37826405
But Copy website is not availble in vs 2010
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 37826409
0
 
LVL 28

Accepted Solution

by:
sammySeltzer earned 500 total points
ID: 37827347
Below is step by step approach I use for compiling and publishing.

Behind the scenes, Visual Studio's Publish Web Site dialog box invokes the ASP.NET compilation tool (aspnet_compiler.exe) to precompile the website. Alternatively, you can invoke this tool from the command line. In fact, if you use Visual Web Developer then you will need to run the compiler tool from the command line, as Visual Web Developer's Build menu does not include the Publish Web Site option.
To use the compiler tool from the command line, start by dropping to the command line and navigating to the framework directory, %WINDIR%\Microsoft.NET\Framework\v2.0.50727. Next, enter the following statement into the command line:
Step 1: Copy this ¿ cd C:\windows\Microsoft.NET\Framework\v4.0.30319 to command line
Step 2: Copy this and change physical path and location folder:
aspnet_compiler -p "physical_path_to_app" -v / -f -u "target_location_folder"
for project hope, use:
aspnet_compiler -p "c:\inetpub\wwwroot\ph_actual" -v / -f -u "c:\hope"
The above command launches the ASP.NET compiler tool (aspnet_compiler.exe) and, via the -p switch, instructs it to precompile the website rooted at physical_path_to_app; this value will be something like C:\MySites\BookReviews, and should be delimited by quotation marks.
The -v switch specifies the virtual directory of the site. If your site is registered as the default website in the IIS metabase then you can omit the -p switch and just specify the virtual directory of the application. If you use the -p switch, the value proceeding the -v switch indicates the root of the website, and is used to resolve application-root references. For instance, if you specify a value of -v /MySite then references in the application to ~/path/file will be resolved as ~/MySite/path/file. Because the Book Reviews site is located at the root directory at my web hosting company I have used the switch -v /.
The -f switch, if present, instructs the compilation tool to overwrite the target_location_folder directory if it already exists. If you omit the -f switch and the target location folder already exists, the compilation tool will quit with the error: "error ASPRUNTIME: The target directory is not empty. Please delete it manually or choose a different target."
The -u switch, if present, informs the tool to create an updatable user interface. Omit this switch to precompile the site with a non-updatable user interface.
Lastly, the target_location_folder is the physical path to the target location directory; this value will be something like C:\MySites\Output\BookReviews, and should be delimited by quotation marks.
0
 

Author Closing Comment

by:pauledwardian
ID: 37830423
Thanks!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now