All MVC3 App failing at runtime for same reason - asp.net-mvc-3

I am starting to learn MVC(3) following a tutorial. I am a developer so I know basics and I cannot find an answer on the web that is relavent enough to fix my issue.
All the MVC apps are the default start up code. I select an "internet application" and choose to user HTML5. F6, build works. Rebuild works. F5, debugging is a different story.
Compiler Error Message: CS1541: Invalid reference option: 'C:\Users\Other\AppData\Local\Temp\Temporary ASP.NET Files\root\f20fc565\816eddc7\App_global.asax.lsdrp-bk.dll' -- cannot reference directories
I have searched my disc and no "App_global.asax.lsdrp-bk.dll" exists at all. Please help!

Shut down all of your visual studio web servers running in your system tray.
Delete everything from:
C:\Users\Other\AppData\Local\Temp\Temporary ASP.NET Files\
That's your first step.That's a good starting point.
The error shows up as:
http://msdn.microsoft.com/en-us/library/2zyc8wkc(v=vs.90).aspx
where it thinks App_global.asax.lsdrp-bk.dll is a folder for some strange reason.
Also if you reference any other projects in your solution, re-add those references.

Related

How to I solve a Visual Studio Fatal Error during debugging involving Desktop CLR, CoreCLR and recommending Managed Debugger

I'm afraid the error is so baffling to me I didn't even know how to word the question! I'm writing a plugin that's a class library for a Third Party Application (call it 'ApplicationX'). I had this successfully set up in a debug environment where it would build to ApplicationX's Plugin folder with the .pdb file and then the VS debug would start ApplicationX, thus enabling me to debug the plugin/class library code. This was working fine until I had a System Drive crash >.< (my first ever + ouch!).
Here's the debug setup:
I've just come back to it. I couldn't tell you all the changes, but I'm on VS2022 now as opposed to 2019. Now when I run it (the source code and ApplicationX is still much the same), I get this really weird error:
I've read through all the SO articles I could find and tried the suggesitons therein, but nothings worked. Firstly, I just can't understand the error. Secondly, Are there any suggestions on what to do. Here's what I've tried:
Installing .net Core 3.1 and 6 (full + desktop versions)
In options>debugging>general, checked "automatically close the console when debugging stops"
Some other stuff that I can't remember right now!
Be grateful of any help as this has brought my dev to a grinding halt!
Solution: I got in touch with the author of 'ApplicationX' He confirmed that he'd migrated it to .net Core. So that was the issue. I haven't got the solution in terms of solving it from that perspective, as I switched to the .net Framework version of ApplicationX instead! Non-the-less, the error's a bit clearer.

cannot open visual basic 6.0 project due to component 'msconctl.ocx' not registered error

I have a project in visual basic 6.0 with an error message that,
'msconctl.ocx' or one of its dependencies not correctly registered:
a file is missing or invalid.
Can't figure out what is the problem,
i am also getting an error:- object or with block variable.
please help?
thanks
First, I'm pretty sure that you are talking about mscomctl.ocx (not msconctl.ocx), the Microsoft Common Control library, which is where you get all the common controls (text box, label, etc.) used in VB6. If you don't have this registered properly, VB6 won't run.
You haven't told us if you're using a 64-bit version of Windows or not. This makes a difference. In any case, you should be able to work out a solution by reading This.
MSComCtl.OCX was in 2012 modified in such a way that it became in-compatibable with legacy VB6 applications. MSComCtl.OCX prior to that was working fine. I ran into this and the only alternative left to me was to remove the control from the project ( in my case a Status Bar ) and use a Label field to cover the duties of the Status Bar. Once I was upgraded to a .Net Codebase I re-introduced the .Net Status Bar and things were back to normal. You probably didn't do anything wrong...its just a change to MSCOMCTL.OCX that once applied to your machine will break old VB6 projects that use that control. If you run or attempt to compile the app, VB6 should point you to the line(s) of code encountering the error. That will tell you which control is being victimized. Consider removing the control, and also the reference to MSComCtl, and creating workarounds. Sorry...just another nail in the VB6 coffin. I hate it but can't prevent it. Hope this helps.

How do I debug using MVC in VS 2013?

I have an MVC5/EF app that I can't seem to debug at all. I have a console app also in the project that I can debug just fine, but when I set a breakpoint in a controller it won't debug. I've googled this but can't find anything that can help.
MVC 5 and EF most certainly works in debug. It even debugs jquery. So you must have something not right.
I would check all the projects build debug settings. Make sure build mode is debug.
Add some breakpoints early on to see if they are getting called.
Difficult to pin point the exact problem considering we can’t see your project’s solution.
But for the record, you mention that you have both an ASP.NET MVC application AND a Console application living within the same project.
Since you’re also saying that you can debug the console application, could it be that the Console application is the one that is Set as StartUp project and NOT the MVC application?
If that’s not the case, can you tell us which of your projects is Set as StartUp Project?

