This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Probing
Once the AppBase is established, the following points describe how assemblies are located.
- Relative references are found relative to the docbase of the page. This is standard IE behavior and is not influenced by either the NGWS runtime or the Assembly Resolver. For example, if the relative reference to foo.dll above were contained in the page www.wingtiptoys.com/pages/customer.htm, IE would expect to download www.wingtiptoys.com/pages/bin/foo.dll.
- Assemblies that are downloaded using the OBJECT tag may also reference other assemblies. When resolving such a reference, the Assembly Resolver will first look at the codebase that the calling assembly came from. For example, suppose an OBJECT tag causes an assembly named foo.dll to be downloaded from http://www.wingtiptoys.com/bin. Foo.dll then references bar.dll. The Assembly Resolver will first look for http://www.wingtiptoys.com/bin/bar.dll.
- If no such file exists, the standard Assembly Resolver probing rules apply using the AppBase as the probing root. If no configuration file is specified, the Assembly Resolver will probe only in the Appbase. If a configuration file is specified, the Assembly Resolver will probe for the assembly using the "Private Path" specified in the configuration file. For example, assuming again that the AppBase is c:\inetpub\wwwroot, and given the following reference:
<object id="myCtl"
classid="foo.dll#fooClass"
</object>
and cfg file:
<?xml version ="1.0"?>
<configuration xmlns="x-schema:catalog.xms">
<AppDomain
PrivatePath="code;dlls"
/>
</configuration>
The Assembly Resolver would look for the following files:
C:\inetpub\wwwroot\foo.dll
C:\inetpub\wwwroot\code\foo.dll
C:\inetpub\wwwroot\dlls\foo.dll
- A few notes are worth mentioning here. First, probing over http is really not desirable for performance reasons -- we should provide recommendations to our customers that reduce the number of probing misses (this is true in general, however the performance cost of probing is exaggerated over http). Second, the Assembly Resolver probing rules also take into account directories named by version number and culture. See How the NGWS runtime Locates Assemblies for details.