SilverlightShow: Building a Silverlight Line-Of-Business Application – Part 3 Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples en-us SilverlightShow.net estoychev@completit.com (Emil Stoychev) Argotic Syndication Framework, http://www.codeplex.com/Argotic http://www.rssboard.org/rss-specification RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment3229 <p>Hey Chris,</p> <p>   I have a WCF service working in Silverlight 3 and would now like to pass the username and password via the Soap header just as in your example above but I'm struggling with how to define the UserCredential class ... I keep getting object is not serializable...</p> ( lpj) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 15 Mar 2010 23:13:00 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment2617 <p>Excellent.. thanks for this article.</p> <p>The method of re-using business logic between two projects via links is great...</p> ( davedrat) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Sun, 01 Nov 2009 18:12:36 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment1558 Hi bhaidar, it's true you could probably make it a singleton object.  I tend to close connections at the end of each request (or batch of requests) to reduce the load on the server (minimising the number of concurrent open connections the server needs to maintain).  If this isn't an issue then you probably could just make it a singleton object.  The advantages you'd gain by making it a singleton object and maintaining an open connection is each server request would be a bit faster, and you wouldn't have to create an instance of the web service with each request (or request batch).  Of course you'd need to keep track of whether that connection was terminated and reopen it if necessary.  It's a good point, I guess it depends on your scenario.  Any further comments on this point are welcome. <p>Chris</p> <br /> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Wed, 13 May 2009 12:00:12 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment1553 Hello, <p>I have a question related to "AWServiceFactory" Why didn't you have this class as a Singleton object? Wouldn't that be better so that not every time a new instance of the Service is being created?</p> ( bhaidar) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Tue, 12 May 2009 05:06:58 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment939 <p>Alas - it would be nice if we has wsHTTPBinding support in SL's WCF stack.</p> ( Joe Cracker) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Tue, 20 Jan 2009 15:32:25 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment916 <p>Hi Mark</p> <p>I'm not aware of any issues with the message inspector and https.  Do you have any more details you can fill me in with please?</p> <p>Chris</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Thu, 15 Jan 2009 05:45:19 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment915 <p>Great article. Do you know how to make the the <strong>SIlverLightMessageInspector </strong>work with an HTTPS binding?</p> ( Mark) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Thu, 15 Jan 2009 04:16:49 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment842 <p>Dude, you rock.  I have been wanting to figure out how to attach business logic to my WCF objects in Silverlight for over 6 months.</p> ( Jonathan Pugh) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Tue, 16 Dec 2008 15:39:48 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment825 <p>Hello again!</p> <p>I saw Part 4 and Part 5 of this series and even got more excited with this Framework!</p> <p>I would like to know if you have any code sample of popup and ... also draggable windows that we can easily integrate with this Silverlight framework.</p> <p>Thank you!</p> <p>trifee</p> ( Trifee) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 15 Dec 2008 09:26:19 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment820 <p>Hi trifee,</p> <p>All articles of that series point to the latest 'live demo', thus we do not have to have different data bases for each part. If you want to download the latest version of the source code navigate to <a href="http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-5.aspx">part 5</a>, which is the latest part of the series so far, and download the source.</p> <p>ilia</p> ( iiordanov) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Fri, 12 Dec 2008 02:35:32 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment818 <p>Very nice series of articles on silverlight + wcf + ef</p> <p>Do you have a pop-up and drag and drop window module that we can easily integrate with your framework?</p> <p>Also, I downloaded your source code and run it from Visual Studio.  However, it is not as complete as the one found in the 'live demo' link.</p> <p>Where can we download your most updated source code for your framework?</p> <p>Lastly, not sure if you already have ADD, EDIT, and DELETE routines in your framework that can be used.</p> <p>Thank you so much and more power to you!</p> <p>trifee</p> ( Trifee) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Thu, 11 Dec 2008 15:49:18 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment767 <p>Actually I did include the link, it was under the Silverlight Web Services Examples link in the resources.</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Thu, 27 Nov 2008 02:04:53 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment766 <p>Hi Rob</p> <p>Sorry, I omitted the link to the message inspectors source.  This is the link:</p> <p><a href="http://code.msdn.microsoft.com/silverlightws/Release/ProjectReleases.aspx?ReleaseId=1660">http://code.msdn.microsoft.com/silverlightws/Release/ProjectReleases.aspx?ReleaseId=1660</a></p> <p>Hope this helps.</p> <p>Chris</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Thu, 27 Nov 2008 01:56:01 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment762 <p>I really liked these articles. I should be able to use them in my work. Could you provide a link to the sources for the Microsoft.Silverlight.Samples.SilverlightMessageInspector. Thanks.</p> ( Rob Galante) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Wed, 26 Nov 2008 07:45:46 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment728 <p>IrishChieftain: that's on purpose - most developers aren't designers and the design is pretty average of what a developer may produce.  If you look at the upcoming article list you will notice that there will be an entire article devoted to styling the application as per a graphics designer may do once introduced to the project, and references to the look in past articles and why I haven't focused on this yet.  I am focusing on implementing functionality first as would a new Silverlight developer when undertaking this project on a step by step basis to produce a proof of concept .  If you spend too much time initially focused on developing an attractive UI then you will have wasted work when you need to make changes, and you won't get any closer to having a functional application.  I believe very strongly in the importance of attractive applications, from a sales perspective and also from encouraging users to accept the new application in their work environment.  But there is no use in an application that looks good but does absolutely nothing, and making it attractive can consume considerable development time.  As a proof of concept (as most companies will be at currently when determining whether Silverlight is a suitable technology for their applications) the first thing is to determine whether the required functionality can be implemented in the technology - which is the focus of these first few articles.  In the meantime if you believe you can come up with a simple more attractive UI or a better order for these articles you are more than welcome to contact me via my blog until I get to the styling article.</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Wed, 19 Nov 2008 23:04:02 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment727 <p>Why does it look like something that crawled out of FrontPage? The design is about as bad as it gets....</p> ( IrishChieftain) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Wed, 19 Nov 2008 19:54:05 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment697 <p>Thanks, Chris. It does work now.</p> <p>I also figured out my issue with the source...I neglected to change one of the connection strings (AdventureWorksEntities).</p> <p>Thanks.</p> ( Marc Gervais) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 17 Nov 2008 21:41:07 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment696 <p>Hi Marc,</p> <p>The live demo should be working now.<br /> Sorry for the inconvenience but we had some troubles with changing the hosting.</p> ( iiordanov) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 17 Nov 2008 16:17:41 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment695 <p>Chris,</p> <p>Is there any reason why the Live Demo is not working? I click the link, but all I get is an error from IE claiming it cannot display the webpage.</p> <p>I have downloaded the source and have tried running it locally (after installing the AW database, installing the Membership tables, altering the connection strings and creating a login). However, I am not able to get into the Inventory Page without getting an error. I am obviously missing something, but I am not sure what it is. The error is:</p> <p>"Cannot open database \"AdventureWorks\" requested by the login. The login failed.\r\nLogin failed for user 'machineName\\MarcG'."</p> <p>This exception is thrown in the AWDataService.GetProductList method (Line 108).</p> <p>Thanks.</p> ( Marc Gervais) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 17 Nov 2008 15:40:29 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment694 <p>Chris,</p> <p>Is there any reason why the Live Demo is not working? I click the link, but all I get is an error from IE claiming it cannot display the webpage.</p> <p>I have downloaded the source and have tried running it locally (after installing the AW database, installing the Membership tables, altering the connection strings and creating a login). However, I am not able to get into the Inventory Page without getting an error. I am obviously missing something, but I am not sure what it is. The error is:</p> <p>"Cannot open database \"AdventureWorks\" requested by the login. The login failed.\r\nLogin failed for user 'machineName\\MarcG'."</p> <p>This exception is thrown in the AWDataService.GetProductList method (Line 108).</p> <p>Thanks.</p> ( Marc Gervais) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 17 Nov 2008 15:38:25 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment670 <p>Thanks for letting me know Omnius.  I'll update the sample application to include the line in the web.config file.</p> <p>Chris</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Thu, 13 Nov 2008 05:34:29 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment661 <p>Yep, that fixes it!</p> <p>I knew it had to be something simple, but unfortunately I did not stumble upon that myself yesterday when I spent several hours randomly trying different configuration options. :) I had however figured out that Thread.CurrentPrinciple was being wiped out and had actually implemented my own version version of PrinciplePermissionAttribute and used Spring.Net AOP advice to intercept and used HttpContext.Current.User instead.  Oh well, I'll back that back out and switch back to the built in version.</p> ( Omnius) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Wed, 12 Nov 2008 07:15:36 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment660 <p>Hi Omnius</p> <p>Unfortunately I wasn't able to fully test the web service over SSL as I don't have a certificate and as described in the article you can't use self-signed certificates.  I was aware of this problem however but forgot to add the node to the web.config file that should fix the problem.  The problem is described here with a solution:</p> <p><a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=369445">https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=369445</a></p> <p>In summary you need to add the following as a behaviour of the service in the web.config file:</p> <p><serviceAuthorization principalPermissionMode="None" /></p> <p>Please let me know if this solves the problem and I'll ensure the sample project is updated accordingly.  Thanks for the report.</p> <p>Chris Anderson</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Wed, 12 Nov 2008 06:41:03 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment658 <p> <title></title> <link rel="stylesheet" type="text/css" href="css/fck_editorarea.css" /> <p>Have you actually tried to enable SSL on the WCF service? I have been unable to get it to work. Once the WCF service is switched over to using a binding with "<security mode="Transport" />" the service starts throwing "Request for principal permission failed." exceptions on any methods flagged with the PrinciplePermissionAttribute.  For example, in this configuration the call to Login works but once I click on Inventory the call to GetProductList fails.  Hopefully I'm just missing something obvious, but so far I have been unable to figure it out.</p> </p> ( Omnius) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Tue, 11 Nov 2008 12:19:03 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment650 <p>Hi <span id="ctl00_ContentPlaceHolderContent_itemComments_dlstComments_ctl00_lblCommentAuthor">Balázs</span></p> <p>There are a number of articles planned for this series, and you can find a rough guide to the topics of each article here:</p> <p><a href="http://www.silverlightshow.net/news/Welcome-Chris.aspx">http://www.silverlightshow.net/news/Welcome-Chris.aspx</a></p> <p>Hope this helps.</p> <p>Chris Anderson</p> ( chrisanderson) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 10 Nov 2008 20:28:31 +0300 RE: Building a Silverlight Line-Of-Business Application – Part 3 http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx#comment649 <p>I'll will read through the article. Thank you. Are you planing Part 4 ? What will it be about ?</p> <p> </p> ( Balázs) http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-3.aspx Mon, 10 Nov 2008 10:22:15 +0300