Getting unknown error regarding dll file - c#

When I try to run my application, I am getting an unknown error. The error message is as below.
Error 1 The type
'ASP.usercontrols_21_0_unscheduled_angio_event_sheet_ascx'
exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\nanostentv02\f1f02035\c7751ed\App_Web_zxaxdb4a.dll' and
'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\nanostentv02\f1f02035\c7751ed\App_Web_4odgbrwn.dll' C:\Inetpub\wwwroot\NanoStentV02_PL\CRO\21_0_UNSCHEDULED_ANGIO_EVENT_SHEET.aspx 12
The page code for 21_0_UNSCHEDULED_ANGIO_EVENT_SHEET.aspx 12 is as below.
<%# Page Title="" Language="C#" MasterPageFile="~/_PL/CRO/_CRO.master" AutoEventWireup="true"
CodeFile="21_0_UNSCHEDULED_ANGIO_EVENT_SHEET.aspx.cs" Inherits="_PL_CRO_21_0_UNSCHEDULED_ANGIO_EVENT_SHEET" %>
<%# Register Src="../../_UserControls/_21_0_UNSCHEDULED_ANGIO_EVENT_SHEET.ascx" TagName="_21_0_UNSCHEDULED_ANGIO_EVENT_SHEET"
TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ChildContent1" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ChildContent2" runat="Server">
<asp:HiddenField ID="hdnPatientID" runat="server" />
<asp:HiddenField ID="hdnPatientCode" runat="server" />
<asp:HiddenField ID="hdnCEType" runat="server" />
<uc1:_21_0_UNSCHEDULED_ANGIO_EVENT_SHEET ID="_21_0_UNSCHEDULED_ANGIO_EVENT_SHEET1"
runat="server" />
</asp:Content>
Earlier it was working fine but suddenly it stopped working.

Try to clean solution in Visual Studio and build project again. Libraries cached

check these
CodeFile="21_0_UNSCHEDULED_ANGIO_EVENT_SHEET.aspx.cs"
and
<%# Register
Src="../../_UserControls/_21_0_UNSCHEDULED_ANGIO_EVENT_SHEET.ascx"
may be there some assembly name conflict. Try with changing the name of one of them. again Rebuild the solution.

Related

Finding What Populates Content Placeholder on ASP.NET Site

I have very little experience with ASP or .NET but have a need to make some content and style edits to one of such sites. The problem is that I am having a hard time finding the section which I need to edit.
In the main file called default.aspx, there is code like this:
<%# Page Title="" Language="VB" MasterPageFile="~/Company_New_NoMenus.master" CodeFile="Default.aspx.vb" Inherits="_Default" AutoEventWireup="false" %>
<%# Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
content here
The content which needs to be edited is located inside the ContentPlaceHolderID="HeadContent". I cannot find where it is populated. I tried searching the directory of the site to no avail.
If you use Windows Server, IIS and ASP, I would love some ideas about where I could look for it. Could it be set in the environment or be done in some other strange way? How would you look for it?
Any help is appreciated!

An entry with the same key already exists, but no duplicates in resources present

After returning from the holidays, I get the same error message as in the title:
An entry with the same key already exists.
The error points to this line:
<asp:Label ID="lblPersDesc" Text="Placeholder irrelevant" runat="server" meta:resourceKey="lblPersDesc"/>
If I comment this line out, the error appears on the next element with a meta:resourceKey property.
Taken steps to rectify:
Check markup for duplicate Ids
Check database table for duplicate resource Keys
Clear & Rebuild solution
force recompile of the .aspx page
clear resourceProvider cache
Where could the error be located and what could I have been missing?
EDIT: More page markup.
<%# Page Language="C#" MasterPageFile="~/Master.master" AutoEventWireup="true" CodeFile="~/.../...cs" Inherits="..." Title="..." %>
<%# MasterType VirtualPath="~/Master.master" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%# Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content2" ContentPlaceHolderID="cont" Runat="Server">
</asp:Content>

page is missing a HtmlHead control which is required for

I have a website project that include a masterpage : when ı tried to add ajax control toolkit EDITOR, I am getting a error like This page is missing a HtmlHead control which is required for the CSS stylesheet link that is being added. Please add <head runat="server" />.
when ı add masterpage ContentPlaceHolder1 a <form runat="server"></form>, there arent any error but I don't want to add each masterpage form element
how can ı solved this problem?
<%# Page Title="" Language="C#" MasterPageFile="~/AdminPanel/Admin.Master" AutoEventWireup="true" CodeBehind="Tadd.aspx.cs" Inherits="Tadd.AdminPanel.Tadd1" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form runat="server">
<cc1:Editor ID="Editor1" runat="server" />
</form>
</asp:Content>
You should have an head tag in your Master-Page which is run at server:
<head id="page-head" runat="server">
...
</head>
And positioned it in top of your page/html.

Could not load type 'BestPricingEngine.Main'

I have searched through Stackoverflow, Google, and tried different configurations like CodeFile rather than CodeBehind. The error changes slightly but still get it, really stuck on this one. Any help will be appreciated. The exact error is below, my code for that error is below that.
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'BestPricingEngine.Main'.
Source Error:
Line 1: <%# Page Title="Import FBA Orders" Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/MasterPage.Master" CodeBehind="ImportFBAOrders.cs" Inherits="BestPricingEngine.Main" %>
Line 2: <%# Register src="ImportFBAOrders.ascx" tagname="ImportFBAOrders" tagprefix="ucImportFBAOrders"%>
Line 3:
Source File: /Pages/ImportFBAOrders/ImportFBAOrders.aspx Line: 1
<%# Page Title="Import FBA Orders" Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/MasterPage.Master" CodeBehind="ImportFBAOrders.cs" Inherits="BestPricingEngine.Main" %>
<%# Register src="ImportFBAOrders.ascx" tagname="ImportFBAOrders" tagprefix="ucImportFBAOrders"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpSidebar" Runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpMainContent" runat="server">
<ucImportFBAOrders:ImportFBAOrders ID="importFBAOrders" runat="server" />
</asp:Content>
There should not be a period in your BestPricingEngine.Main. The Inherits attribute is normally used in the markup to reference the code-behind of that page.
In other words, looking at this code, I would assume your Inherits attribute should be named after that page's class, which is usually the path of the code-behind file delimited by underscores, and excluding the file extension.
EDIT
Change Inherits="BestPricingEngine.Main" to Inherits="BestPricingEngine.Pages"

Using a repeater with Entity Framework

How can I use a repeater with Entity Framework
<%# Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeBehind="TagOp.aspx.cs" Inherits="canta.TagOp" %>
<%# Import Namespace="canta.POCO.Objects" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentPlaceHolder" runat="server">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="EntityDataSource1">
<ItemTemplate>
<div>
<%#(Container.DataItem as TagObject).IconPath %>
</div>
</ItemTemplate>
</asp:Repeater>
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="name=EnCantamEntities"
DefaultContainerName="EnCantamEntities" EnableFlattening="False"
EntitySetName="Tags">
</asp:EntityDataSource>
</asp:Content>
The code above throws a NullReferenceException
This was my bad.
TagObject was my business layer and i tried to load it like it's an entity object.
I first loaded my data to List<TagObject> then binded the list to repeater.Then my problem solved.Guess I was still sleeping when i wrote that lol :)
This was my bad. TagObject was my business layer and i tried to load it like it's an entity object. I first loaded my data to List<TagObject> then binded the list to repeater.Then my problem solved.Guess I was still sleeping when i wrote that lol :)

Categories

Resources