How to get rid of 'System.Web.DynamicData.DynamicValidator' is not defined error during web application conversion - dynamic-data

I am trying to convert a web project to Web Application. After conversion I am getting 'System.Web.DynamicData.DynamicValidator' is not defined error. Any idea how to solve this.
Three references needed for dynamic data are in the bin but still giving this error on designer files.

Related

Using MemoryCache.Default in Module causes Error ASPPARSE: Circular file references are not allowed error during build

In an asp.net webform application project framework 4.7.2 with Option Infer On, including the line Dim cache = System.Runtime.Caching.MemoryCache.Default in a method, causes the Error ASPPARSE: Circular file references are not allowed in several aspx files (no obvious reason for why those files and not others that I can see) when building on our build server.
I don't have any unincluded files (I had an unincluded AssemblyInfo.vb file, I deleted it, no difference).
It's taken me quite a while to narrow it down to this, and I haven't been able to figure it out. Any solutions or suggestions welcome.

Compiler error ASP.NET MVC CS1525

I have just started up a new project and seem to be getting a compiler error from one of the files generated by Visual Studio. This view is accessible and readable by the current solution and I'm not quite sure how to go about solving this.
The error message states that you have a malplaced "=" inside the "Index.cshtml"-file. Find it and remove/replace it and it should be ok!

ASPNETCOMPILERERROR - object reference not set to an instance of object

I am getting ASPNETCOMPILERERROR while publishing a web project.
This project is in .net 4.0 and we are publishing in VS2012.
Build is getting succeeded, but while publishing we are getting following error
ASPNETCOMPILERERROR - object reference not set to an instance of object.
Please let us know how to resolve the issue.
I am able to solve the issue.
One of the dll causing reference issue, but build is getting succeed.
Solved by following these steps
Checked in the temporary folder(C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files) where VS Creates dlls for each page( i have opted for individual assemblies while publishing)
Before creating dlls, it generates .Compiled files and then converts each file to a dll.
we found one of the page is not getting converted to dll, instead it created a file with .delete extension and halted.
Now we ran our application from VS and tried open the page which is not able getting converted to dll.
Now we got the issue as an exception.
Hope this will help some one else.

asp.net error “The type 'typeName' exists in both ”temp1.dll“ and ”temp2.dll"

When I build a web site I haven't got errors, but when I try to publish site the error appears:
Type 'AttachmentsControl' exists in both в 'c:\Users\userName\AppData\Local\Temp\Temporary ASP.NET Files\web.ui.application\8c85983a\5425041a\App_Web_mivbsgll.dll' and 'c:\Users\userName\AppData\Local\Temp\Temporary ASP.NET Files\web.ui.application\8c85983a\5425041a\App_Web_dhvduebi.dll'
I tried to add the batch="false" attribute to the "compilation" element of the web.config file, but this didn't help.
Also I tried to rename one class, but in this case another error appears:
Server Error in '/projectName' Application.
Thread was being aborted.
Can anybody help me?
P.S.: the most strangest thing is that I get this project from MS TFS, my colleague who add this project to TFS publish this site without errors.
Most probably the reason could be you are uploading the source files along with compiled published output and at the same time the source files are modified.
When you see this error, what asp.net is trying to do is, compile the files and create the application and the result is, you have two type declaration of same name, one in the dll and one in the source.
Try to delete the dll file you have uploaded (from the bin directory), it should resolve the issue.

Casting error in ASP.NET

I have a class declared in the App_Code folder. The class contains a public shared method that returns a type Portfolio.
When I try to call this method to initialize an object of type Portfolio in one of the ASCX controls, i get a "Value of type Jaguar.Portfolio cannot be converted to Jaguar.Portfolio" message.
This is a "Website" project. I have tried using CType and DirectCast and I still get the same compilation error when I try to build the site.
I am using the line of code listed below in the code behind file of the ascx control
Dim pObjSvc As Jaguar.Portfolio = ClassName.GetPortfolio
Do you have a webpage or a user control also called Portfolio? You may have a name space collision where it's confused between which Portfolio object to use. If this is the case, you'll need to change the name of the Class/Module or the control's or page's code behind class and you should be all set.
There seems to be someone else with the same problem out there:
ASP Net - value of type "MyNamespace.MyClassName" cannot be converted to "MyNamespace.MyClassName"
I have a ASP.Net application that uses
assemblies from several other
solutions. When testing the
applications on my machine I build all
the referenced assemblies using nmake.
The latest assemblies get placed in a
common directory that is referenced by
my ASP.NET app.
Occasionally I receive the following
error: value of type
"MyNamespace.MyClassName" cannot be
converted to "MyNamespace.MyClassName"
(there are a lot of these for
different classes) when doing a debug
build. I have tried the following with
no luck:
Build the ASP.Net application Rebuild
the ASP.Net application Close VS and
build the ASP.Net application Close
VS.Net as rebuild the asp.Net
application IISreset and build/rebuild
the application
It seems the only thing that works is
if I run nmake to build all my referenced assemblies, I can then
build the ASP.Net application.
Any ideas as to what causes this? Is
there an easier way to fix it?
Sadly, the author of the question did non find a definitive answer. But perhaps it contains a hint which could be helpful to find the solution.
UPDATE: I'm not sure if that is even possible in a ASP.NET website, but maybe you accidentally added a reference to a (temporary) assemmbly of the project itself? That would explain the error. Try also to remove the contents of bin and obj folder.
Just a debugging tip:
Try to rename the Portfolio class and recompile. Maybe there is an old assembly somewhere or some other code in .vb your files which contains a class with the same name?
I have seen situations similar to this when an aspx page was created with the same name as a business object class. Do you have some some aspx page with a code-behind class of Portfolio as well?

Resources