Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2e9c43658e374d290a2de15d25134ac8 > files > 832

db4o-doc-8.0-1.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="120" MadCap:lastWidth="624" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Platform Specific Issues|Web Environment" MadCap:InPreviewMode="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="index.xml" MadCap:SearchType="Stem">
    <head><title>ASP.NET Assembly Naming</title>
        <script type="text/javascript">/* <![CDATA[ */
window.onload = function(){
	var pathToFlash = $('html').attr('MadCap:PathToHelpSystem') + 'Content/Resources/Code/ZeroClipboard.swf';
	ZeroClipboard.setMoviePath(pathToFlash);
			
	function bindToClipBord(element,content){
		var clip = new ZeroClipboard.Client();
		clip.setText(content);
		clip.glue(element);
	};
		
	if(location.protocol==='file:'){
		$('.copylink-marker').remove();
	} else{
			$('.copylink-marker').each(function(){
				var text = $(this).parent().parent().children('.prettyprint').html();
				$(this).hover(function(){
					bindToClipBord(this,text);
				},
				function(){});
			});	
	}		
	prettyPrint();	
};
                /* ]]> */</script>
        <link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
        <link href="../../Resources/Stylesheets/OnlineStyle.css" rel="stylesheet" />
        <script src="../../SkinSupport/MadCapAll.js">
        </script>
        <script src="../../Resources/Code/prettify.js">
        </script>
        <script src="../../Resources/Code/lang-vb.js">
        </script>
        <script src="../../Resources/Code/jquery.min.js">
        </script>
        <script src="../../Resources/Code/ZeroClipboard.js">
        </script>
    </head>
    <body>
        <p class="MCWebHelpFramesetLink" style="display: none;"><a href="../../../index_CSH.html#platform_specific_issues/web/asp.net_assembly_naming.htm" style="">Open topic with navigation</a>
        </p>
        <div class="MCBreadcrumbsBox"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="../../platform_specific_issues.htm">Platform Specific Issues</a><span class="MCBreadcrumbsDivider"> &gt; </span><a class="MCBreadcrumbsLink" href="../web_environment.htm">Web Environment</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">ASP.NET Assembly Naming</span>
        </div>
        <p>
            <script type="text/javascript">/*<![CDATA[*/document.write('<a href="' + location.href +'">');
				document.write("Direct Link");
			document.write('</a>');/*]]>*/</script>
        </p>
        <p>
        </p>
        <h1>ASP.NET Assembly Naming</h1>
        <p>If you are creating your application in <span class="MCPopup"><a href="javascript:void(0);" class="MCPopupSpot" onclick="FMCPopup( event, this ); return false;" MadCap:src="../asp.net.htm">ASP.NET<img style="border: none;margin-left: 5px;" src="../../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../../SkinSupport/ExpandingOpen.gif" class="MCExpandingIcon" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../../SkinSupport/ExpandingOpen.gif' ); }" /></a></span> 2.0 you should take into consideration that the assembly names are generated automatically on each build by default. Db4o distinguish persisted classes by name, namespace and assembly. So after the assembly name has changed, you won't be able to access classes saved with the previous version of the assembly.</p>
        <p>There are several workarounds:</p>
        <UL>
            <LI value="1">You can create a separate class library keeping db4o logic and persistent classes. This can also help if you need to access fully trusted db4o library from partially trusted ASP application</LI>
            <LI value="2">You can build your ASP.NET2 application manually using aspnet_compiler utility from .NET2 SDK.</LI>
            <p><code>aspnet_compiler.exe -v /WebSite -f -fixednames c:\WebSite -c -errorstack</code>
            </p>
            <p>Microsoft has published a how-to for <A class="" href="http://msdn.microsoft.com/en-us/library/ms228040.aspx">using the aspnet_compiler to generate fixed names for ASP.NET assemblies</A>.</p>
            <LI value="3">You can use db4o <a href="../../configuration/common/alias.htm">aliasing API</a> to redirect saved classes to the new assembly name. The following method should be called before opening database file to make all the classes within the namespace available after assembly name change:</LI>
            <p MadCap:conditions="Primary..NET,Primary.c#,Primary.All languages">
            </p>
            <p MadCap:conditions="Global.Primary:cs">
            </p>
            <p MadCap:conditions="Primary..NET,Primary.VB.NET,Primary.All languages">
            </p>
            <p MadCap:conditions="Global.Primary:vb">
            </p>
            <p>You can use TypeAlias for aliasing only specific class.</p>
        </UL>
        <script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
        </script>
    </body>
</html>