I have a wcf webservice called service1 in solution1
then i created another wcf webservice called service2 in solution2.
then in service2, i referenced service1.
I installed entity framework v5 in both service1 and service2. Then I run a function in service2 which call the function in service1. but i get an exception like:
{"Could not load file or assembly 'EntityFramework, Version=6.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT:
0x80131040)":"EntityFramework, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"}
Could anybody know how to solve that?
Thanks
So finally, i copy paste all the content in the folder "package" from service1 to service2
Related
Could not load file or assembly 'App_Web_itds5u52, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 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 'App_Web_itds5u52, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
The first time I deployed it worked ok.
The second time and since then, it gives me ServiceActivatioException win accessing the services and I get the error above when browsing to the service.svc page.
How can I solve this?
I am using WCF tracing, I don't know if it matters.
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="~/Logs/1OperatorMessagesLog1.svclog" />
Thank you,
Ryan
Clean and rebuild solved it...
I'm try to work on WCF to sync the mobile database with server database. I was using this tutorial. When i try to debug I got 'File or assembly name 'System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found.'. I try to remove the reference and add again but still the same.
Below is the screen short of System.Sata.SqlServerCE.
I recently updated my XP machine now I can't run any of my WCF (.NET 3.5) web apps. It crashes when I call var wsHttpBinding = new WSHttpBinding(); with the following exception:
Could not load type
'System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy'
from assembly 'System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
I have read this post but it did not help. There are many posts at Microsoft that do not help either.
Can someone explain this to me:
I builded an really simple wcf service for testing purposes.
Consuming service from powershell using New-WebServiceProxy I found this stange behaviour:
if in wcf service I have this kind of Contract returning an int:
[OperationContract]
int GetDictionaryLength();
calling this method in powershell gives an error and the definition of the method is not what I would expect to see
PS C:\ps> $a | Get-Member getdictionarylength | fl *
TypeName :
Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1_022s_pwdservice_svc_wsdl.PWDService
Name : GetDictionaryLength
MemberType : Method
Definition : System.Void
GetDictionaryLength(System.Int32&,
mscorlib, Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089
GetDictionaryLengthResult,
System.Boolean&, mscorlib,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
GetDictionaryLengthResultSpecified)
changing the contract like this:
[OperationContract]
string GetDictionaryLength();
do a great job called in powershell.
Why this?
WCF is in .net 4.0
Powershell is V2
Experimenting with your answer, and then finally discover this answer, it seems all your problems will go away if you simply add [XmlSerializerFormat] to the operation contract, and the method signature will return to normal. At least my problems did when testing against a 2.0 .Net framework and powershell.
finally I've discovered this:
PS C:\ps> [int]$int = 0
PS C:\ps> $bool = $true
PS C:\ps> $a.DictionaryLength([ref]$int, [ref]$bool)
PS C:\ps> $int
61
I've build a solution with .net 2.0 (powershell native framework) for a client application to consume my wfc (.net 4.0)
and the definition for method DictionaryLegth() was:
void myservice.DictionaryLength(out int DictyionaryLengthResult, out bool DictonaryLengthSpecified)
some of my methods in the WCF Service returns an entities from the Entity Framework. I cannot add the Web Service reference in my Windows Phone 7 application because of that warning:
Custom tool warning: Cannot import
wsdl:portType Detail: An exception was
thrown while running a WSDL import
extension:
System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load type
'System.Runtime.Serialization.DataContractSet'
from assembly
'System.Runtime.Serialization,
Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e'.
XPath to Error Source:
//wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IBarnGameServiceNEW'] D:\MGameWindowsPhone7\Service
References\ServiceReference3\Reference.svcmap
What's the reason ?
Run Visual Studio not under Administrator account. This helps me.