ASP.NET MVC with Plesk - asp.net-mvc

I have an ASP.NET MVC web application that I'm trying to publish to Plesk, but I get a 500.21 Internal Error each time about a bad module.
In general, I'm not sure how to work with Plesk and ASP.NET MVC, this is my first time deploying to a hosting service and I haven't found much documentation on it. Could anyone point me to some helpful resources?? Or copy/paste some good instructions on how to do this? It seems anything that I do find is outdated..

Turns out that Plesk Onyx doesn't support .Net core (or at least GoDaddy won't enable the drivers to support it). I had to transfer it all over to .Net 5 and that solved the problem!

Related

How can I access an ASP.NET MVC application through IIS Express while using OpenCover?

I am using OpenCover to cover a very simple ASP.NET MVC application. It's basically just a shell application: a handful of controller methods and not much else.
I am attempting to user OpenCover to launch an instance of IIS 8.0 Express, through which I will run the MVC application. However, when I try to browse to the site, I get an "Access is denied" 401.2 error. I have tried numerous things to solve this, mostly revolving around different ways to enable Windows Authentication. Most of my attempts have been based on advice from questions like this. Despite my efforts, I'm still getting this 401.2 error. Also, I should point out that when running this application through VS2013, I can access the site just fine.
One final detail is that in order to use OpenCover, I cannot use the full version of IIS because OpenCover and IIS don't work well together, so IIS Express is a must. If there is any sort of configuration details I can provide you with in order for you to better help me, please let me know. Thank you!

ASP.NET MVC 4 on Aruba

i tried to look around but i did't find a solution.
I have a web space on aruba and i want to publish the default mvc 4 internet website (you know...home, about, contacts).
I tried to publish but it dont't work.
I read about putting .aspx (useless cause no aspx pages here) or .chstml (i tried) on the route config, but nothing happend. Always HTTP Error 403.14
Does anyone tried to publish an mcv 4 website on aruba? What changes do i have to do?
I'm using Windows 2008 Hosting with, with ASP.NET 4 and Classic Pipeline
If you referring to Aruba.it hosting solutions, they doesn't support mvc projects..
Look at there Windows hosting solution
It support asp.net not asp.net mvc...
If they were support it they would have wrote it
If ASP.NET works for you, you can bundle the MVC dll's with your project (so that theres a System.web.mvc.dll in your project's bin folder.
And it should just work.
Aruba supports Mvc4. You just have to remember to publish all the dll as told by Mvison (so mvc dll, sql ce dll, and so on) and also give the write permission to that folder, otherwise they won't allow them to run (think it's a safety policy)

self hosting asp.net mvc

Is it possible to self host asp.net mvc inside another application ie. console, windows forms, service etc etc.
I'd like to build an app that offers a web interface to control it and I'd like to use asp.net mvc for the web part of it.
I did take a quick look at Nancy which looks like it would work, though its not asp.net mvc it did support razor although it doesn't have quite the same level of support for it as asp.net (eg. strongly typed views)
I did also find this question but it doesn't really go into much depth
Possible to use ASPNET MVC2 without IIS?
You can use "IIS 7.0 Hostable Web Core" and host the web server as part of any user process, even a console application. The benefit is that it is very similar to full blown IIS (incl config etc) but the web server itself is running in your process.
Have a look at the following articles:
Host your own Web Server in your application using IIS 7.0 Hostable Web Core
Creating Hosted Web Core Applications
Please have a look at http://cassinidev.codeplex.com/
It has many advantages for example
No need IIS 7 on client machine
Support MVC (I have tested myself)
Work well with Windows Form and Web Browser Control for packaging as Windows App
Cross Win OS platform ( Windows XP, Vista, 7) I have test XP with .NET 4 installed
Hope this helps.
I know this question is old, but it is still relevant, so with the .NET Core 1.0 + ASP.NET MVC 6 you can self-host your MVC application easily. You can even combine MVC and WebAPI applications into one, and you can decide later if you want to use IIS, IIS Express or the self-hosting feature of the .NET Core.
You can try it if you follow the Yeoman approach from this post:
https://stackoverflow.com/a/30314393/980247

Deploying EF 4.1 code-first ASP.NET MVC3 to medium trust shared hosting

I think, this is quite common situation nowadays, so its surprising, that I have troubles finding nice and clean solution for it (even here at SO).
I have my ASP.NET MVC3 web application using Entity Framework 4.1 with code-first approach (using DatabaseInitializer to seed default data). I also tried two database options: SQL Express 2008 R2 and SQL Compact 4. Everything is working fine on local.
Now I want to host my app so I found hosting (middle one called 'optimal') and finally (after some issues) got into state, where I am getting medium-trust error (I believe).
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.
Let's take as fact that I can't configure that hosting any way and I do not think, that they are going to switch me to full-trust.
What do I have to do, to make my application work on medium-trust hosting?
Edit: I have found some answers that are usually propagating setting medium trust at local dev and just do it like that, so my question could now be something like:
What are "top 5 reasons" why your ASP.NET MVC3 EF 4.1 app won't work at medium-trust?
Edit: I have added bounty to this becuase I would like to see some discussion.. or at least more oppinions/experiences, containing more than just "set medium trust at local dev". Maybe there is nothing to discuss here, but I am just curious because I already spent more time on this than I would like.
I've seen other people complain of the same error when the server did not have .NET 3.5 Service Pack 1 and were able to work around it by putting the DLLs in their bin folder.
There's also a little more info here about a few things to check:
log4net throwing Security Exception in ASP.Net MVC web application
Do you have the latest EF Code First library? Everything before the RC was not medium trust compatible.
If you are going to use SQL CE 4, it is medium trust compatible but did you deploy the SQL CE database engine files?
Are you sure your problem is EF Code First? AKA - Have you tried just deploying a simple MVC site first and getting it running? Here's an article on setting up MVC in medium trust and another on bin deploying MVC3 for hosts who aren't running/supporting MVC3 yet.

How do I succesfully host a asp.net mvc app on shared hosting without resorting to ugly URLs?

Let's assume we're talking about the recently released Beta version. Specifically I'm interested in a step-by-step tutorial or similar, and I'd be thrilled with information addressing how to do so on CrystalTech.
Ultimately you want a hosting environment that uses Windows Server 2008 / IIS7, which allows you configure things like mappings through the web.config rather than through IIS itself.
Failing that, your only choice is to either ask CrystalTech to enable ASP.NET wildcard mapping to your website or just stick with using .mvc extensions in your URLs.

Resources