The web hosting provider I am using is GoDaddy and I chose Windows hosting since some of my ideas include developing web applications using Microsoft technologies. The following explains how I set up my first web project I am in the process of developing, which was my tracker application.
The first step is to get the web deploy publishing settings for the location you wish to host your web project. In my case I want to host it on a subdomain (which I have already created), but the steps are the same if it is your root domain. You navigate to the subdomain section of where you would like to host your app in GoDaddy’s ‘Websites & Domains’ section. You then click the ‘Web Deploy Publishing Settings’ link to start the download of your settings file (seen in Figure 1 below).
The downloaded file will contain a .publishsettings extension with the contents of the file similar to:
Once you have the settings file you can configure your actual project. With your web project opened in Visual Studio you right click on the project in the Solution Explorer and select Publish.. (or something similar depending on project type) as in Figure 2.
This will present you with the window in Figure 3, where you will select the Import option by left clicking. In the displayed dialog ‘Import Publish Settings’, also displayed in Figure 3, you will browse to your publish settings file, select it, and then click Open; thus, displaying the path to your file in the ‘Import Publish Settings’ dialog as in Figure 4, and then click OK.
Once the settings have loaded enter the password for your account and click Test Connection. If everything is OK you will see a check mark next to the test connection button as in Figure 5.
Clicking Next will then take you to the ‘Settings’ tab. I did not change anything here as I did not see the need for any file publishing options and I do not want the publish to modify my database. I may need to update my publish settings and insert a connection string for my database once I have that configured within my application and will update this post with any such changes. Clicking Next again brings me to the ‘Preview’ tab as in Figure 6.
Clicking ‘Start Preview’ in the middle of the screenshot above (Figure 6) will provide a list of the files being uploaded and the action being performed (i.e. update for files being modified and add for new files being pushed to the destination) as in Figure 7.
Lastly you click Publish to finish off the process which will publish your application to its destination. The output of the file will look similar to that of Figure 8 (I cropped out the middle section as to highlight the start and end sections as well as displaying some of the adds and updates. The web application (at the URL provided) will then open up in your default web browser.
If their are issues with the settings in your application when running on the remote server an error page will be displayed with some information as to what you have to do. At this point it becomes a matter of experimenting. In my case I got a security exception stating “The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file”.
I was able to solve this by adding the following line to my web.config file between the system.web tags and publishing again:
<trust level="Full" />
Through further investigative work I determined a second option is changing the configuration on your hosting provider, if they allow it. In my case that involved selecting the option ASP.NET Settings in the same view as Figure 1 above, which in my case was at the bottom of the 3rd column (from the left). Once in there you set the CAS trust level to Full, Figure 8 below, and while here make sure that the Default webpage language is correct for your application.
That appears to be it for now and will have to see what happens once my web application contains a database and actions are being taken if any further modifications to the publishing settings need to be added or modified.
7 thoughts on “Publish Web Project to GoDaddy”
Pingback: Subdomain within Main Domain Folder | Devin W.C. Ryan
i try the same but still the same errors.
I accessed your site and saw you’re getting a security exception. Have up modified the settings to Full trust in both the web.config of your application and in the ASP.NET settings of your hosting provider?
You could try adding an extra parameter to the trust level tag in your web.config originUrl=””, which was unnecessary for me, but may be worth a try. Googling the message I found this.
What else have you tried?
yes i try all possible way but not success.
If you would like more feedback please provide further details such as:
– .publishsettings file contents
– When you test the connection is it successful (if not have you confirmed proper username, password, server and destination Url are being used)
– Have you confirmed you can connect to the address you are trying to publish to through other means
– Did you select all files in the preview (so you deploy all of them)
– If you are getting this far please provide the output of what you see in Visual Studio’s ‘Output’ window when you click ‘Publish’
Please provide the content of the errors you are receiving along with where in the steps you receive the errors, what actions you were taking, etc. to help with diagnosis.
Thanks to my father who shared with me regarding this webpage,
this webpage is really awesome.