I was missing the WCF Web API (Preview 4) http://wcf.codeplex.com/. It was surprisingly hard to find!
I've been spending the last 3 hours reading 30 unique examples of combining the new WebHttp API in .NET 4 (a.k.a REST) with MEF (yet another IoC framework).
(Global.asax.cs) var configuration = HttpHostConfiguration.Create() .SetResourceFactory(new MyCustomResourceFactory(container)); RouteTable.Routes.MapServiceRoute<ContactsResource>("contacts", configuration);
This example does exactly what I want. But HttpHostConfiguration and the MapServiceRoute both seem to be deprecated (Probably a part of the old starter kit). I cant use the normal ServiceRoute because that requires a class, but all I got is a interface since they are loosely coupled.
I have also tried implementing the IInstanceProvider but to no avail.
This is my last resort, google is refusing to help me. :argh:
davewill said:qwert231 said:*snip*
There is something else going on. You described "change my data" 2 times with the exact same set of steps. In one it works. In the second it doesn't work. My assumption being that the same triggers are fired in the same sequence for both and therefore (being a computer) the result should be the same.
As I look more at the trigger I'm wondering why. So I'll just ask. Why not simplify the trigger to simply write ApplicantAgencyHistory after Insert, Update and then pass the GetDate() for ApplicantAgency.LastUpdatedOn in the original update sql?
I agree with davewill. Simplify the trigger, set ApplicantAgency.LastUpdatedOn after the actual insert or use GetDate() as input value depending on your choice. And do the ApplicantAgencyHistory insert in the same after insert/update trigger. You have a nice scenario in four steps, which will serve as a excellent "unit test"
I'm not sure if this makes a difference, but even though the server is SQL 2005, the database is running in Compatibility level 'SQL Server 2000 (80)' mode.
Frankly, I think you have to do some more research yourself. Why not narrow it down to the specific statements thats acting weird? Put @@rowcount prints everywhere. I can't imagine whats wrong until I see that specific statement and trigger. Perhaps someone else can...
I'm just jumping in here, haven't followe the entire thread. There's many PDF tools out there, for .NET and such, but it's a jungle. I want to promote PDFSharp (pdfsharp.net), It's an free .net library for PDF manipulation. There's vast documentation and a active forum where the author himself is active.
I'm using this component in a current project where I create PDF's from scratch based on input from my database
I did some digging, and noticed the sql browser service was disabled. Turning on that service has resolved this issue.
I want to point out that you should never rely on the browsing list. In your case you could've tried with 127.0.0.1/./(local) since you knew it was installed locally probably default instance.
Okey, this isn't your everyday XML question. What I want is; given a xml file - generate some kind of CIL code and instantiate a object of that class and then populate it (deserialize).
I don't want to use a xsd schema and I need to do everything runtime.
Any suggestions, I know how to create a .cs file during runtime. But is that the only way? Then I have to compile it runtime as well. Is that even recommended ?
Might annoy some people but I want to have it as easy as possible. The xml object will populate a data form of some kind, if you want to know.
Love any input!
I am working with a WCF hosted in IIS 7, and the client is designed to run 24/7 with a reliable secure session.
Around every 20th hour or so the call to the WCF fails with the following:
"The underlying secure session has faulted before the reliable session fully completed. The reliable session was faulted."
I am running a trace in the WCF svc as well, the corresponding error seems to be
"The communication object, System.ServiceModel.Channels.ReplyChannel, cannot be used for communication because it has been Aborted."
The client is calling the same WCF method every 30th sec, which completes in 0,2 sec (server side).
This is soo annoying and I havent found any solution online, yet. I can post the .config case any one asks.
Thankful for any leads on this!
I found an interesting project on codeproject. http://www.codeproject.com/KB/database/SQLAgent.aspx
I'm going to examine the code and I might even convert it to C#.
I have some customers that can afford nothing but SQL express. So I thought no problem, they won't exceed the filegroup limit anyway.
Scheduling jobs is the only problem. What would you do?
- I could build a simple scheduling agent using the service broker ( but naaah, really?)
- Use Scheduling Tasks and SQLCMD ( embarrassing )
- Pay for, or use a freeware, third party SQL Scheduling Agent ( the easy way )
Many of you ought to have faced this problem before I thought...