System.Property<T> refactored out of Silverlight 4 System.dll? - silverlight-4.0

I'm in the process of migrating a Silverlight 3 project to Silverlight 4 (plus RIA Services v1.0 RTW and the latest drop of Rx.) I believe I've dealt with all the dll refactoring and namespace change issues but one.
In the Silverlight 3 project I'm using System.Project<T> however System.Project<T> is missing from the Silverlight 4 system.dll. Using Reflector I see that the following are missing from the Silverlight 4 system.dll:
IProperty<>
IPropertyGetter<>
IPropertySetter<>
Property
Property<>
PropertyChangedEventArgs<>
PropertyGetter
PropertySetter
My question is, where do they live in Silverlight 4?
Thanks for your help!

Forgive me, the above should read:
"I'm using System.Property<> however System.Property<> is missing from the Silverlight 4 system.dll."
Thanks.

Related

Service Reference Windows 8

I am trying to recreate at WPF application as a Windows 8 Application. The Application uses a service reference to an service provided by a third-party developer. In the WPF application I have a service.Search method that takes three parameters. When I add the service reference in my Windows 8 Project I get a service.SearchAsync method. The problem is that the new SearchAsync method only takes two parameters.
Where does this code generation happen? How can I change this behavior?
I didn't realize that this was by design in Window 8 Apps.

Can't debug MVC4 project

Relatively new to mvc. I have what I consider a strangely architected project that I inherited after someone left my company. There are two "service layers". The main layer is an MVC 4 project which expects a REST query. Here is how it works:
An asp.net page in another project allows the user to enter a REST query. The same asp.net page calls serviceRequest.DownloadString with the REST query that was entered.
This results in a call to a DelegatingHandler in the mvc 4 project. This DelegatingHandler does some validation of the headers sent with the request. If the data is correct, the DelegatingHandler calls base.SendAsync with the same REST query that was passed in to the DelegatingHandler.
This activates the controller in the mvc 4 project that is called by the REST query. If it is working, the mvc 4 project returns xml.
4, To do much of the work the controller calls methods from a wcf project.
What is happening is that this architecture works fine if run inside visual studio. It also runs fine if the two service layers (the mvc 4 and wcf projects) are deployed to IIS applications on my local machine.
The problem occurs when the service layers are deployed to two seperate machines, one in the dmz and one on a macine inside the firewall. It returns a 500.
I used fiddler and fixed one problem that had to do with connection strings. Once that was done I still got the 500 as a result but no other information. In this case running fiddler again only confirmed that I was receiving a 500. I have tried:
puting trace code in the configs of both service layers
using an existing function in the wcf layer to write some debug information to a table from the controller.
I realize that I might not have put in the trace code in the mvc and wcf config files but it does seem to be simply bypassing the mvc 4 project altogether. I also notice some information on being able to use debug.write. Is this a viable option.
None of these two steps has brought me any closer to solving the problem. I am getting the impression that the mvc 4 code is never getting called at all and the error is occuring when the serviceRequest.DownloadString is called to bring up the DelegatingHandler. However I don't know where to look to see if I'm right. Is there a spot in the code (e.g and event) that I could use to follow the code from when it leaves the asp.net page and tries to go to the mvc 4 project?
What is the best way to debug this? Any help would be appreciated.
Thanks,
Fig0000
I'm not quite sure, but looks like the error returned is not shown because you are not running on localhost. And the error might be for some config files wrong or anything actually.
Can you try to run the application isolated (maybe creating a dummy method in each and if that works, make the internal call (fake / mock) so you can see what's the actual problem.
OR
you can try to let mvc to display all error even on remote. You can do this on web.config :
<customErrors mode="Off">
</customErrors>

Unable to create reference for Message contract - Host in 4.0 and Client in 2.0

I have a service which is written in .net 4.0. I am calling it from .net 2.0.
Everything works fine if I use Data Contract. But for one specific functionality, I need to Message contract. Intellisense do not show my message contract. Even in the reference that I added, I dont have message contract.
I created a separate 4.0 framework and it works fine.
Is there any compatibility issue as we have separate web and service reference in 4.0 however in 2.0 we only have web reference?
Thanks in advance.
I thought of answering this question as it might save other's time.
The functionality I was looking for was to send file or attachment. With WCF, you need message contract instead of Data Contract to send over an attachment or stream object.
As message contract was introduced in framerwork 3.5, with 2.0 it was not possible.
How did I solve my problem?
I sent my file in bit array form over to 4.0 application and from there, I used message contract to pass my information.
It took me 2 days to figure this out. I hope it helps others.

Consuming wcf webservice in Webmatrix with razor?

I've searched around and I can't find anything that shows how to consume a WCF webservice with Webmatrix using razor? I don't want to consume it with jQuery, I want to actually use the C#/razor syntax for that. Any ideas? Any help would be greatly appreciated!
Chris
If you're looking for something along the lines of "Add Service Reference" from Visual Studio, it isn't available in Web Matrix. You'll need to write all the plumbing by hand or use one of the Visual Studio Express products (http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express).

Silverlight and WCF or not?

When developing an application wich will be used inside an intranet do you think Silverlight and WCF is a good solution ?
Whould you use WCF Services or WCF Web Services to expose your model to the client ?
When consuming a WCF Service the proxies will be generated under a reference and you can only have 1 service reference per service, How can I have the application domain model created under the same service reference ?
Thanks.
A. Lampard.
Not yet. I had a difficult time getting WCF configured, and Silverlight 2 beta was not well documented.
Silverlight is out of Beta now, and compatibility with WPF has improved. If your skills are generally in .NET and you want a rich web application then Silverlight ought to be a no-brainer, especially on an intranet where you can reasonably guarantee everyone has Silverlight installed. Plus, it runs fine on Macs.
For services, WCF works with Silverlight and there are numerous examples of how they work together. Here's a video from the official site on that very subject:
http://silverlight.net/learn/learnvideo.aspx?video=47177
"Not sure if I understand your second question...not sure why would you want more than 1 reference per service...?"
When you have, for example, a ProductService wich uses the classes Product and Family, if you create the proxies for this service you'll get: ServiceReference1.Family and ServiceReference1.Product. Now supose you create the FamilyService, when consuming this service you'll get the Family proxy created again, but under ServiceReference2 !
Your questions is way too broad. It's really hard to answer these kinds of questions, since, really, "any" technology is good for "any" solution. Otherwise everybody would just use one!
What's your application supposed to do, how soon you need to get it done, is there any existing investment in the same or other technologies...etc.?
Having said that, to answer your question: yes.
Not sure if I understand your second question... not sure why would you want more than one reference per service...?