LicenseException for SectionReports, ActiveReports 7.0.6158.0

In an MVC app I am working on, we've recently began using ActiveReports 7 for our report-generating needs. On my local machine, everything works great. However, when we deploy to our Dev server for team-level testing, we get a LicenseException:
License for the SectionReport cannot be found.
We followed the user guide here to attempt different ways to resolve the problem.
What we have done:
Ensured that the licenses.licx file references the assemblies, and that the correct ActiveReports 7 assemblies are being built with and referenced by our project. As it stands, the licenses.licx file looks like this (sans the line-breaks):
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v7, Version=7.0.6158.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport, GrapeCity.ActiveReports.Export.Pdf.v7, Version=7.0.6158.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
As this is a MVC web project, used the Assembly License Generator that comes with AR7 to create an [Assembly].Web.License.dll library, which we are building with the project in a /lib/ directory at the solution-level. This change had no effect on the License exception.
Used the Web Key Generator to create a key for the App.config file. This change had no effect on the License exception.
What we have not done:
Created some web form, and created an App_License.dll library that gets built with our project. The reason we did not do this is we are not using Web controls for our reports, we are not even using the GrapeCity.ActiveReports.Web assembly, and the error is not coming from any class in that library (which is logical, seeing how we're not using it.)
The only notable detail of all of this is that modifying the licenses.licx file had an early effect as we had a similar license exception on another component; ensuring that licenses.licx had the proper details ensured that that other component was no longer throwing LicenseExceptions in our app. I tentatively think from this that maybe my licenses.licx file still lacks something needed to make this app work.
The only thing remaining I can think to do is to recommend our lead license our server as a developer, but this possibility has already come up, and the direction we've been asked to take is to avoid that route if at all possible. I think it is possible because I have encountered similar posts involving people who followed the steps in the user guide above and presumably were able to solve the issue. Yet, for my team, these steps aren't working.
Question: What am I missing?
Using the Assembly License Generator as you have done should do the trick. Also, make sure that you are using the latest version of AR7 as according to this post on the ActiveReports 7 Support Forums, there was a fix done to some later version of ActiveReports 7 to correct some problem with licensing in this scenario. Specifically the steps given from the previously cited post said that following the below steps with the updated version corrected someone else's problem:
Run the program "ApplicationLicenseGenerator.exe" (as Administrator) from a location similar to "C:\Program Files\Common Files\ComponentOne\ActiveReports Developer 7\"ApplicationLicenseGenerator.exe"
Browse to the compiled ActiveReports DLL.
Press the "Generate" Button.
This generates a satellite assembly similar to yourclasslibraryname.dll.GrapeCity.Licenses.dll
Place the DLL in the bin folder of your web project and/or reference the generated DLL in your web service project.
Answer: for non-licensed users, [Assembly].GrapeCity.License.dll must be added to the web project as a reference!
Licenses.licx matters from a build perspective, though. But the license file was not missing anything.

IIS Express fails to serve cshtml files

I've just started checking out WebMatrix, and am running into a problem. I performed a fresh install of WebMatrix, then started a tutorial which involves creating one small cshtml file. Whenever I try to run the site, I get the following error:
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cshtml' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /Home.cshtml
In the IIS Express Requests section, the page request shows the following error:
404.17 Dynamic Content Mapped to Static Handler
Details: The requested matched a wildcard mime map and was matched to the static filder (What's up with all the typos MS?) handler. However, if the pre-conditions were different, the request would map to a different handler. This can mean that the pre-conditions are incorrect.
I tried reinstalling to no avail. Does anybody have any ideas?
I am running Windows 7 Pro, with IIS 7 installed. (IIS Express is supposed to be able to run side-by-side no problemo)
Thanks much!
It was set to 4.0 -- Uninstalling and reinstalling ASP.NET Web Pages did the trick.
It seems you selected 2.0 .NET framework in Settings section (in WebMatrix). Change it to '.NET 4 (Integrated)'.
Same boat - just toying with it and its "integrated workflow" with VS2010..but alas, it's not as "clean" as one would hope (or maybe just needs more manual tweaking of knobs and switches).
But try this (instead of, or before giving up all hope and re-installing): run Webmatrix in Administrator mode (right click -> runas).
Your solution is something I had to do on the server side though (IIS6/w2k3)....via web platform installer. While it seems odd to install Webmatrix server side, I just gave up and did it anyway to ensure all the dependencies are installed along with it (didn't want to spend or rather waste any more time figuring it out).
Worked for me....after looking glassy eyed with that "but it was working fine yesterday" look. So I hope this saves you (and anyone else) some time and frustration.

Resources