Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Loading problem on a web site in .NET 2 using CRM3 web services

10 views
Skip to first unread message

WT

unread,
Feb 24, 2006, 3:21:37 AM2/24/06
to
Hello,
Using VS2005 and .NET 2 (c#).
Working on a web site that connects to CRM3 using it's 2 WebServices, 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 web services.
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

WT

unread,
Feb 24, 2006, 3:37:15 AM2/24/06
to
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 ?
In fact I have installed my web site as an application under Default Web
Site which is the CRM server.
But I was expecting the web services to run normally.
The Web services path are set from web.config, pointing on this 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

"WT" <W...@newsgroups.nospam> a écrit dans le message de news:
ua6XWtRO...@TK2MSFTNGP10.phx.gbl...

Michael Höhne

unread,
Feb 24, 2006, 3:46:45 AM2/24/06
to
I'm not sure why your application requires the Microsoft.Crm.MetadataService
assenbly. If your wrapper assembly only uses web service calls to the CRM
services, there shouldn't be a reference to it. I'm also wondering how it
works on your dev machine. Did you copy the Microsoft.Crm.MetadataService
assenbly from the CRM server to your system and have referenced it in your
project? If yes, you need to copy it to the \bin folder of your web
application, as it's not contained in the GAC of the CRM server.

--
Michael

http://www.stunnware.com/crm

----------------------------------------------------------

"WT" <W...@newsgroups.nospam> schrieb im Newsbeitrag
news:u$AvF2ROG...@TK2MSFTNGP14.phx.gbl...

WT

unread,
Feb 24, 2006, 4:01:35 AM2/24/06
to
No I have not copied it and have no deirect reference to this assmbly.
I have on Web references in my wrapper dll, and a reference to my wrapper
dll in the web site.
My web.config contains the path added by vs2005 to localize the web
services, in a group section :
<applicationSettings>
<WTCRM.CRMWrapper3.Properties.Settings>
<setting name="CRMWrapper3_CRMServer_CrmService" serializeAs="String">
<value>http://wtsrv01/mscrmservices/2006/crmservice.asmx</value>
</setting>
<setting name="CRMWrapper3_CRMMeta_MetadataService" serializeAs="String">
<value>http://wtsrv01/mscrmservices/2006/metadataservice.asmx</value>
</setting>
</WTCRM.CRMWrapper3.Properties.Settings>
<CRMWrapper3.Properties.Settings>
<setting name="CRMWrapper3_CRMServer_CrmService" serializeAs="String">
<value>http://wtsrv01/mscrmservices/2006/crmservice.asmx</value>
</setting>
</CRMWrapper3.Properties.Settings>
</applicationSettings>


??????


WT

unread,
Feb 24, 2006, 5:06:30 AM2/24/06
to
I have no this error installing the site as a web site under IIS
Why ?
Should I use CLEAR and how in my web.config ?
Trace is not showing that the CRM web.config is used ?

CS
"Michael Höhne" <michael...@nospam.nospam> a écrit dans le message de
news: uWLlX7RO...@TK2MSFTNGP15.phx.gbl...

Jonathan Randall

unread,
Feb 24, 2006, 9:15:29 AM2/24/06
to
WT and Michael,

The issue is caused because when you place your under application under the
Microsoft CRM 3.0 web site, your application inherits the settings from the
parent web site. Since the Microsoft CRM application has the two
assemblies located in its own \bin folder, Microsoft CRM functions
correctly. However, your application does not have these assemblies in its
\bin folder so as a result, the application fails to load. Here is some
information that will correct the issue:


Symptoms: When a user attempts to access an ASP.NET web application that
has its virtual directory located under the Microsoft CRM v3.0 Web Site in
Internet Information Services (IIS), the following error will be displayed:

Server Error in '/' Application.
----------------------------------------------------------------------

Further detail on the error includes the following:

Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.

Parser Error Message: File or assembly name Microsoft.Crm.MetadataService,
or one of its dependencies, was not found.

Source Error:


Line 11: <add assembly="Microsoft.Crm.ManagedInterop, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 12: <add assembly="Microsoft.Crm.MetadataHelper, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 13: <add assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 14: <add assembly="Microsoft.Crm.NativeInteropProxy,
Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 15: <add assembly="Microsoft.Crm.ObjectModel, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


Source File: C:\Program Files\Microsoft CRM\CRMWeb\web.config
Line: 13

Assembly Load Trace: The following information can be helpful to determine

why the assembly 'Microsoft.Crm.MetadataService' could not be loaded.


=== Pre-bind state information ===

LOG: DisplayName = Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)

