Nopcommerce nivo slider view not found in production environment - asp.net-mvc
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?
Related
Does Azure ever cache old versions of views in an app service?
A view called SideBar.cshtml view was moved from ./ to ./shared. I get the expected results without error on my local instance of IIS express. I built and released via Azure Dev Ops but when I navigate to the page in question I receive the following error and the page fails to load. SideBar.cshtml(6): error CS1061: 'SideBar' does not contain a definition for 'InvitationsActive' and no extension method 'InvitationsActive' accepting a first argument of type 'PeopleHubSideBar' could be found (are you missing a using directive or an assembly reference?) The property in the error above called InvitationsActive was renamed to EnrollmentActive post-move. So, to me its as if azure is looking at the old view in the old location. The repository Azure DevOps is correct so I know its nothing with the code as it exists on my local. I have tried restarting the app service to no avail. I was thinking that Azure somehow cached the old view, but I do not see anyway to clear the cache. Any help would be useful.
I was able to fix the issue by fully qualifying the call to Html.Partial. Still not sure of the root cause but I hope this helps someone! Not working #Html.Partial("SideBar", sideBar) Working #Html.Partial("../Shared/SideBar", sideBar)
Power BI embedded Issue
I am trying to integrate the power bi report with our asp.net mvc application. So I found this https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-get-started-sample/ article and followed the steps. I have successfully created the workspace collection and generated the access keys. And I downloaded this https://github.com/Azure-Samples/power-bi-embedded-integrate-report-into-web-app/ sample application as specified in the article and ran the ProvisionSample contsole application. I selected the 5th step and provided the appropriate values for workspace collection name and access key and it throws the following error "Operation returned an invalid status code 'Forbidden'". I looked at the audit logs and there is no error. Anyone have idea what causes for this issue?
There is an issue going on right now that is effecting some parts of the world. We are actively working on a fix.
404 error when accessing Struts2 Web application
I had created a web application and committed the code in CVS. The web application is working good in my machine. When i tried to import the same code in another machine i am getting 404 error. I tried importing the code via ftp from my machine to another machine and also checking out the code from CVS. But still i get 404 error. I also noticed that there is no error that had been captured in the console or in the application's log. Could someone help me in how to proceed further in identifying the issue. Please let me know if i need to post any further details regarding the issue. I notice this issue to be in the Websphere server. I tried hosting the application in different machine and found that in few machine the same code is working good and some it is not. Is there any way to compare the server configuration?
In the WAS server 6.1 i added the below value in the web container and the application worked fine. Steps: In the server admin console, click on Application Server--> --> Web container--> custom properties. Add the name as com.ibm.ws.webcontainer.invokefilterscompatibility and value as true. Thank you all for the response.
server error in '/' application. resource not found (when modified)
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)
How to load Crystal Report from database in MVC 4? [duplicate]
I am trying to run a crystal report from my web application which was built using ASP.NET 4.0 and Visual Studio 2010. I have installed the following from the SAP site (http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp) 1) SAP Crystal Reports, version for Visual Studio 2010 - Standard EXE installation package which installs the software into the Visual Studio IDE. 2) SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit) I have a page called Reports.aspx in which I have a crystal report viewer control <CR:CrystalReportViewer ID="rptViewer" runat="server" AutoDataBind="true" /> In the Reports.aspx.cs file I have the following code: protected override void OnPreRender(EventArgs e) { ReportDocument report = new ReportDocument(); var path = Server.MapPath("Reports/Sample.rpt"); report.Load(path); report.SetDatabaseLogon("username", "password", "servername", "databasename"); rptViewer.ReportSource = report; } On the report.Load(path) line I get the following error: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack. How can I fix this?
I also got into the same problem my problem was report path was not valid, May be you have same problem , check Server.MapPath("Reports/Sample.rpt") returning valid path ?
make sure the report is in app_code folder initialize a new instance of it instead of initializing a reportdocument and loading the report in it. Sample report = new Sample(); this worked for me
You will need to modify two properties in the .rpt files: Build Action is set to "Embedded Resource" by default. Change it to "Content". Copy to Output is set to "Do not copy" by default. Change it to "Copy always". Rebuild, Build deployment package and Publish. Done!
NOTE: Below, the term "WebSite" refers to actual web site nodes in IIS, NOT a virtual directory within a web site. Problem Root Cause: There is no "aspnet_client" folder accessible by the application. This can happen for several reasons: Since the SAP CR installer appears to install the aspnet_client folder in the ...\inetpub\wwwroot\ folder, if your Web Site physical path is NOT ...\inetpub\wwwroot, your application will not have access to the aspnet_client folder. If the aspnet_client folder was moved or deleted from to the top level of your web site's physical path, your IIS application will not have access to the folder. Problem Solution (For Windows Server 2008 R2) Go to the IIS manager on your server Expand the tree view node for the WebSite running your application Look at the level immediately under the web site node and ensure you see a "aspnet_client" folder. If you do see the folder, then perhaps this root cause is not the cause of your problem. If you do NOT see the folder, search the server's hard drive for it and COPY it to the Web Site's Physical path. Right mouse button click on the Web Site node and click Refresh from the popup Menu You should now see the aspnet_client folder at the level directly under your web site node and the reports in the application should work.
I ran into this when I converted a web site to a web application. The report would run fine on my dev machine, but not on the server. Then I realized the rpt file was missing on the server! By default the report files were considered embedded resources and were not copied when the web application was published. I just changed them individually, republished the site, and all was well again.
I have also had a report load failure if I have mistakenly left the report file open in crystal reports designer.
This error is a real treat, and seems to have many possible antecedents. Fortunately I only wasted a day on my particular variation: ReportDocument.Load() also makes a local temp copy. (This may only be in the case of a load from a network drive location, I didn't test this in the case of a local load.) If the user context under which the load occurs does not have authority to create the temp file locally, Load will fail with the same very unhelpful error. Also, I ended up diagnosing this with Process Monitor. It may be helpful for you as well.
Please make sure your report rpt files are in their original folder. I got the same error first, after I "published" my MVC web site to IIS. I didn't realize that "Publish" didn't put rpt files in the package.
Re-install the "Crystal report engine" to the server Build Action set to "Content". It perfectly worked for me..!