My web application is just a simple web application made in VS 2010 MVC 4 without any code from outside. It’s just default application of VS 2010. I have Deluxe Windows Hosting with Plesk. I’ve never changed any feature in my account. I copy all my files to “//Root Directory”. Beside my files I see various folderssuch as: “, plesk, erro-docs, cgi-bin, logs” – I do not have permissions to delete them.
All my projects are “Release” configuration. I’ve tried all ways which I met in the Internet:
1.I copied three libraries to bin directory:
System.Web.Mvc, System.Web.Routing, System.Web.Abstractions
These dll’s I copied from GAC(C:WINDOWSMicrosoft.NETassemblyGAC_MSIL). I putted such strings in web.config: < trust level=”Medium”/>. I used local deployment(to directory) in VS2010 by button “Publish”. No result.
2.I copied 9 libraries to bin directory:
System.Web.Abstractions.dll
System.Web.Helpers.dll
System.Web.Mvc.dll
System.Web.Optimization.dll
System.Web.Razor.dll
System.Web.Routing.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll.
These dll’s I copied from GAC(C:WINDOWSMicrosoft.NETassemblyGAC_MSIL). I used local deployment(to directory) in VS2010 by button “Publish”. I putted such strings: < trust level=”Medium”/>. No result.
3.I copied three libraries to bin directory: System.Web.Mvc, System.Web.Routing, System.Web.Abstractions – these dll’s I copied from GAC(C:WINDOWSMicrosoft.NETassemblyGAC_MSIL). I putted such strings: < trust level=”Medium”/>. I used deployment via ftp option in VS2010 by button “Publish”. No result.
4.I copied three libraries to bin directory:
System.Web.Abstractions.dll
System.Web.Helpers.dll
System.Web.Mvc.dll
System.Web.Optimization.dll
System.Web.Razor.dll
System.Web.Routing.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll – these dll’s I copied from GAC(C:WINDOWSMicrosoft.NETassemblyGAC_MSIL). I putted such strings: < trust level=”Medium”/>. I used deployment via ftp in VS2010 by button “Publish” No result.
5.I’ve tried to upload files via filezzilla. < trust level=”Medium”/>. However it was an idle attempt.
6.I’ve tried to upload files via browsers. However it was an idle attempt.
7.I’ve tried to upload zip-files via browser and extract them at godaddy server. < trust level=”Medium”/>. However it was an idle attempt.
All above-listed attempts result the word on the screen: “nup.com My site is launching soon.”
Nothing changes.
I have a question.
What I do wrong?
I’ve read all articles by Phil Haack http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx. Any help will be gratefully appreciated!:)
7
Answers
I've done all actions to deploy correctly but I copied all files to a wrong folder. The problem was that I just copied all my files to a wrong directory. I called to godaddy support and they said that I copied my files to wrong directory.
When I copied all files to "httpdocs" directory then my mvc 4 application start working!:).
Thank you a lot, guys. Good luck.
Hope this helps…
There are rumours that if you deploy the bin and mvc dll there is a way around this but I couldn’t find any details.
Have a read of the MVC 3 deploy instructions
EDIT: In answer to comment below:
Have you tried bin deploying MVC4?
http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx/
or
http://forums.asp.net/t/1884928.aspx
To answer your question:
Ok – you have a lot of questions inside your single question. I am going to try and take these one at a time as well as some of your commentary so that we can a) understand the build/publish process of an MVC app and b) hopefully get your project running over at GoDaddy.
No, unless you change the web.config locally and you need to upload those changes. If you FTP/connect to the web.config on the actual web server, IIS will automatically restart (reload) your application so that it can apply the web.config changes. After a web.config change, you will notice the first request will take 10-20 seconds. This is IIS restarting your application. If you change the web.config locally, then yes, you should rebuild/reupload.
The way you have phrased this question makes me think that yes, you are doing it wrong. When you create a project in Visual Studio, you get a solution folder on your actual hard drive. If you are compiling that project, then copying the entire solution folder to your web server, then yes, this is not the correct way to do it. What you want to do is create a
Publishing Profile
. You can either deploy your application via Web Deploy (unsure if GoDaddy supports this), FTP, or File System. By going through the Visual Studio publishing process, the compiler a) compiles your application per your settings (Debug or Release), b) applies the proper Web.Config transformations and c) only outputs the files necessary to run your application. The third part is important. All of your .cs files (controllers, models, etc) get compiled into a .dll and that is what needs to be deployed, not the actual source code files. The publishing process does this for you.I would recommend you create a folder on your dev machine somewhere, and then create a publishing profile that publishes your application to that folder. It is the contents of that folder that you want to FTP to your web server. To create a publishing profile, right click your MVC project and select
Publish
. This will bring up the wizard for you to set things up.Kind of hard to say at this point. It could be that you are not compiling your application correctly. FTP sounds bonked, but that is not an MVC/Visual Studio issue. For FTP issues with Plesk on GoDaddy (and other items), check this help link here.
You should be able to control this in your web.config. Open your web.config file up and check for a couple of lines. You want to turn off custom errors and set the compilation to debug mode. This does two things. One, the error you get back from the server will be way more detailed and being in debug mode allows IIS/.NET to actually show you the line of code that is causing the problem.
Be aware that if you do have a web.config transformation, this could actually turn these setting off. Ensure that your publishing profile is set to deploy the
Debug
configuration while you test deploying your site. Once you are happy with your results, set it back toRelease
configuration so that your site runs faster as well as does not display code lines to potentially bad people if an error does occur.Ok, this could also be a problem. You do not need to copy anything to your bin directory. If you want to include referenced assemblies in your published project, all you need to do is open the
References
folder under your project. From there, right click any assembly that you want to include in your project when you publish and selectProperties
. Inside of the properties pane, you will see the option toCopy Local
. Set this to true. This tells the compiler to copy that assembly to the output folder during the publishing process (see, that publishing thing does lots of good stuff for you!) I would do this for all assemblies in your project that are MVC related. You can experiment with this (like one at a time) until you find the right combination of assemblies that you need to include in your project to make it run on the GoDaddy server. I have not used GoDaddy hosting in quite a while, so I do not know what their current capabilities are.Last thoughts, I think MVC 4 is .NET 4 or higher. Ensure that GoDaddy supports .NET 4 or higher or else you really won’t be able to host this on that server (even using bin deploy) and will need to find additional hosting. Azure has some really great deals right now and Gearhost is very reliable but a little pricey (though they are completely simple to use).
EDIT
Just a little more info on GoDaddy – ensure that you set your site up correctly before you try any of this. You need to have Windows hosting (most likely) and it should be setup to use the Integrated App pool (else, it would appear you never uploaded anything since there is no ‘default document’). At this point, I wonder if your hosting account was provisioned correctly for what you want to do. http://support.godaddy.com/help/article/6639/do-your-hosting-accounts-support-mvc3-applications (Yes, I know it says MVC 3, but the setup applies equally to MVC 4)
I had the same problem with a MVC4 I had running on hosting on Godaddy using Plesk. Suddenly, without any changes, site began to display “Site Launching Soon” Page. At first I thought it was hacked. After calling godaddy support, the agent told me that the site must need at least one html file as a start point (index.html, index.aspx, default.aspx – source: http://support.godaddy.com/help/article/60/what-file-displays-when-someone-browses-to-my-domain-name?locale=en&ci=46061), which seemed odd because it was working fine all the time.
Then, after some trial – error stuff, I could solve my problem by going to the Plesk hosting management, and navigate to:
Websites & Domains > [domain name] > Web Server Settings for domain. And there, change the Default Document setting to “Default”.
We never touched that setting, not sure really why it suddenly changed.
Hope that helps!
Hope this helps . . .
I was having the same issue until I set customErrors to off (first line). then I started seeing security policy issues which was remedied (second line).
(I’m using Godaddy)