Recently I added a mobile version of the site using MVC4 .mobile views. I structured the site in a very similar way to the desktop version by starting from _Layout.mobile.cshtml which pointed to the correct scripts and css designed specifically for the mobile site.
After publishing the site I checked that everything worked correctly which it did just as how it was designed. But shortly I was told that the site was broken. When checking the mobile site I noticed that the _Layout.mobile.cshtml was loaded but instead of the Index.mobile.cshtml which is sent from the Home controller, what was returned instead was the standard Index.cshtml designed for desktop. The desktop Index file was also rendered using the mobile css which caused the whole mobile site to look very messed up. On a side note, no changes occurred to the desktop version of the site.
Republishing fixed the issue, but I also noticed that sometimes it reverts back to displaying the correct views without republishing even after it broke.
I began to research the issue and what I stumbled across discussions about Display Modes not working such as this:
ASP.NET MVC 4 Mobile Display Modes Stop Working
With a NuGet solution that read as deprecated: http://www.nuget.org/packages/Microsoft.AspNet.Mvc.FixedDisplayModes
I assumed that since this discussion was from a year ago talking about early releases it should be fixed by more recent MVC4 updates. My current version was 4.0.20710.0 so I updated to 4.0.30506 using NuGet before doing anything else.
This did not solve the issue but not only that, upon inspecting I noticed the reference System.Web.MVC was still pointing towards the 4.0.20710.0 version dll file.
I am worried about adding an unnecessary fix that is labeled deprecated and was hoping that the MVC update would resolve this issue. Any suggestions?
the package in your link is the package for the pre-release Asp.Net MVC 5. Indeed, they did solve the issue you are having in the Asp.Net MVC 5 package, but it is still pre-release with Visual Studio 2013. In the additional links on the page, there is a link for the non-beta, non-RC release that still applies to Asp.Net MVC 4 (FixedDisplayModes)
Related
I have a project that is written in .NET Core 3.1 and Angular 7. I was hosting this project on a server until yesterday. I had to migrate this project to another server. After the migration, I started to have some issues. Whenever I change any SQL data, the Angular component is not refreshed and not displayed the current changes. However, testing it locally, it was fine and works as expected. But when I deployed to the new server, this problem happens.
Specifically, I have a form that I update the users. The update process is working as expected. Not receiving an error. But When I try to edit it again for test purposes, I see unedited data even though SQL database has the edited data.
I did research and found that this question has been asked here already. I followed all of the answers. The issue was not fixed. After that, I thought this could be an SSL issue because .NET Core 3.1 uses SSL for retrieving data. So I even downgraded to 2.1 but I still have the same issue.
The project is working fine with the old server and locally. But I have this issue with the new server after the deployment. I am not sure what to do after this point. Any help would be appreciated.
After a long research, a lot of debugging and modifications, I found out that (in my case) the issue is not related to .NET core nor Angular. The server has set up that is doing some caching for all sites that go through the proxies for increased performance. This certainly did cause the issue I have. Caching has been removed and everything started to work as expected.
I've inherited a Silverlight/WCF application. (Having worked on .net MVC, and SPA for quite a while)
I tried switching the IIS website folder to see if a tweak to the code and a fresh build would work, it didn't work and I switched back and although the website is functional it has a number of faults.
For some reason the Windows authentication appears to have stopped working, this authorises a number of the admin functions. I think this is broken and so not enabling the functionality in the Silverlight app.
The server I've inherited has the applications as folders in the default website, which is new to me, and quite constraining. I've gone through IISAdmin videos, and learnt a lot, but not enough to fix the issue.
I am unable to get the software to run in VS2013, quite a bump after working on Single Page Applications.
I'm stumped as to how the same code put back no longer works; I've learnt my lesson, but I still need to fix the system. I am not sure whether IISReset would make a difference since the AppPool is recycled every 29 hours. I've found out what the harm in trying is, and so I am proceeding with caution.
So my main goal would be to get the Windows Authentication working again.
I'm developing a MVC 4 website on IIS7.5 and have run across a strange issue that I cannot find a solution for. When I edit or delete a controller, the website doesn't recognize the change and seems to be using a stored version somewhere. I have disabled output cache and kernel cache on the server and added measures to prevent client side cacheing to no avail. This is a really bizarre problem that I haven't been able to find a solution for anywhere. Editing or deleting the controller affects my local machine but not the server!
My web application has been working fine. Just recently, I began trying to add Twitter Bootstrap to my project using NuGet (it doesn't appear that NuGet is the issue because the same thing happens if I add TB manually). After doing so, I noticed that my app was misbehaving ... some items that I was displaying to a page from server-side cache were missing.
As I dug into this, I realized that my app was being re-loaded on almost every call. I placed a break point in BundleConfig and sure enough ... almost every call, I'm hitting the break point.
If I uninstall the package, things start working fine again.
Furthermore, it doesn't seem to be just Twitter Bootstrap. It seems that if I install any new packages into my system, this starts happening ... almost as if I'm pushing IIS Express over some sort of memory boundary?
I've tried to verify some of the normal IISExpress issues with re-compiling ... things being written into bin, etc. But I don't see any activity on that front (and I'm definitely not explicitly writing anything there). I'm not writing to web.config in code or anything either.
Last bit of information -- if I publish the non-working app to my QA server, everything works fine. QA server is full-blown IIS -- not express. This further confirms that nothing is being written into bin or messing with web.config.
EDIT
When I say I added Twitter Bootstrap, I mean that all I did was add it to the project. I haven't even referenced it in any pages. I haven't included it in my bundling/minification, etc. It's basically just sitting there unused but still causes my app to recycle/recompile.
I'm new to both ASP.net and AppHarbor. I also have never deployed an ASP.net application before.
I've set up an MVC4 website using the Visual Studio 2012 release candidate and it is near completion. Locally, it is working fine / as expected.
To send the client a current progress demo, I've been advised that I should use AppHarbor to host the application / website.
I've gone through the process of setting up a Git repository and connecting that with AppHarbor. I then used the Build -> Publish Selection option in Visual Studio to create a 'Web Deploy Package' within my local copy of the repository. Finally, I pushed the files (shown below) that were created to the repository and AppHarbor listed the commit as 'Active'.
However, when I click Go to your application, all I get is this magnificent 403 page.
I've tried a bunch of things (none of which have worked so far) that I've seen in forums (including here and AppHarbor support), including:
Adding a <modules runAllManagedModulesForAllRequests="true"/>
Ensuring I didn't have multiple web projects.
Checking and confirming that there are no errors listed in AppHarbor.
I've turned CustomErrors off, yielding no differences.
I haven't touched any of the .config stuff since I began the project (because I don't know how to use them yet). Perhaps I've just not added something blatantly obvious in there?
You shouldn't use the Web Publish stuff when you want to deploy to AppHarbor. AppHarbor takes your source code straight up, builds it, tests it and deploys it.
Here's a guide on deploying your first app on AppHarbor using Git. There's also a video on the AppHarbor front page that you can check out.