.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Circular File References

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :ASP.Net

Hi everoyne,

Ok, I've googled this for an extended period of time, but everything I see relates to ASP.Net 2.0, and Visual Studio 2005 and error about file locations and batch debugging, but I'm pretty sure this is not the problem I'm having. Heres the scenario. I have a Master page in my root folder called Site.master. There is a folder in my root called Members. Inside this folder I have two master pages, Full.master and Inner.master that both inherit from Site.master in the root folder. I am getting two Circular file reference errors when I try to rebuild or publish my application. The errors are located in the line 1 of full.master and inner.master here they are


<%@ Master Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Full.master.cs"
    Inherits="Members_Full" %>


<%@ Master Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Inner.master.cs"
    Inherits="Members_Inner" %>

and here is Site.master

<%@ Master Language="C#" CodeFile="Site.master.cs" Inherits="Site" %>



View Complete Post

More Related Resource Links

I want add a dll file without using references through config file? what are the possible way to do

i have used this code in config file: what will be the result of that?   <   assemblyBinding> <   startup> <   location allowOverride="true" path="Microsoft.WindowsAPICodePack.dll"></location> </   startup> </   assemblyBinding>

Alternative ways to handle circular references in WCF service?


I have a huge business library and I am building WCF Service on top of it. I know that since WCF 3.5 SP1 I can serialize circular references using [DataContract(IsReference=True)] but is there any other way?

Could I for example write a custom attribute for a class which tells serializer that every member of the class is a data member?

I am asking this because if I add DataContract attribute to my class I also have to add DataMember attribute to every member I want to share through WCF service. That is a lot of extra work and markup I would like to avoid.

WDP 2010 builds fail, .refresh file references not updated, dll files not copied to bin folder prio


I dont know if anybody else has seen this yet:  We use web deployment projects with web sites (not wap) and upgraded to VS2010.  When we build on our production build server (CruiseControl.Net) We found that the compile step fails because it could not find the dll files referenced in the bin folder .refresh files. 

Since the only the .refresh files are checked in, and we get a completely new copy of the source before every build, the dll files themselves need to be copied into the bin folder as part of the build.

Looking at the original source folder and the \obj folder we can see the dll files are not getting copied.

I think the problem is something in the new WebDeployment.targets file - specifically in the _ResolveReferences target.  I removed the Condition= from the Copy item and (~line 823) and it works fine now.

 <Target Name="_ResolveReferences" DependsOnTargets="_PrepareForBuild;GetRedistLists">
        <CreateItem Include="$(_FullSourceWebDir)\Bin\*.refresh">
            <Output TaskParameter="Include" ItemName="References_RefreshFile" />
        <ReadLinesFromFile File="%(References_RefreshFile.Identity)" Condition=" &#

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

Rendering ASP.NET Script References into the Html Header

One thing that I've come to appreciate in control development in ASP.NET that use JavaScript is the ability to have more control over script and script include placement than ASP.NET provides natively. Specifically in ASP.NET you can use either the ClientScriptManager or ScriptManager to embed scripts and script references into pages via code.

SmtpClient and Locked File Attachments

Got a note a couple of days ago from a client using one of my generic routines that wraps SmtpClient. Apparently whenever a file has been attached to a message and emailed with SmtpClient the file remains locked after the message has been sent. Oddly this particular issue hasn't cropped up before for me although these routines are in use in a number of applications I've built.

How to call an .exe file in .net

Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

ClientAccessPolicy file in SharePoint 2010

I am upgrading my Silverlight demo code from the old beta to beta 2 and see that there are a few new considerations for the deployment of ClientAccessPolicy.xml files. In a previous post I demonstrated how to do this for SharePoint 2007. The heartburn that I get with that approach is any site collection owner or designer can drag the file into the site collection and open the site up to unwanted client access issues. In 2010 the virtual path provider no longer serves the files from the root of the site collection

Multi File Upload Using JQuery!

Everyone knows about the file upload in .NET. But the multi file upload is some what difficult in .NET. For that purpose we can have some AJAX or JQuery!. Jquery is the latest advanced version. It will give some animated upload. You can try it for your own!!!!

Transfering a file from Conputer to PDA

You can transfer one file at a time between your computer and another Bluetooth device by using the Bluetooth File Transfer Wizard. For example, you can transfer files between your computer and a mobile phone or a PDA. You can also transfer files between two computers that use Bluetooth.

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

Xml File Methods and Properties

Method and Properties of XmlTextWriter class:
The XmlWriter class is a base class that outputs an XML data structure. It has methods to sequentially write XML elements in a proper hierarchy to create an XML file or other types of output streams. The System.Xml namespace provides support for the XmlWriter. It must be imported to the ASP.NET page with the directive

<%@ Import Namespace="System.Xml" %>

The XmlTextWriter

XmlWriter is an abstract class that is implemented as an extended XMLTextWriter class. The XmlTextWriter writes a sequence of XML nodes one element at a time. Output can be written to an XML file, although other streams of output data can be produced. It can create a new file or overwrite an existing file. Its non-cached writing techniques provides very fast generation of an output stream.

Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend