Right now I have a utility built in Silverlight which uses a WCF service, and both of these projects are in the same solution. Due to company standards, I have to put the WCF service into its own solution. How do I access it from my Silverlight project from a seperate solution? Everything I've found talks about how to access a WCF service from the same solution. Any help is appreciated!
Thanks
To access on a WCF service from another solution, you have to :
On your actual project, right click on the WCF Service > View in browser (I suppose the WCF Service is hosted on IIS).
Copy the URL (it will be a URL like http://localhost:12345/MyWCFService.svc)
On your new project, right click on the project > Add Service Reference
Paste the URL
Hope it helps
Related
I am developing an Outlook Add-In, that will work in Office365 for both Web version and Desktop client and will able to upload files attached with the email to One-drive. Is it possible to authenticate and upload the files without user interaction(i.e. like opening popup, and providing user id and password etc).
Thanking all for your suggestions in advance.
Yes, Its possible.
What you have to do is :
1) create OutlookAddin solution with help of visual studio template.
2) It will add two projects in that solution OutlookAddin and OutlookAddinWeb.
3) Here OutlookAddinWeb is simple asp.net project that you have to covert into MVC Web API or you can add in new MVC Web API project after removing the existing OutlookAddinWeb.
4) Now,You can Microsoft Graph Client dll to use graph api functionalities to upload file in One Drive.
Note : The important thing you shouldn't forget about implementing authentication using OWIN API that is providing single sign-on as it is your main concern here
samples: https://developer.microsoft.com/en-us/outlook/code-samples
Recently announced at Microsoft Build is the ability to convert an existing ASP.NET Web API to an Azure Mobile Service. I was curious as to if anyone has successfully done this yet, and the steps needed to do so.
Things I've tried thus far:
Added the Azure Mobile Service .NET Backend & Azure Mobile Service -
Entity Framework Nuget Packages to my existing ASP.NET Web API
project.
Resolved an issue with OWIN and AMS(ZUMO) conflicting Startup.cs assemblies.
Ensured the ASP.NET Web API compiles locally, and published as an Azure Mobile Service.
However whenever publishing, it seems I only get a runtime error on the server.
Here was the best example of potentially doing this: http://channel9.msdn.com/Events/Build/2014/3-623
Secondly I've looked a bit into just running the OWIN pipeline via: http://www.strathweb.com/2014/02/running-owin-pipeline-new-net-azure-mobile-services/
I know that this is in a preview mode, but figured some document trail would help!
Can you try adding your existing WebAPI assets to Mobile Services project you create from VS? This will make sure all the right things are wired up. Also, check the Logs tab in the portal for any clues.
This should help..
http://blogs.msdn.com/b/azuremobile/archive/2014/04/10/creating-an-azure-mobile-services-net-backend-from-scratch.aspx
Thanks
Supreet
Here's my situation, I'm trying to create a WPF application that connects to my own web odata service (uses web api and entity framework). I have my own set of domain models/entities in the server side that the web api and entity framework works with. When, I add the web odata service reference in the WPF client side, it can't recognize my own domain models/entities and it looks like it creates its own set of it. Is what I'm trying to do even possible or am I just missing something?
Regards,
Raymond
Drive-by answer (unchecked): I remember reading that it wasn't possible at least a few weeks back. You might want to search the Uservoice site and the official forums for current status, or wait for a better answer here.
It looks like this problem is currently a feature suggestion for WCF Data Services (thanks to tne's uservoice link). The direct link to the request is https://data.uservoice.com/forums/72027-wcf-data-services-feature-suggestions/suggestions/3220086-allow-re-using-entities-from-another-dll-on-the-cl.
I'm working with a CRM 4 server. I created a simple console application and added a web service reference to it using the service that resides at http:///mscrmservices/2007/crmservice.asmx?WSDL
Now, according to the SDK, the service's Retrieve method should return BusinessEntity and RerieveMultiple should return BusinessEntityCollection. However, in the proxy that is created on my project, these methods return XmlElement...
What's the problem? what am I doing wrong?
Thanks!
To solve this problem I actually had to use the CRM SDK dlls and connect to the service via them. Adding a web reference didn't work as expected no matter what I tried.
I am getting the following exception message when I try to run my newly created Silverlight app:
An error occurred while trying to make a request to URI 'http://localhost:8732/Design_Time_Addresses/IsAProgrammer.Service/Service1/'. 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.
This is what I have done. I started with a silverlight app. That created 2 projects. My actual silverlight app and one called MySolutionName.web (not sure what that does except host my silverlight page).
I then made a WCF project so I could have some services for my Silverlight app to consume. I made my services and then added a Service Reference to the silverlight project. I then changed the binding to be basicHttpBinding for my services. (I subsequently refreshed my Service Resource reference in the Silverlight app.)
I reading about this error, I have found that I need a clientaccesspolicy.xml and a CrossDomain.xml file to fix it. I found a generic copy of each of these and added them to both my MySolutionName.Web project and my WCF project.
Any other ideas would be great.
I don't do a lot of WCF myself but it sounds like you've created yourself 2 web applications, one where the Silveright app is host and one service the WCF. Was this intentional?
At a guess I think you should have just added a WCF Service item to the existing host web application.
When u r playing with wcf sevice for the first time with silverlight or wpf these errors are bound to come :). The below link will help you to put your crossdomain policy in right place.
Where to place ClientAccessPolicy.xml for Local WCF Service?