I am trying to combine Asp.Net Webforms and Asp.Net MVC together for hybrid application, as per our requirement. I am referring the hanselman's article for this. It is working fine while running from Visual Studio. But when I have deployed over IIS7, it is giving issue when I tried to visit page which is there, developed using MVC.
It is giving 500 internal server error. And when I try to debug the deployed site it is not even hitting the controller but directly giving error.
I am unable to found the issue and also unable to run page developed using MVC.
Please let me know if any further details needed.
Attaching image here.
I think I have found the issue. In deployment dll's are not copied perfectly. So, I updated Entity Framework, clear everything and redeploy it again. It works.
Thanks.
Related
I have an MVC project that is failing once I deploy to Azure because it's trying to load an MVC4 assembly. I have upgraded the project to MVC5.
I am trying to find what has a dependency on the MVC4 dll.
How would I go about finding what is causing it to try and load the MVC4 dll?
Fusion logs are the way to go for something like this. Here's a handy little blog that sums up the registry changes you need to add to capture the log on your instance. Add this as part of a startup task. In this post he also gives the location to the log viewer (on your local dev machine) that you can use to view the log.
Is this the same issue that you asked a week ago and received an answer for? https://stackoverflow.com/questions/19716911/web-role-fails-on-azure-after-upgrading-from-mvc4-to-mvc5/19733292#19733292
Rick's Fusion Logs option is also a great way to determine this.
Today I have been battling with a very odd issue. I spend my days developing an ASP.NET MVC3 web application that used to be ASP.NET 4. It not is now half MVC3 and half ASP.NET 4 all running under the same application. This is all fine.
Today we set up a brand new staging environment (Server 2008 R2), deployed the code and ran the app. Only to get HTTP 404 errors when trying to access any MVC page, all aspx pages worked fine. To prove that the issue was environmental we deployed the same code to a new application on the development box and this worked without a hitch.
After spending all day making sure both environments were exactly the same (IIS Role Services, Windows Updates, Installed Applications.. everything) I then noticed on the 404 error page that the Handler for the request was "StaticFile".
After a bit of googling I came across the option in the title
<system.webServer><modules runAllManagedModulesForAllRequests="true"></modules></system.webServer>
This now works, so I assume the modules used for none static routes isn't being called without it (forgive me if I’m being naive).
The thing is, on our development environment, the web.config doesn't have this attribute.
So why does it work without it on one server and not on another. Surely its less efficient to be calling all modules for all requests.
If anyone has any idea's to why this might be happening I would be eternally grateful, as although our staging environment now works, i hate not knowing exactly thy.
thank you!
The first thing I would check is to ensure that the following update is applied to your new brand new staging environment as it may have already been applied to your existing development environment and would explain why one environment is working and one is not: http://support.microsoft.com/kb/980368
For more information about static file routing, the hotfix above and general "how does extensionless routing" work, I recommend reading the following article: http://blogs.msdn.com/b/tmarq/archive/2010/04/01/asp-net-4-0-enables-routing-of-extensionless-urls-without-impacting-static-requests.aspx
I am currently working on a tool and writing it in MVC SPA (single page application) and just now found out it was removed from the final release. What does that means to my project. do i have to stop working and move to MVC Internet application. I have not found much info in http://www.asp.net/single-page-application
Please let me know the effects and possible work around on this issue
Thanks
You can download the SPA source code from the ASP.NET CodePlex page and compile it, then include the binaries in your application. The current version is not 'complete', but the code that you've been depending on should still be as supported as it was in the Mvc 4 Beta release if you do that.
I have MVC3 installed on my dedicated server and I have an mvc3 website running there, the problem is:
In some pages I get this error:
"Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0"
And I don't know what is the problem because it didn't happen before in this website or any MVC3 website on the same server.
Note: The issue is happening in some pages I am using grid helper in, but there are some other pages has grid helper and working fine.
I tried this as well: http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx while i know it is an old post, but with no hope as well.
You must have installed or updated some NuGet package in your project that depends on Razor WebPages v2 (System.Web.Helpers, Version=2.0.0.0) which is part of the upcoming ASP.NET MVC 4 release.
Take a look at all the referenced assemblies and inspect their dependencies.
When I installed MVC4 beta on a development PC, it had a template for SPA (Single Page Application). Today on a different PC with the same setup (VS2010 SP1, win7), I installed MVC4 RC but no longer is the SPA template available (see image). Any one else having this issue? or is this a documented change that I could not find?
Changes from ASP.NET MVC 4 Beta
The major changes from ASP.NET MVC 4 Beta in this release are summarized below:
Removed ASP.NET Single Page Application: ASP.NET Single Page Application (SPA) shipped with ASP.NET MVC 4 Beta as an early preview of the experience for building applications that include significant client-side interactions using JavaScript. SPA won’t ship with the final MVC 4 release, but will continue to evolve outside of the MVC 4 release. Check out the ASP.NET SPA home page for details.
...
http://www.asp.net/whitepapers/mvc4-release-notes
P.S., Wow I am glad that I didn't use it for an app I build right now. I was considering it 3 months ago, but decided not to risk it because MS said that it is experimental.
You can get the SPA template in the Fall 2012 update. More information on the template here and here.
It`s very risky now
For example if you try to run it with System.json for serialization it runs well with WebApi and DBDATAContext methods but it`s impossible to use it with Entities relationship entity circular errors and so on. (There is a solution to change private access of method get, but would be too much work to have to change in all the access methos of all your entities.