skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


  2. Hope this helps…

    1. Depends what you’ve changed, some changes might at least require an application pool reset.
    2. Root of what directory? It should generally be inside inetpub/YOURWEBSITEFOLDERHERE
    3. You have assumed that GoDaddy supports MVC 4, I could only find references to them supporting MVC 3 Support

    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:

    1. Editing could have a knock on effect and so i would advise towards a recompile, e.g. change to medium trust might have an affect if DLLs don’t work in partial trust mode, and recompilation might well highlight these issues.
    2. Sounds ok, test by putting a html file up with some text and try and get to it in your browser.
    3. I’ve seen people talking about it, mostly saying it’s not supported, try the MVC deploy instructions above to bin deploy MVC 4; it works with 3, it might work with 4.
    Login or Signup to reply.
  3. 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:

    1. Changes to web.config should not require the project to be recompiled.
    Login or Signup to reply.
  4. 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.

    1.If I change in web.config , then should I recompile my project and upload again?

    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.

    2.Is it correct to copy a project to root of directory?

    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.

    3.What I do wrong?

    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.

    4.how can I see the errors? Should I write a message or what should I do to know more about errors?
    

    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.

      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <customErrors mode="Off"></customErrors>
      </system.web>
    

    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 to Release configuration so that your site runs faster as well as does not display code lines to potentially bad people if an error does occur.

    5.I copied 9 libraries to bin directory…

    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 select Properties. Inside of the properties pane, you will see the option to Copy 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)

    Login or Signup to reply.
  5. 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!

    Login or Signup to reply.
  6. Hope this helps . . .

    Global.asax should be your default index . . . in godaddy server settings.

    I had a similar problem and was able to solve it.

    I have two other mvc application sites hosted on godaddy, but not with their new plesk hosting.

    After calling tech support and not having any luck there I did some reading on their hosting.

    Their plesk hosting must have an index.

    So, a few hours later it dawned on me to point their start point to my Global.asax in their server settings.

    And, viola! my site was up and running.

    Login or Signup to reply.
  7. 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)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search