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.
Related
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?
I've seen several posts about this, but none of the answers seem to work.
I'm trying to set up simplemembership and I keep getting this error when WebSecurity.InitializeDatabaseConnection(...) is called
Here is the ConnectionsStrings entry:
<add name="JBarterMain" connectionString="Data Source=winsrv01;Initial Catalog=ProvausioJBarter;Persist Security Info=True;User ID=xxx;Password=xxx" providerName="System.Data.SqlClient"/>
I tried adding the following to my machine config in the .net 4.0 x64 folder:
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
I'm getting absolutely nowhere. This seems incredibly odd to me that this wouldn't work out of the box. I had another project a few months ago (broken currently so I can't verify that it still works) that was working just fine and I didn't have to do any additional configuration.
Any ideas?
I wrote a tutorial on how to set up simple membership Here. Also I prefer to ditch the filters and initialize it directly on application start
I have a big (too big for me, about 50k line) Silverlight application, written by an ex-colleague. It is written really (really really) badly so I'm not going to change/touch almost nothing.
I'd like to easily enable access to his WCF RIA Services from a WFC command line app. There's almost 30 domain service class in the web part of SL app.
I installed the SL and WCF-RIA toolkits.
I've added those lines in the web.config but the compiler doesn't recognize the <domainServices>.
<domainServices>
<endpoints>
<add name="OData" type="System.ServiceModel.DomainServices.Hosting.ODataEndpointFactory, System.ServiceModel.DomainServices.Hosting.OData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="Soap" type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory, Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</endpoints>
</domainServices>
From the new command line app I can't see any services in my solution.
Any Idea of what I'm missing? Thanks
Maybe the problem rely on the way you try to add the service reference: auto discover don't work and you don't have an .svc file. You should use something like http://[hostname]/[namespacename]-[classname].svc but I recommend to have a look at these articles: http://blogs.msdn.com/b/saurabh/archive/2009/11/23/understanding-the-wcf-in-wcf-ria-services.aspx and
http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx
that give a detailed insghts
Over a year ago I had been working on a WCF service, which I wrote using VS 2008. It runs under a Windows service, which I also wrote. It’s been running there ever since. And unfortunately, other projects/priorities have come up, preventing me from continuing with that project, until now.
Now I’m trying to get back to it. However, this go around I’m trying to find out if I can use VS 2010 and .NET 4, instead of .NET 3.5. I’ve brought up the command prompt, to run SvcUtil, to get the wsdl information, which I’ll put into the config file for the new WPF app I’m trying to get started writing. Only thing is, I keep getting an error, saying that I can’t reach the server, etc.
So, I copied the .exe.config file from the server to my machine, where I could edit it with SvcConfigEditor. I’ve made those changes, put it back onto the server, and got an error while trying to run SvcUtil, but worse than that I didn’t see the .svclog files I expected to see. So I got into the server’s Services app. I found the Windows service I wrote a year ago; saw that it was running, and stopped and started it again.
Now I’ve got a different problem. My Windows service starts, but then stops immediately. I get this message saying that the service had started and then stopped, and saying that sometimes that happens with different sorts of services, like Performance Logs and Alerts services. I’ve checked the event log on the server, and then only thing there related to this Windows service is that it entered the start state and then entered the stopped state.
Ah, after attempting to start it 4 times, it finally gave me an error in the event log! (Why didn’t it do that in the first place? And who says that trying to do the same thing over and over again, and expecting different results is a sign of insanity, when clearly the first 3 times it didn’t register anything in the event log, but on the 4th try it did.)
Here’s the error:
Event Type: Error
Event Source: Service1
Event Category: None
Event ID: 0
Date: 5/4/2011
Time: 10:14:46 AM
User: N/A
Computer: HELIOS
Description:
Service cannot be started. System.TypeInitializationException:
The type initializer for 'System.ServiceModel.DiagnosticUtility'
threw an exception. --->System.Configuration.ConfigurationErrorsException: Couldn't find type
for class System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089.
at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType,
String initializeData)
and here’s the new section of code put into the .config file by SvcConfigEditor:
<sharedListeners>
<add initializeData="C:\Program Files\ASIWindowsService\ASIWindowsService_tracelog.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
<add initializeData="C:\Program Files\ASIWindowsService\ASIWindowsService_messages.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
</sharedListeners>
This question was answered in the comments but there is a gotcha that I've seen in Visual Studio 2010 that could result in a similar situation.
Even if the target framework is set to version 3.x for a WCF project, using the 2010 SvcConfigEditor will automatically insert "System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0..." although it should be inserting "System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0..." This will bite you when deploying the altered web.config to an IIS hosted service where the AppPool is not configured to use the .NET 4.0 framework. The fix is simply edit the web.config back to "Version=2.0.0.0".
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.