ASP.NET CORE Problem

Discussion in 'General troubleshooting' started by daveharney, Jan 29, 2017.

Tags:
  1. In my first attempt to host an ASP.NET CORE project, I tried a sub directory in my existing domain. I got it running but it was very slow and erratic. I was advised in a ticket regarding the delete of CORE files, that there were problems with running CORE in a subdirectory.

    I bought a new domain and a new hosting contract for the domain. I uploaded my project into the root (not a subdirectory) and it ran a little better, but not much. It seems as if switching between pages is extremely slow if there is more than a minute (or even a half minute) between page switches. But it's very erratic in terms of when it is slow and when it's quicker. I tried reducing the content of my pages to a very tiny amount of content - but that didn't help either. There is no DB involved either.

    To see if there is some problem with my code, I replaced my project with one of the standard MS templates for CORE. Pretty much the same problem with erratic slow times to bring up a page. Sometimes it's quick and sometimes extremely slow - especially if I wait a minute between page switches. The performance is totally unacceptable on WinHost but my project runs perfectly on my local machine.

    When I deployed the project to WinHost, I used Publish in VS2015 to a local file and then used FTP to the root folder of my new domain. I didn't make any other kinds of settings or changes. I submitted a ticket for this problem but I was told there are no special settings or configurations that might help.

    Does anyone have an insight into this problem?
     
  2. Microsoft seems to be going in several different directions with .NET Core, and we've been having problems around the upgrade to 1.1. We're still working on getting it to work the way its supposed to on production servers, so I'm not sure there's any specific issues we could look at regarding performance at the moment. We should know more soon, and hopefully .NET Core 1.1 and 1.0.1 will be workable.

    As you may know, there are two different versions, “Long Term Support” (LTS) and “Fast Track Support” (FTS). LTS (the 1.0.1 version) is said to be focused on stability and use on production sites, and its development will take place more slowly. FTS (the 1.1 version) is the latest version with more new features, but potentially more new issues as well.

    Those versions are supposed to run concurrently on the server, but as I mentioned, we're running in to problems making Microsoft's vision a reality. But we are working on it.
     
  3. Hi Michael,
    After much fooling around - and I must be quick to add that the WinHost support folks were very quick to deal with the problem and very helpful - I rewrote my app in non-Core Asp.Net MVC. My project now runs very well on the WinHost servers. It seems that using Core for projects like mine, deployed to shared hosting service, just isn't practical at this time - at least in MHO. Although there may be some work arounds or clever coding tricks, I'm not that skilled of a developer and have no interest in going down that route - I stick with programming systems that are straight-forward and standard as possible. For my part - I'll just have to keep an eye on Core progress and wait for the dust to settle. I do think that Core will be Microsoft's primary coding system as time goes on.

    Just as an FYI, I posted my experience on GitHub - actually, I didn't realize what I was getting into! Although I didn't mention WinHost by name, I did talk about my hosting service (again - you folks were very helpful). If you're interested you can see the thread: https://github.com/aspnet/Hosting/issues/933

    And, please let me know if you have any other thoughts about this issue.
     
  4. Yeah, I think you've hit the nail on the head. Core will probably be the focus for MS, but at the moment it's still in the early stages, so it's not always easy to work around the growing pains.

    We're making some progress here though, so Core support should be a little better in the (near) future.
     
  5. Hi Michael,
    If possible, please post a link here to any new developments or guidelines for Core on the WinHost side. I needed to develop another small project and decided to try Core again. I was using Adam Freeman's Pro ASP.NET Core MVC book as a guide - which is an excellent book. My little project (which does use a small Sql Server DB) was working fine on my PC. Once I published and tried to deploy it, the problems started again. Unfortunately, the Freedman book focused more on Azure for deployment than something like a shared hosting service. I'm pretty sure I could have worked through the deployment issues but it was just quicker to rewrite it in the previous version of ASP.NET MVC.

    So yes, Core has a ways to go for us developers who just want a straight forward and simple deployment process.
     
  6. Will do.
     
  7. Hi Michael,
    I've tried again with a "hello world" Core program using VS 2017 and got the 502.5 process error again. You can see the problem here http://www.theliberalchallenge.com/coretest I posted on Stack OverFlow if you'd like to follow http://stackoverflow.com/questions/42686224/vs-2017-deploy-net-core-to-shared-host but no help yet. I suppose I could request help from your support group but I hate to keep bugging them with this issue.

    One concern I have is that your guidelines for ASP apps has been to set the Trust Level to Full in the web.config. Web.config isn't used for much in Core but I did edit the small one that is produced by publishing and put in the
    <system.web>
    <trust level="Full"/>
    </system.web>

    I believe I've enabled logging in the web.config file but I'm not sure how to actually use that feature to inspect the log stdoutLogFile=".\logs\stdout"? I just enabled Raw Logs but I'm not sure if that's where these messages will go.

    OOH, Core in VS2017 has a much simpler configuration, but OTOH, it's harder to see what to tweak for deployment. It would seem that a sensible Publish process would take some of the mystery out of this.
     
  8. A bit more....
    I think this article is important for WinHost https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/
    My project is deployed per what the article calls an FDD which means that WinHost needs to have the means to run my .dll. I've run the dotnet command (on my machine) on the dll that I FTPed to WinHost and it executes correctly.

    I'm not sure of the implications of this yet - but perhaps another piece of the puzzle. I'll look into what they call the SCD which uploads a .exe and all other dlls - which is going to consume a lot more disk storage and probably a lot more runtime memory.

    EDIT: OK, I deployed it per SCD as a .exe and it runs correctly - but, this is not the ideal way to deploy this because of the storage and memory issues.
     
    Last edited: Mar 9, 2017
  9. Yeah, there will be problems because we're not yet at full implementation of Core. There are still some nagging issues from a shared hosting platform perspective (and due to Microsoft's...unique, shall we say, dual development path).

    I know we're still working on it, I'll check and see where we are with that.
     
  10. Is there an ETA for when you'll fully support. NET Cote 1.1. I just signed up today because your site says you support .NET Core, but the 502.5 errors I'm getting when I try to use my site and this message thread clearly indicates that you don't really support .NET Core. If you plan to fully support .NET Core soon, please say so. Otherwise I'll be requesting a full refund and take my business elsewhere.
     
  11. Dmitri told me Core.Net 1.1 is not installed yet. May I know when please?
     
  12. Yes, the 502.5 server issue.

    Yes I have been a long time client of wh but next site maybe BlueHost is a better choice. Or, is it?
     
  13. curtis

    curtis Winhost Staff

    .NET Core 1.1 is available as we blogged here - https://blog.winhost.com/asp-net-core-1-1-is-available/
    You may be referring to .NET Core 1.1.1 - which is being tested and will be pushed out hopefully soon.
    As for bluehost, as far as I know, they don't do Windows shared hosting so I wouldn't look to them for .NET expertise.
     
    Elshadriel and Michael like this.
  14. Any news on this topic?
     
  15. We've published a pair of Knowledge Base articles for .NET Core.

    As you can see, we're suggesting that you run the applications "self-contained." It's very likely that we'll soon drop server-side support for .NET Core because their development schedule to is just too frequent (and chaotic) for us to reasonably keep up to date with. .NET Core is not included in the monthly automated Windows Server updates, so it's a manual process for us to update all the servers every time they update the project. And as I mentioned, those updates are coming very frequently.

    Core-to-Core: Converting a Framework-Dependent App to Self-Contained in Visual Studio 2015

    Core-to-Core: Converting a Framework-Dependent App to Self-Contained in Visual Studio 2017

    We understand that running a self-contained .NET Core project puts additional demands on your account resources (memory and disk space), but it's just not feasible for us to maintain it server-side and be able to consistently offer the latest version(s). If you're self-contained you can always be as up-to-date as you'd like to be.

    You also have the advantage of uploading only the elements of .NET Core that your project requires, so the overhead is potentially lower than loading up everything server-side (including a lot of components you may not need).
     
    Gennady Wexler likes this.
  16. I spent a lot of time taking tutorials and learning .NET Core (including version 1.1) and I love it from a development standpoint.
    However I think I'll stick with MVC 5 for now and .NET Framework 4.5.2.

    I was able to deploy a .NET Framework-enabled Core project on Winhost, but I prefer the way that the earlier version (ASP.NET MVC 5 in my case) neatly organizes the .DLLs into subdirectories.
    Upon deployment, .NET Core places most .DLLs in the root directory of your project. Some of the .DLLs are huge.

    If you use .NET MVC 5 and .NET Framework 4.5.2, just remember to set the Trust level to Full in your web.config file.
    Additionally you'll need to remove Microsoft.CodeDom.Providers.DotNetCompilerPlatform from your project. It's best to do it before you publish, or else remove its configuration entirely from the web.config file after you publish.

    Here are a couple links regarding the preceding paragraph that might help:
    https://support.winhost.com/kb/a657/changing-the-default-asp_net-trust-level.aspx
    https://www.aspnix.com/kb/system-componentmodel-win32exception-access-is-denied/

    If you use .NET Framework 4.5 instead (not 4.5.2), you might avert the DotNetCompilerPlatform issue altogether.

    It appears that .NET Core 1.1 (non-.NET Framework) is a bear to get deployed without issues on any shared server. I tried here at Winhost and failed. When deployment gets easier in the future, and it's a more proven platform all-around, I will upgrade my site to .NET Core 1.1 or greater.
     
    Michael likes this.
  17. I have my ASP.NET Core 1.1 application running on WinHost as a Self-Contained application. It runs, but it takes the initial page 30-45 seconds to load, and then another 20-30 seconds to log in through security. Once it's running, the speed is fine, but this initial load time is killing me. I didn't have this problem on Azure or locally on my Windows 2016 server, so I don't think it is an application issue. Any suggestions for making this beast load faster?
     
  18. Update:
    After conferring with the WinHost Support team, (who are EXTREMELY responsive to questions, and very knowledgeable), they helped me to determine that my application was maxing-out the private memory pool reserved for my plan level. (It is a large application.)

    I increased my plan to Ultimate, and all response-time problems disappeared within minutes. I am very pleased with the throughput I'm getting now, and my customers are going to LOVE this site. Thank you, WinHost!
     
    Elshadriel and Michael like this.
  19. Good to hear, David, thanks for the feedback.
     
  20. I recently deployed my first MVC .Net Core 2.0 C# website to the upgraded Winhost Max plan. The memory utilization is below 300 mb. The home page is being redirected permanently from http to https within the startup.cs. All dependencies are minified. The home page has 4 banner gifs - largest one is . 300kb and smallest one is 144.3 kB. jquery-2.2.0.min.js is the largest file. Total page size is 1.4 MB. When tested on https://tools.pingdom.com , total load time is 664 ms with a B 82 performance grade from San Francisco. In spite of the above, the home page intermittently takes forever (20s) to load (not the first time) on Safari on iphone when accessed and re-accessed after an hour or two around South/North Carolina.Sometime it is instant(definitely from cache) . Any idea as to why?
     
  21. ComputerMan

    ComputerMan Winhost Staff

    Contact our support department and ask them to check the Event logs to see if your application pool is recycling.
     
  22. Core in VS2017 has a much simpler configuration, but OTOH, it's harder to see what to tweak for deployment. It would seem that a sensible Publish process would take some of the mystery out of this.
     

Share This Page