I have a MVC application which is currently checked in through TFS. When i try to run the website, it is working well. However, whenever i do some code changes on the main page which is an .cshtml file, it showing an error "Server Error in "/" application. Resource not found."
I've tried to clean the solution then build again but i am still encountering that error.
I tried to undo pending changes on that .cshtml file. Then it is running well again.
Am I missing something in here? Thanks in advance!
try this:
clean solution and rebuild solution
restart visual studio
get specific version with latest and overwrite everything (be sure nothing is checked out)
Related
I've come across an unbelievably stupid situation with my ASP.NET MVC application hosted in IIS 7.5. Here's the case:
I publish the application to the server and test it. It works just fine
I change anything in the web.config file and then undo the change. So it's in its original state
I test the application again but this time I get
Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. error.
Please note this: I just open the web.config file and edit and then immediately undo that edit. It doesn't matter in which line of which section I make edit. (After all, aren't configuration files there to not have to touch the code?)
Now comes more interesting part.
I copy and paste the latest published files to the application folder
test the application: Still get the same error
I republish the application and copy/paste to the folder, EXCEPT FOR THE WEB.CONFIG FILE. So I don't even touch the "damaged" config file.
Test it, voila, it works.
I just don't get it. Do you have any clue about this issue?
The problem was caused by a third party tool called EntityFramework Profiler with which I traced SQL commands issued by Entity Framework. After removing it from the application, the problem disappeared.
I have VS2013 with UPDATE 2 RC installed.
I just created a new MVC project. Compiled and Run has no problem.
I did a small change on the Home/Index.cshtml view. click save and getting message as
"The process cannot access the file
'C:\Temp\TestMVC\TestMVC\Views\Home\xwfz25mf.3dn~' because it is being
used by another process."
. I really don't understand it. I am trying to save the file index.cshtml, not 'xwfz25mf.3dn~' file. I keep consistently getting similar errors when saving other pages.
before installing the "UPDATE 2 RC", vs2013 worked just fined. no problem with saving files at that time.
Can someone please help and let me what's in the "UPDATE 2 RC" which doesn't allow me to save any files at all!. Thanks.!
I had the same problem with my VS2013 ASP.NET MVC project.
At the end I found that the problem was Skype using port 80.
Closing (quit) Skype it worked!
With my visual studio 2012, there is no problem with the binary version of nopcommerce 3.0. But in the production environment, it shows the following error for the home page:
The view
'Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo' or
its master was not found or no view engine supports the searched
locations. The following locations were searched:
~/Themes/DefaultClean/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Themes/DefaultClean/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Themes/DefaultClean/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Themes/DefaultClean/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Administration/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Administration/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Administration/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Administration/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The view
'Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo' or
its master was not found or no view engine supports the searched
locations. The following locations were searched:
~/Themes/DefaultClean/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Themes/DefaultClean/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Themes/DefaultClean/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Themes/DefaultClean/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Administration/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Administration/Views/WidgetsNivoSlider/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
~/Administration/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.cshtml
~/Administration/Views/Shared/Nop.Plugin.Widgets.NivoSlider.Views.WidgetsNivoSlider.PublicInfo.vbhtml
Source Error:
Line 3: #foreach (var widget in Model) Line 4: { Line 5:
#Html.Action(widget.ActionName, widget.ControllerName,
widget.RouteValues) Line 6: }
Any suggestions please?
I faced the same problem. Even the post is quite old but I think answer can help others. Here is the solution for the problem.
The error comes when we publish the project with precompile option selected. If you publish the project without precompiling, you will not face this issue. Because there are some embedded views which do not work properly when we enable precompiling at the time of publishing.
This looks like an publishing error. It seems you have the views in place and they work correctly on your machine, but on the server it's missing some files that didn't get pushed on your FTP, Web Publish, or other form of deploy you're using.
Try to answer these questions and I'm positive you'll find the culprit:
If you're able to remote desktop to your server can you verify the files exist?
What kind of publishing profile are your using? have you tried publishing locally and verify that the file exist there?
If nopCommerce was added using a nuget package, did you make sure to include the files under source control?
Is this a problem only on your workstation? or do any of your co-workers experience the same thing?
I developed a simple plugin to bar files ending in .exe from being uploaded into my jira app. I overrode the AttachFile.doValidation() method to check for .exe in the filename. If it's there I return an error.
Now when I try to delete an attachment, 9 times out of 10 it won't work. I simply get the error "Failed to delete attachment with id {id}". Nothing in the stacktrace or logs indicated that something went wrong. Then it will suddenly delete succcessfully. I've found no rhyme or reason for this.
Again, I overrode AttachFile, not DeleteAttachment, so I don't know how my fix could be related to this problem. Could it be though??
If I remove my plugin entirely, I still get an error when I delete. The error says "The action can't be completed because the file is open in Java(TM) Platform SE binary". Somehow AttachFile() is leaving a reference to the file, but I have no clue where or how to clean up.
Permissions aren't the issue, because occasionally the delete command will work. It always works when the server first starts up, and after that only periodically.
We've come to the conclusion that this is a Windows-only problem, and Linux doesn't lock files. Our production server is Linux, so I'm not going to spend anymore time on this.
I just when to continue with my web site in Flash builder and there was an error. When I looked into it my Service folder which held my PHP script is missing and unfortunately I hadn't backed up for some months.
Has anyone had this issue and is there a way to get it back? it just disappeared :(
C:\wamp\www\index-debug\services\CustomerService.php is missing
Never happened to me. You can use "Handy Recovery" or "recuva" to get your file back. Good luck with that