.NET 2: assemblies not loading pb

W

WT

Hello,

I have copied my web site to a test server(W2K3), this web site is using a
reference to an assembly that wraps all the calls to 2 web services (MS CRM
3.0).
This runs perfectly on my dev environement, but when I copy the web site
using VS2005, I get the following error when trying to run the application:
Could not load file or assembly 'Microsoft.Crm.MetadataService,
Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one
of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or
assembly 'Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].




I tried to add this registry key, but it has no effects, or should I
restarts IIS. Where should this key be created exactly, is it a DWORD ?

Thanks for help
CS
 
W

WT

More Info, the registry value finally has given a more detailled trace, but
I still don't understand why trying to load the assembly of a web service:
it could be on another server ?


=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/WTCRM/
LOG: Initial PrivatePath = C:\WTCRM\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\WTCRM\web.config
LOG: Using host configuration file:
\\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.Crm.MetadataService,
Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WTCRM/bin/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WTCRM/bin/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL
file:///C:/WTCRM/bin/Microsoft.Crm.MetadataService.EXE.
LOG
 
S

Steven Cheng[MSFT]

Hi CS,

From the error message, the problem assembly is
"Microsoft.Crm.MetadataService, Version=3.0.5300.0" which is likely a CRM
server specific assembly. Is the webservice(or the CRM server) deployed on
the same server with your ASP.NET web application or on another server. If
the Microsoft.Crm.MetadataService assembly is not part of your webservice's
client proxy code, the problem should be reside on the webservice server
side. Also, for assembly binding log, we can use the "Fuslogvw.exe" tool
to view it externally:

#Assembly Binding Log Viewer (Fuslogvw.exe)
http://msdn2.microsoft.com/en-us/library/e74a18c4.aspx

You can try tracing it on both the ASP.NET application server and the
webservice(CRM )server to see what's the error's original raising point.

Regard,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi CS,

Glad that you've found the solution and thanks for your update.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Joined
Jun 5, 2010
Messages
1
Reaction score
0
Hi!
How did you got the registry manipulation? I'm still cannot figure out how to do it. Can you give a Step by step instruction?
I had setup but still doesn't work.

Thanks in advance.
Gerardo

WT said:
More Info, the registry value finally has given a more detailled trace, but
I still don't understand why trying to load the assembly of a web service:
it could be on another server ?


=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/WTCRM/
LOG: Initial PrivatePath = C:\WTCRM\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\WTCRM\web.config
LOG: Using host configuration file:
\\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.Crm.MetadataService,
Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WTCRM/bin/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WTCRM/bin/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/wtcrm/5b9338c9/48613cd3/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL
file:///C:/WTCRM/bin/Microsoft.Crm.MetadataService.EXE.
LOG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top