Could not load type 'System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy' - wcf

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.

Related

Could not load file or assembly 'SMDiagnostics, Version=4.0.0.0

I have a Windows 2008 server with IIS and a website there which its working fine.
I bought a new one server with Windows Server 2012 and i copied the files of the website to the new one.
When i'm opening the website to the new one i take the error
"Reference.svcmap: Could not load file or assembly 'SMDiagnostics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest."
The site is for Net 4.
I searched for the error but none of the solutions was for my case.
Do you have any ideas what is wrong?

WCF Service Error on generate code file with SVCUtil

I created a WCF service with net framework 4.0 on Windows OS;
and its works OK use SVCUtil to generate client code file.
but its failed on ubuntu apache with mono.
error info below:
exception :System.ServiceModel.Description.DataContractSerializerMessageContractImporter
details:
Due to the namespace "http://schemas.datacontract.org/2004/07/System" with data
contract name "MarshalByRefObject" reference types "System. MarshalByRefObject,
mscorlib, VerSion = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 "
with import DataConTract does not match, so can't use. you need to remove the
type of the reference.
but how can i remove the type of the reference MarshalByRefObject on mono?
Any assistance would be appreciated. Thanks a bunch for your help.

WCF Service activation exception with very uncommon reason

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...

WCF - System.Data.SqlServerCe was not found

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.

Issues calling a DLL from WCF/Silverlight

Trying to use a DLL that returns a list of tasks in the W2k3 server's Task Scheduler. Works great when I use it in a C# console app on the server, and using it on my computer (ASP.NET Dev Server), but when doing the same thing through the Silverlight-WCF RIA on the W2k3 server, it just wouldn't go. Silverlight returned "Object reference not set to an instance of an object" whenever it calls that DLL.
Fired up the Service Trace Viewer:
System.ServiceModel.FaultException`1[[System.ServiceModel.DomainServices.Hosting.DomainServiceFault, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Might it because I'm using a DomainService class, its hiccuping? Any particular security permission or config on IIS that needs to be done?
update:
Tried one last thing .... Identity impersonation to my domain username and password works! So what is the best way to set up IIS to get this to work?
Just stuck with using a Windows dummy account using identity impersonation. Don't like it, but it works.