Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesSilverlight modules, WCF RIA Services...Silverlight modules, WCF RIA Services...
Previous
 
Next
New Post
5/19/2011 9:30 PM
 

Asking around the forums and getting great help from a few DNN experts, I find I'm still at a loss implementing Silverlight modules connecting to the DNN db.
Michael Washington and Steve Fabian have offered advice and help AND I've worked through their tutorials, blogs etc etc. For those with a little patience, please read on and advise me where you can. 

I've developed a simple drawing tool in Silverlight as a DNN module (using the Codendeavors Silverlight WAP template), works really well and is live. This module does not access the db at all.

Now I'm looking at rebuilding old ASP modules as new Silverlight modules for DNN 5.6.2 (or 6.0 later), hitting our tables in the db.

So far, I have built a WCF RIA Service app (EntityFramework et al) along with a test SL app (again, the Codendeavors template). I never touch the dnn source code and only ever use the "install" version. I can run my test SL app. outside of dnn in a test page and all works well, hits the RIA Service and consumes data etc. Once I install the SL app module into dnn, it fails to connect to the WCR RIA Services...many errors noted but too long winded to put in here.

So, to cut a long story short, does anyone (particularly within DNN) know how to put together a WCF RIA Service (installed/running within DNN) and allow SIlverlight modules to access said services? Is the feasible/possible? All projects should be built as WAP projects and I don't want to recompile the DNN source if I can help it.

ANY help/info/advice on this would be useful indeed!

Thanks

 
New Post
5/24/2011 12:49 PM
 
OK, I have a separate WCF RIA Service built as seperate project in DNN and compiled into the /bin folder
I have a Silverlight module (built using Codeendeavors Silverlight WAP template).

OUTSIDE of DNN, running the module in a test page, I can connect to the service. Once the SL app/module is IN dnn and ON a page, I get the error below. PLEASE SOMEONE EXPLAIN. I'm sure it has something to do with finding the .svc file and service definitions in the web.config file. ANY advice please.

Message: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetCategory'. An error occurred while trying to make a request to URI 'http://localhost/dnn_562/bin/MyCompany-RIAServices-RIADomainService.svc/binary/GetCategory'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. ---> System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'http://localhost/dnn_562/bin/MyCompany-RIAServices-RIADomainService.svc/binary/GetCategory'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ServiceModel.DomainServices.Client.WebDomainClient`1.EndQueryCore(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainClient.EndQuery(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )

 
New Post
7/26/2011 5:06 PM
 
NOBODY?

Sure someone withn DNN knows what to do??!!

OK, I'll simplify this. Forget RIA Services or Entity Framework unless that IS the way to do this.

Simply tell me how to get a Silverlight app, running in/as a DNN module to access the DNN db in whatever way you might know.
The only limitation if any is that I don't want to re-compile the DNN source and only ever use the Install version of DNN.

PLEASE and THANKS
 
New Post
7/26/2011 6:53 PM
 
Have you looked as using a web service.

http://iweb.adefwebserver.com/  is a module for dnn that allows you to very easily add web service support to your site utilizing dnn security permissions.   You will still need to code methods for each database structure u want to expose - but its a good way to start.

Westa
 
New Post
7/27/2011 9:08 AM
 
Thanks Wes, I will take a look!
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesSilverlight modules, WCF RIA Services...Silverlight modules, WCF RIA Services...


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out