I am using a WCF Service (which is a web role) and is interacting with the worker role. When I try to throttle between different instances of the worker role. It throws the following exception:
"Role discovery data is unavailable"
RoleEnvironment.Roles["MyWorkerRole"]
is not accessible in the WCF web service.
I am answering to my own question to clarify a bit. I am new to Windows Azure and did not get the full concept of implementing WCF in Windows Azure and tried to add a simple WCF service using add new project and then wanted to add that WCF service by adding web reference of it in the web role (which is not the right way).
Watch this video, if you are experiencing problems with WCF and Azure and don't know in detail about the basics of Azure...
Azure Walkthrough of WCF by Ryan and Steve
Related
I have written WCF and hosted in windows service now when accessing the services via basic http binding, it is showing "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." Please suggest solution step by step
Thanks to all for not replying but I got the solution. Please suggest if anything is not in order.
We have created WCF and hosted it in Windows Services as netTCP. Now, I created Silverlight Enabled WCF Services in Silverlight.Web Project and call netTcp service from here and Silverlight WCF enabled Services called in Silverlight Project and it is running fantastic. Before this I tried from Web Service but it is taking when large data calling from silverlight application.
My organization is transitioning from MS WCF services to Web API services. One big difference I've noticed is in the startup behavior. If a WCF service isn't spun up, it waits to return until it is spun up. However, if a Web API service is not spun up, it returns 500s until it is spun up.
Is there any way to configure the Web API applications or IIS so that it starts up more like a WCF service, in that it doesn't return anything until it's spun up? I've googled extensively but have been unable to find anything addressing this.
As an FYI, app init isn't an option for us right now.
I believe this is configurable via IIS.
See here:
Auto-Start Feature
I am evaluating the various options to deploy a web service in Azure. Presently, the web service would be consumed only by a front end UI which will be deployed as a separate web role within the same cloud service that would be hosting the web service. However, the web service would be exposed in its own right at a later stage. Apparently, web services can be hosted from within either Web Role or from a worker role. Could you please throw some light on pros and cons of either approach? Which of these approaches would you recommend for my scnario?
A web role assumes that the application will be hosted in IIS. If your service does not require any of the benefits provided by IIS or its HTTP stack, then hosting it in a worker role may do you perfectly fine and also provide you a lower resource utilization for that service (since there's no "overhead" for the IIS server).
I have a database that doing simple CRUD and connected via BizTalk Server 2010. Since Lightswitch is very simple and looks fits for that CRUD operation, I want to introduce Lightswitch for the operational staff here.
(I am not an expert in both technologies) the problem is, Lightswitch consumes WCF RIA Services. While BizTalk by default cannot expose such type of web services.
my question is :
what is the best type of web-service should I expose from BizTalk in order to be consumed by Lightswitch?
The easiest option is to throw a proxy service in between. You can take a BizTalk-generated WCF endpoint and wrap that service call with another service that exposes the DomainService that LightSwitch asks for.
For example, see this LightSwitch team blog post http://blogs.msdn.com/b/lightswitch/archive/2010/10/22/how-to-create-a-ria-service-wrapper-for-odata-source.aspx
i am new to the concept of silverlight and understood few things from this site.
i want to clear my doubt that what is the role of wcf ria services in silverlight applications?
what do we mean by domain services?
In Silverlight, you do not connect to a database directly - your Silverlight app runs on the client machine after all. The client-side UI (Silverlight) and the database / backend are strictly separated. The number of classes that the Silverlight runtime has to offer is (by design) quite limited, and things like direct database access are not amongst those classes available.
The way your SL app gets its data is through a WCF service (Domain service, or WCF Data Service) running on some server, which accesses the database on your behalf. This part usually runs on your web/app server and has access to your database or other backend servers.
The domain services are the one who gives you access to a remote repositories using WCF technology. That Silverlight compact .Net framework is on the clientside which needs to access services through cloud (internet) in able to interact data to the users.
You can start in http://www.silverlight.net
Happy reading!