LOG: Appbase = file:///C:/Program Files/Microsoft CRM/CRMWeb/KBTest
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet.config).


LOG: Using machine configuration file from

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\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:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/kbtest/e724dea7/f72fefd/Microsoft.Crm.MetadataService.DLL.


LOG: Attempting download of new URL

file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/kbtest/e724dea7/f72fefd/Microsoft.Crm.MetadataService/Microsoft.Crm.Me
tadataService.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataSe
rvice.DLL.


LOG: Attempting download of new URL

file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/kbtest/e724dea7/f72fefd/Microsoft.Crm.MetadataService.EXE.


LOG: Attempting download of new URL

file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/kbtest/e724dea7/f72fefd/Microsoft.Crm.MetadataService/Microsoft.Crm.Me
tadataService.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService/Microsoft.Crm.MetadataSe
rvice.EXE.

----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300


Cause: Since the ASP.NET web application is located under the Microsoft CRM
v3.0 web site, the application is inheriting settings that are part of the
Microsoft CRM web site's web.config file. The Web.config file for a
specific ASP.NET application is located in the root directory of the
application and contains settings that apply to the Web application and
inherit downward through all of the subdirectories in its branch. In this
case, the Microsoft.Crm.MetadataService.dll and the
Microsoft.Crm.Tools.ImportExportPublish.dll assemblies are being loaded by
the Microsoft CRM web site. These two assemblies are located in the
Microsoft CRM web application's \bin directory. Since these two assemblies
are not part of the custom ASP.NET application, the Common Language Runtime
begins a probing operation to locate the two assemblies. Since the
assemblies are not installed into the Global Assembly Cache (GAC) or in the
custom ASP.NET application's \bin folder, the exception is thrown.

Resolution:

There are four solutions to resolve the error. Each solution is detailed
below.

Solution 1: Remove <add assemblies> entries in Microsoft CRM v3.0 web
site's web config file.

In the <system.web> element of the web.config file, locate the <assemblies>
node and remove the following entries:
<add assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.Crm.Tools.ImportExportPublish, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Solution 2: Install the Microsoft.Crm.MetadataService.dll and the
Microsoft.Crm.Tools.ImportExportPublish.dll into the Global Assembly Cache
(GAC).

The two assemblies that can be added to the Global Assembly Cache are
located in the \bin directory under the Microsoft CRM web site's
installation folder. A typical location would be C:\Program
Files\Microsoft CRM\CRMWeb\bin.

Solution 3: Edit the ASP.NET web application's web config to remove the
two Microsoft CRM assemblies.

Edit the ASP.NET application's web.config by adding the following entries
to the <compilation> element that is nested in the <system.web> element of
the file:

<system.web>
<compilation defaultLanguage="C#" debug="true">
<assemblies>
<remove assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Tools.ImportExportPublish,
Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
</system.web>

Solution 4: Locate the ASP.NET web application in a separate web site from
the Microsoft CRM v3.0 web site.

Using this approach ensures that the application does not inherit any of
the settings from the Microsoft CRM web site.

Jonathan Randall
Microsoft Online Support Engineer - MBS CRM Developer Support

Get Secure! - www.microsoft.com/security

=============================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=============================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "WT" <W...@newsgroups.nospam>
From: "WT" <W...@newsgroups.nospam>
References: <ua6XWtRO...@TK2MSFTNGP10.phx.gbl>
<u$AvF2ROG...@TK2MSFTNGP14.phx.gbl>
<uWLlX7RO...@TK2MSFTNGP15.phx.gbl>
Subject: Re: Loading problem on a web site in .NET 2 using CRM3 web services
Date: Fri, 24 Feb 2006 11:06:30 +0100
Lines: 134
Organization: Wireteam
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <OQVe9nS...@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.crm.developer
NNTP-Posting-Host: laubervilliers-151-13-107-50.w217-128.abo.wanadoo.fr
217.128.177.50
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.crm.developer:8810
X-Tomcat-NG: microsoft.public.crm.developer

WT

unread,
Feb 26, 2006, 5:55:43 AM2/26/06
to
Thanks Jonathan, very clear.
Using the last approach works ...locally on the CRM server.
I am unable to access my app from a remote location.
I am investigating this problem, may be caused by an internal pbin my app.
CS

"Jonathan Randall" <jran...@online.microsoft.com> a écrit dans le message
de news: KctEJzUO...@TK2MSFTNGXA01.phx.gbl...

0 new messages