ASP MVC 2 in server - asp.net-mvc

I have built in visual studio a simple MVC 2, just to see if it work on the server where I'm hosting it. The server has .NET 3.5, that's why I'm using MVC 2 and not MVC 3.
I put the files of the project on the server, but I get this error: Runtime Error
Description: An application error occurred on the server.
I looked up this error already, I changed the config file, but I was wondering what other things do I have to do, like in visual studio. What are the steps to like wrap up the project and put it in the server?
Any help or useful links would be appreciated!

The first thing would be to make sure that you have ASP.NET MVC 2 installed on the server. If not you could do a bin-deployment. Also you might find the following article useful.

Generally, the steps are:
1) Compile your application in Visual Studio.
2) ???
3) Profit.
Seriously though, you haven't provided enough information to diagnose the problem.

Related

Value cannot be null. Parameter name: httpBrowserCapabilities

I just created a new MVC application from VS 2015. Target framework is .NET 4.5.
In the first debug, it shows
Value cannot be null.
Parameter name: httpBrowserCapabilities
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: httpBrowserCapabilities
And the stacktrace points to: System.Web.HttpBrowserCapabilitiesWrapper..ctor(HttpBrowserCapabilities httpBrowserCapabilities) +3511141.
What could be wrong here? I reinstalled Visual Studio yesterday but it still won't fix. What can possibly break this httpBrowserCapabilities?
Reinstalled my Visual Studio, no fix.
The whole situation looks like what is described in these posts:
Webmatrix and iis 8. Default project doesn't not work
Webmatrix only error with ajaxtoolkit.
It just happened suddenly and there is just no way to fix!
It looks like some code somewhere is trying to use HttpBrowserCapabilities to do browser detection. Weird thing is that MVC does not use this at all, and in fact, the only usage of it I can find is in conjunction with Web Forms server controls. If this is truly just a scaffolded project, without any additions by you, then it's possible you chose the wrong project type (though I have no idea why any built-in project scaffold would throw exceptions by default).
Regardless, my best advice is to simply create a new solution, and make sure you choose "ASP.NET Web Application" as your project type.
This is only a makeshift.
I find I could use Local IIS instead of IIS Express to run the web applications.
So it appears something is wrong with the IIS Express. But a re-installation of Visual Studio won't fix it. Neither could a re-installation of .NET framework do.
Anyway, since I have a local IIS, I just change the Servers properties in the application's Properties, Web tab. Have to run Visual Studio as Administrator. And check Override application root URL.
So now I am back in working mode. I will look into how to fix IIS express later. If anyone has a better solution, please share with us. Thanks.

Server error in Web Config of VS ASP.NET MVC Solution

I recently inherited am ASP.NET MVC website to hots on my server from a different team within the organization. The solution was built in VS 2012 and I am testing it in VS 2013 before I start hosting on the serer. There were a number of assembly dependency issues that I have fixed - I updated MVC in Nuget and also had to install and earlier version of EF (4.0.0.0) to get the solution to compile.
Now I am faced with another issue in the Web.Config file. The following screenshot presents the issue I am having:
There are only 3 scenarios that I can think of that is causing this which are the following:
1) Something happened when I updated MVC
2) Something happened when installed EF 4.0.0.0
3) The connection string to the old server is still in Web.Config
(the only reason I don't think this is the issue is because the
database it is calling is still in existance and the data is still
there)
I was hoping somebody with more experience with MVC and/or EF could help me troubleshoot this.

.Net MVC Web Deployment

I have Visutal Studio 2012, MVC 4 & Razor. I am having trouble getting a website up and running with this technology.
The Web Server is a Windows Server 2008 server. I tried deploying using the Web Deploy method but am consistently getting something like 'set ACL" error.
I tried deploying using the File System. All files got deployed, but when I try and run the website, it fails because of missing ASP.NET MVC infrastruccture files.
Two things:
•If I use Web-Deploy, how do I solve the ACL error, because I assume with this method, everything needed will get deployed.
Note that the Web Deploy 3.0 service is on the server and started.
•If I use File System, where can I find the downloads needed to deploy on the server where MVC WILL work.
◦Note that I downloaded the 4.5 Framework and was successfully installed.
You need to be a bit more precise with what you need help with.
What's the exact error.
Often times you need to give the IIS users group access to at least read from the directory where you've deployed. Did you do this already?
Do you have .NET 4.5 and MVC4 installed on the server? If not, are you expecting those DLLs to be "packaged" with your deployment? They generally are not since they are "standard" assemblies. But if you want them to be included in your deployment you can do that by selecting the references in VS and saying "copy." This is not recommended because when you install patches to .NET and MVC on the server, those updates will not carry through to your app, since it'll use the local (old) copies of your assemblies.
This may be more of an IIS issue, but not sure based on the details in your question.
Check that the application pool that the site is running under is using .net 4.0.
Just a thought I would check.

Trouble publishing VS 2010 ASP.Net MVC 3 Razor web application to IIS 6/7

I have been trying to get my feet wet with MVC by building a simple CRUD web application linked to a SQL 2008 database. Everything works great when I run the project from within VS, but I have run into nothing but failure after failure trying to get the application to publish successfully using either IIS 6, or 7.
I have googled my fingers to the bone trying various fixes and methods for publishing, but so far have just been running into wall after wall. I feel like there must be something basic I am overlooking to get this going, but I am stumped.
I was hoping that someone with more experience working in this environment might be able to suggest some rookie mistakes I could be making, or any tips for publishing an MVC web app for the first time.
Thanks in advance,
Patrick Sean Henderson
We really need more information but making some assumptions here are things to verify:
Assumptions:
IIS 7.x
Proper .NET version installed
VS2010 & NuGet
File System Based Deployment
Suggestions:
Make sure you include the deployable assemblies required.
Right Click MVC project in VS
Select "Include Deployable Assemblies"
Check off the required assemblies
I'd have more with more background details
Post an update when you can!
Brent

Cannot create asp.net mvc view using visual studio 2010, please help

I am mvc 2 newbie. got this weird error message, couldn't figure out how to fix it.
I am using visual studio 2010 and my project is asp.net mvc 2 using .net 4.0
I right clicked inside the action method to generate the view. It kept giving me error message. I dont have that problem before, only happened in this project.
If it happens on everything, try reinstalling Visual Studio.
If it's a problem only with MVC Framework, try dwonloading it from here http://www.asp.net/mvc and install again. FileNotFoundException in the VS directory indicates that probably some required files are missing.
I assume Tut.Domain is something you have built? If so, you either are not building it, or it is not located in the correct location for the application to pick up. If you read the end of the error message, prior to stack trace, it mentions Tut.Domain, which is where your troubleshooting should begin.

Resources