Ken Kolda
7/14/2004 3:14:00 PM
If you dump the entire exception you should see the runtime''s probing
information after the main exception info. For example, here''s what I get if
I change the full assembly name (with version, public key token and culture)
to just the name "System.Windows.Forms":
=== Pre-bind state information ===
LOG: DisplayName = System.Windows.Forms
(Partial)
LOG: Appbase = C:\Documents and Settings\Kkolda\My Documents\Visual Studio
Projects\RemotingExample\Server\bin\DebugLOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: System.Windows.Forms
LOG: Attempting download of new URL file:///C:/Documents and
Settings/KKolda/My Documents/Visual Studio
Projects/RemotingExample/Server/bin/Debug/System.Windows.Forms.DLL.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Kkolda/My Documents/Visual Studio
Projects/RemotingExample/Server/bin/Debug/System.Windows.Forms/System.Window
s.Forms.DLL.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Kkolda/My Documents/Visual Studio
Projects/RemotingExample/Server/bin/Debug/System.Windows.Forms.EXE.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Kkolda/My Documents/Visual Studio
Projects/RemotingExample/Server/bin/Debug/System.Windows.Forms/System.Window
s.Forms.EXE.
If you can include this info in a post I can try to tell what''s going wrong.
Ken
"Valerio" <spammami@libero.it> wrote in message
news:A06Jc.324$OR2.14971@news3.tin.it...
> Sry, but i''ve the same problem :(
>
> Unable to find file or assembly called System.Windows.Forms or one of its
> dependency
>
>
> Server stack trace:
> at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
> codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
> throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
> at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
> Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
> at System.Reflection.Assembly.InternalLoad(String assemblyString,
> Evidence assemblySecurity, StackCrawlMark& stackMark)
> at System.Reflection.Assembly.Load(String assemblyString)
> at System.Runtime.Remoting.RemotingConfigInfo.LoadType(String typeName,
> String assemblyName)
> at
System.Runtime.Remoting.RemotingConfigInfo.GetServerTypeForUri(String
> URI)
> at
> System.Runtime.Remoting.RemotingConfigHandler.GetServerTypeForUri(String
> URI)
> at System.Runtime.Remoting.RemotingServices.GetServerTypeForUri(String
> URI)
> at
>
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IS
> erverChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders
> requestHeaders, Stream requestStream, IMessage& responseMsg,
> ITransportHeaders& responseHeaders, Stream& responseStream)
>
> Exception rethrown at [0]:
> at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
> reqMsg, IMessage retMsg)
> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
> msgData, Int32 type)
> at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
> at Viewer.ServerControllerControl.Click(Object sender, EventArgs e) in
> h:\progetti visual
> studio\eventsclient\servercontroller\servercontrollercontrol.cs:line 171
>
> is there something else i should know?
>
>
>
> "Ken Kolda" <ken.kolda@elliemae-nospamplease.com> ha scritto nel messaggio
> news:OGnvdjTaEHA.2520@TK2MSFTNGP12.phx.gbl...
> > So, on the server side, you have to tell the remoting infrastructure to
> use
> > the full assembly name as follows:
> >
> > WellKnownServiceTypeEntry e =
> > new WellKnownServiceTypeEntry("System.Windows.Forms.OpenFileDialog",
> >
> >
>
"System.Windows.Forms,version=1.0.5000.0,publicKeyToken=b77a5c561934e089,cul
> > ture=neutral",
> > "OpenFileDialog", WellKnownObjectMode.SingleCall);
> > RemotingConfiguration.RegisterWellKnownServiceType(e);
>
>