Solved

Publish ASP 2010 C# website

Posted on 2012-04-09
5
489 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

713 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