Host tcp wcf service on azure

Hi,
I have query regarding can TCP service be deployed on Azure with certificate security.
I am fresher to Microsoft Azure and I have questions regarding deploy TCP WCF Service on Azure and is there issues while hosting TCP WCF through Net TCP Binding. Can I develop tcp service with certificate security. Can you please provide me sample
code with detail.
Thanks in advance
Regards,
Amit Khurana

Hi, 
The below stack overflow thread is similar to the present scenario.
You might want  to check this
http://stackoverflow.com/questions/27501683/self-hosted-wcf-service-on-azure-vm-windows-server
Hope this helps !
Regards,
Sowmya

Similar Messages

  • How to host custom wcf service on office 365

    hi all,
    I am working with project online using client object model 2013.I want to host custom wcf services on project online teant.
    hosting service on cloud. Please suggest me.
    vijay

    Hello,
    If you want to host custom WCF services in a hosted environment look at spinning up an Azure VM.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Cross Domain error for Silverlight + MVC application with self hosted WCF service on azure

    Hi,
    We are migrating existing Silverlight application to MVC; existing Silverlight application is hosted on
    Azure which is consuming self-hosted WCF service. For authentication we have implemented
    ADFS with WIF (passive). The cloud service (<myWebSite>.cloudapp.net) is C Name to (<myWebSite>.<myDomain>.com) and we 
    are consuming  WCF service at <myWebSite>.cloudapp.net/<myService>.svc, as we were getting “Cross Domain” error so we have added “clientaccesspolicy.xml” at the root of “WEB ROLE”.
    Existing Silverlight application works fine but the problem occurred when we deploy our migrated application to the same cloud service. We are getting a “Cross Domain” error.
    The same migrated application works fine on UAT environment, the only difference is UAT environment is
    without ADFS WIF implementation.
    Migrated application is half Silverlight and half MVC with initial landing page is Silverlight. MVC web role is used to host the service i.e. .SVC . To go to SL landing page , redirected from home controller. Following is being observed in fiddler for this
    application
    Existing Silverlight application -
    After authentication with ADFS it redirect to Silverlight landing page.
    Before calling service method it looks for “clientaccesspolicy.xml”
    In response header we are getting the content of “clientaccesspolicy.xml”
    And after this everything works fine
    Migrated Silverlight-MVC application –
    After authentication with ADFS it redirects to “HomeController” and from there we are redirecting to Silverlight landing page.
    Before calling service method it looks for “clientaccesspolicy.xml”
    In response header we are getting  following content - “https://federation-sts.<myDomain>.com/adfs/ls/?wa=wsignin1.0&amp;
    wtrealm=https%3a%2f%2f<myWebSite>.<myDomain>.com&amp;
    wctx=rm%3d0%26id%3dpassive%26ru%3d%252fclientaccesspolicy.xml&amp;wct=2014-03-17T10%3a36%3a04Z”
    4.Throw “Cross Domain” error.
    Also we have added filter in
    RouteConfig
    for .xml file
    routes.IgnoreRoute("{*allxml}",
    new { allxml = @".*\.xml(/.*)?" });
    NOTE: There is no configuration change apart from MVC configuration.
    We have done RDP to web role and found that “clientaccesspiolicy.xml” is present at “E:\approot” location and it is also accessible at “https://<myWebSite>.<myDomain>.com/clientaccesspolicy.xml”.
    Please help
    Thanks,
    Rahul P

    Hi,
    Please try to configure the cross domain policy file to allow public read access (that is, access it without federation requirement), make sure you can access the address
    http://something/clientaccesspiolicy.xml directly in a browser
    without redirecting to check whether the cross domain policy file could be anonymous accessed (Please start a new browser session and make sure you're
    not logged in. Then test the cross domain policy file.).
    Best Regards,
    Ming Xu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is there a way for converting WCF service into Azure Cloud Service without dealing with project files.

    Here is my situation.
    We provide Platform and SDK to other people where they can build WCF services and deploy that on site. We have a  many ISVs who has built wcf services, packaged them and ship them.
    Packaging consist of couple of manifest file and .dll file that make up wcf service. Now we want to go on cloud with our platform.
    Long story short - I have all the dlls for my wcf service but no project file.
    Is there a way to generate cloud service package from this dll files?

    Hi,
    You can't simply package your dlls and deploy it as a azure cloud service deployment package - you will need to have your project as well as service definition file which will define your role and instances.
    You can read more about packaging an Application by Using the CSPack Command-Line Tool here -http://msdn.microsoft.com/en-us/library/azure/gg433133.aspx
    another way to go to cloud platform is by making use of azure web sites, however you will still need your service files do deploy.
    If you have the dlls and the service files with you - then you can simply use the web site publish wizard and deploy to azure web site.
    Read more about it here - http://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
    Bhushan | Blog |
    LinkedIn | Twitter

  • Custom wcf service that uses SharePoint Object Model.

    Hi All,
    I am writing a custom service on SharePoint. I have noticed most of the people do deploy the custom wcf service in layout folder in 12/14/15 hive. I am wondering is it mandatory? Can’t we deploy the custom wcf service that uses SharePoint Object Model as
    virtual directory on a specific port?
    Regards Restless Spirit

    It is suggested to use WCF in 12/14/15 hive folder due to security and eas in use. Check below
    http://www.dotnetcurry.com/showarticle.aspx?ID=760
    http://msdn.microsoft.com/en-us/library/office/ff521584%28v=office.14%29.aspx
    http://stackoverflow.com/questions/16008593/where-should-custom-wcf-service-for-sharepoint-2010-resides
    If you want to use the server object model you have to host your WCF service on the same server as your SharePoint is installed on.
    If the WCF service has to be on a different server you can use the client object model or the SharePoint webservices to communicate to SharePoint.
    (link to a question about using server object model on different server
    http://nikpatel.net/2012/02/29/step-by-step-building-custom-wcf-services-hosted-in-sharepoint-part-i/

  • WCF Service hosted in Azure Cloud Service errors after published

    I have a project with several WCF services (mix of REST and SOAP).  The project has been running On-Prem for 6 months without an issue.  We are moving this to Azure but have run into an issue that will prevent us from going live.
    The project uses Autofac for it's IOC.  We are gonig to host this in a Cloud Service in Azure.  Everything appears to work correctly when running locally in the Azure Emulator however once we deploy using the Cloud Service project, everything builds
    and deploys correctly, but we receive the following error when trying to access a service.
    Server Error in '/' Application.
    Value cannot be null. Parameter name: key
    Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the
    code. Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: key
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using
    the exception stack trace below.
    Stack Trace:
    [ArgumentNullException: Value cannot be null.
    Parameter name: key]
       System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +48
       System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +38
       System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +20
       System.ServiceModel.Dispatcher.WebHttpDispatchOperationSelector..ctor(ServiceEndpoint endpoint) +2459
       System.ServiceModel.Description.WebHttpBehavior.GetOperationSelector(ServiceEndpoint endpoint) +125
       System.ServiceModel.Description.WebHttpBehavior.ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) +1955
       System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +4245
       System.ServiceModel.ServiceHostBase.InitializeRuntime() +119
       System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +45
       System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +553
       System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +350
       System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1614
    [ServiceActivationException: The service '/Event/Calendar' cannot be activated due to an exception during compilation.  The exception message is: Value cannot be null.
    Parameter name: key.]
       System.Runtime.AsyncResult.End(IAsyncResult result) +925
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +528
       System.ServiceModel.Activation.AspNetRouteServiceHttpHandler.EndProcessRequest(IAsyncResult result) +107
       System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +151
    It appears that it's having an issue with the service configuration endpoint.  That is registered through Autofac WCF integration using the OOTB RouteTable here:
    RouteTable.Routes.Add(new ServiceRoute("Event/Calendar", new AutofacWebServiceHostFactory(), typeof(CalendarSvc)));
    All of this works fine in IIS and the local Azure emulator, but once deployed to the cloud service is where we get an issue.

    I don't know Autofac. What is it doing? If you use a normal WCF REST service, or ASP.NET Web API, do you see the same issue? If it does work, you may want to post a question on Autofac's forum:
    https://github.com/autofac/Autofac/issues.

  • WCF service connection forcibly closed by the remote host for large data

    Hello ,
                        WCF service is used to generate excel report , When the stored procedure returns large data around 30,000 records. Service fails
    to return the data . Below is the mentioned erorr log :
    System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP
    response to <service url> This could be due to the service
     endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by
    the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException:
    The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException:
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
    ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout).
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at IDataSetService.GetMastersData(Int32 tableID, String userID, String action, Int32 maxRecordLimit, Auditor& audit, DataSet& resultSet, Object[] FieldValues)
       at SPARC.UI.Web.Entities.Reports.Framework.Presenters.MasterPresenter.GetDataSet(Int32 masterID, Object[] procParams, Auditor& audit, Int32 maxRecordLimit).
    WEB CONFIG SETTINGS OF SERVICE
    <httpRuntime maxRequestLength="2147483647" executionTimeout="360"/>
    <binding name="BasicHttpBinding_Common"  closeTimeout="10:00:00"  openTimeout="10:00:00"
           receiveTimeout="10:00:00"  sendTimeout="10:00:00"  allowCookies="false"
           bypassProxyOnLocal="false"  hostNameComparisonMode="StrongWildcard"
           maxBufferSize="2147483647"  maxBufferPoolSize="0"  maxReceivedMessageSize="2147483647"
           messageEncoding="Text"  textEncoding="utf-8"   transferMode="Buffered"
           useDefaultWebProxy="true">
    <readerQuotas     maxDepth="2147483647"
          maxStringContentLength="2147483647"  maxArrayLength="2147483647"
          maxBytesPerRead="2147483647"  maxNameTableCharCount="2147483647" />
         <security mode="None"> 
    WEB CONFIG SETTINGS OF CLIENT
    <httpRuntime maxRequestLength="2147483647" requestValidationMode="2.0"/>
    <binding name="BasicHttpBinding_Common"
           closeTimeout="10:00:00"       openTimeout="10:00:00"
           receiveTimeout="10:00:00"       sendTimeout="10:00:00"
            allowCookies="false"        bypassProxyOnLocal="false"
            hostNameComparisonMode="StrongWildcard"        maxBufferSize="2147483647"
            maxBufferPoolSize="2147483647"        maxReceivedMessageSize="2147483647"
            messageEncoding="Text"        textEncoding="utf-8"
            transferMode="Buffered"        useDefaultWebProxy="true">
     <readerQuotas
           maxDepth="2147483647"
           maxStringContentLength="2147483647"
           maxArrayLength="2147483647"
           maxBytesPerRead="2147483647"
           maxNameTableCharCount="2147483647" />   

    Doing binding configuration on a WCF service to override the default settings is not done the sameway it would be done on the client-side config file.
    A custom bindng must be used on the WCF service-side config to override the defualt binding settings on the WCF service-side.
    http://robbincremers.me/2012/01/01/wcf-custom-binding-by-configuration-and-by-binding-standardbindingelement-and-standardbindingcollectionelement/
    Thee readerQuotas and everything else must be given in the Custom Bindings to override any default setttings on the WCF service side.
    Also, you are posting to the wrong forum.
    http://social.msdn.microsoft.com/Forums/vstudio/en-us/home?forum=wcf

  • WCF service application hosted in IIS for reading Windows server service bus topic/subscription

    We have a WCF service application(not web application) which is deployed in IIS 8 pointing to the windows server service bus topic/subscription. We have configured the WCF service with applicationInitialization feature of IIS 8 to warm up.
    But the WCF service is not reading any message from the topic/subscription.
    configured in web.config file as below
    <system.webServer>
    <applicationInitialization>
    <add initializationPage="/MyService.svc" />
    </applicationInitialization>
    </system.webServer>
    When we run the same from visual studio its reading messages from topic/subscription.
    any configuration/settings which we are missing?

    You probably  didn't initialize correctly the auto-start. Btw. I would recommend you to use AppFabric for this feature. It is more transparent in development and production.
    Please take a look on following posts:
    http://social.technet.microsoft.com/wiki/contents/articles/1284.host-wcf-services-with-service-bus-endpoints-in-iis-and-windows-server-appfabric.aspx
    http://developers.de/blogs/damir_dobric/archive/2009/10/11/iis-7-5-and-always-running-web-applications.aspx
    http://developers.de/blogs/damir_dobric/archive/2010/06/11/appfabric-issue-with-aoutostart.aspx
    Damir Dobric
    developers.de
    daenet.de
    daenet.eu
    daenet.com

  • Hosting WCF services on OSB 11G

    Hi there,
    I have been reading online to see if web services created through WCF can be hosted side by side in OSB 11G with Java services. I have found posts on how you can allow java web services hosted on OSB 11G to call wcf services, but i have found nothing on hosting WCF services.
    Is this possible? If so, what are the advantages /disadvantages?
    Thanks very much.
    Rita

    Oracle Service bus is all Java environment and I do not think you can host WCF web services(based on .NET) on Oracle Service Bus, however it may be possible for oracle service bus to inter operate with the WCF web services.
    jayesh@yagna

  • Azure newby! Persist an object across multiple Azure WCF Service Calls.

    I have created a small .NET Library (DLL) which does custom calculations and such.
    I would like to create an Azure WCF service which basically wraps this libraries API.
    The library, by necessity, is setup like an engine that must be initialized before use, so I don't want each and every service call to instantiate its own copy of the library. Is there a way to have the first call instantiate the library
    and then persist it somewhere so that other service calls will just use the same instance?

    Hello,
    We are researching on the query and would get back to you soon on this.
    I apologize for the inconvenience and appreciate your time and patience in this matter.
    Regards,
    Azam khan

  • Web reference error wit a WCF service client

    Dear all,
    I have build as a studient demo a WCF service hosted under Windows Nt service with the following configuration file services:
    <services>
    <service behaviorConfiguration="MesServiceBehaviour" name="WCFServices.MesServices">
    <clear />
    <endpoint address="net.tcp://localhost:2000/MyService/ConvertCase"
    binding="netTcpBinding" contract="WCFInterfaces.IMesServices"
    listenUriMode="Explicit">
    <identity>
    <certificateReference storeName="My" storeLocation="LocalMachine"
    x509FindType="FindBySubjectDistinguishedName" />
    </identity>
    </endpoint>
    <endpoint address="http://localhost/ConvertCase" binding="basicHttpBinding"
    bindingConfiguration="" contract="WCFInterfaces.IMesServices" />
    </service>
    </services>
    <!--Serivice behaviour definition-->
    <behaviors>
    <serviceBehaviors>
    <behavior name="MesServiceBehaviour">
    <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8080/MyService/ConvertCase" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    Then I would liek to show my student how to use the metadata to access the service.
    For that I have created a simple client application and add a web reference to my project pointing to my service adress. i get corresponding files created but just like this my client application do not compile with following error in autogenerate file :
    // <auto-generated>
    // This code was generated by a tool.
    // Runtime Version:2.0.50727.3053
    // Changes to this file may cause incorrect behavior and will be lost if
    // the code is regenerated.
    // </auto-generated>
    // CODEGEN: The binding 'NetTcpBinding_IMesServices' from #pragma warning disable 1591
    namespace 'http://tempuri.org/' was ignored. There is no SoapTransportImporter that understands the transport 'http://schemas.microsoft.com/soap/tcp'.
    // This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.3053.
    namespace Client.myServiceProxy {}
    #pragma warning restore 1591
    IN addition to that, how can I access the generated proxy from my client code ?
    The proxy object I have created seems not visible is there something to add or change absed on generated code ?
    I have never used such technique for proxy I am always using the channelFactory class but I would like to show my studient possibilities. And for me using autogeenrated code should at least compile and work straigt away..
    Thnaks for help
    sergeYour experience is build from the one of others

    Can you tell me how you fixed this?  I am having the exact same error - the generated proxy has nothing in it but comments:
    There is no SoapTransportImporter that understands the transport 'http://schemas.xmlsoap.org/soap/tcp/'.
    Nettie

  • How we can limit the number of concurrent calls to a WCF service without use the Singleton pattern or without do the change in BizTalk Configuration file?

    How can we send only one message to a WCF service at a time? How we can limit the number of concurrent calls to a WCF service without use the Singleton pattern or without do the change in BizTalk Configuration file? Can we do it by Host throttling?

    Hi Pawan,
    You need to use WCF-Custom adapter and add the ServiceThrottlingBehavior service behavior to a WCF-Custom Locations.
    ServiceThrottlingBehavior.MaxConcurrentCalls - Gets or sets a value that specifies the maximum number of messages actively processing across a ServiceHost. The MaxConcurrentCalls property specifies the maximum number of messages actively
    processing across a ServiceHost object. Each channel can have one pending message that does not count against the value of MaxConcurrentCalls until WCF begins to process it.
    Follow MSDN-
    http://msdn.microsoft.com/en-us/library/ee377035%28BTS.10%29.aspx
    http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicethrottlingbehavior.maxconcurrentcalls.aspx
    I hope this helps.
    Rachit
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Consuming Orchestration Exposed WCF service On remote system.

    Hello All ,  I am new to BizTalk, so bear with me 
    I have created an orchestration for Insert operation to DB and Exposed it as WCF service, finally deployed in IIS fine.
    but whenever I am trying browse wsdl of service its prompting as : Network Error (dns_unresolved_hostname)  
     Your requested host "DomainName" could not be resolved by DNS.
    url : http://domainName/Biztalk_PaymentTransaction_Process_PaymentTransaction_Port_RcvTransaction.svc?singleWsdl .
    I just replaced that domainName and put IP there I am able to browse my service, worked fine on Local system.
    but while trying with same url replacing domainname with
    IP on remote system, its throwing Exception as below
    There was no endpoint listening at http://DomainName/Biztalk_PaymentTransaction_Process_PaymentTransaction_Port_RcvTransaction.svc
    that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    please Explain what I need to do to resolve this,
    Do I'm missing something or what extra I need to DO...
    Thanks to all.

    Associate the domain name and the IP of the server where the service is hosted in the host file.
    Goto the server where the service is hosted.
    Goto the server’s host file in %SystemRoot%\system32\drivers\etc\hosts
    Take a backup of the host file before you edit it.
    Add the following entry as the last line in the host file, replacing in it with the actual IP Domain name.
    xxx.xxx.xxx.xxx YourdomainName.com
    where xxx.xxx.xxx.xxx = IP and YourdomainName.com = domain name
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • No transport error while consuming WCF service in a REST way

    Hi,
    Here is a small article on when we usually face No Transport error and how to get rid of it.
    I recently worked on a sample application using “app for Office” (New in Visual Studio 11.0)
    What is “app for Office”?
    An app for Office is basically a webpage that is hosted inside an Office client application. You can use apps to extend the functionality of a document, email message, meeting request, or appointment. Apps
    can run in multiple environments and clients, including rich Office desktop clients, Office Web Apps, mobile browsers, and also on-premises and in the cloud.
    What can an app for Office do?
    An app for Office can do pretty much anything a webpage can do inside the browser, such as the following:
    Provide an interactive UI and custom logic through      JavaScript. (Develop UI using HTML and JavaScript)
    Use JavaScript frameworks such as jQuery.
    Connect to REST endpoints and web services via      HTTP and AJAX.
    Run server-side code or logic, if the page is      implemented using a server-side scripting language such as ASP or PHP.
    As “app for Office” doesn’t have an option to write server side scripting (unlike code behind or in-line coding feature in ASP.NET/MVC) we will have to go for web service or WCF service and consume the service
    using any JavaScript framework like Jquery.
    I wrote a simple WCF service to hook up with server side code and consumed the service using Jquery as follows
    $(document).ready(function () {
    $.ajax({
    type: "GET",
    url: "http://localhost/MyService.svc/rh/data?id=" + $('#sampleType').val(),
    processData: false,
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    crossDomain: true,
    success: function (data) {
    alert(data)
    error: function (xhr, status, error) {
    alert(error);
    I encountered an error saying “No Transport” when I executed the client application.
     I did some investigation on this and found out the root cause that cross-domain request was disabled. But I was really not sure whether it was at my WCF service end or “app for Office” client end. I added
    Client Access policy and Cross-domain-policy xml files to WCF service in order to enable cross-domain request 
    so that service will accept any type requests sent form different domains.
    Client Access policy
    <?xml version="1.0" encoding="utf-8" ?>
    <access-policy>
    <cross-domain-access>
    <policy>
    <allow-from http-request-headers="*">
    <domain uri="*"/>
    </allow-from>
    <grant-to>
    <resource include-subpaths="true" path="/"/>
    </grant-to>
    </policy>
    </cross-domain-access>
    </access-policy>
    Cross-domain-policy
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-http-request-headers-from domain="*" headers="*"/>
    </cross-domain-policy>
    Both the policies should be in different XML files
    But this didn’t solve my problem. After a little bit more investigation I found exactly where and how to enable-cross domain requests.
    Solution
    We need to enable cross-domain requests in environments that do not support cross-domain requests.
    “Cors is equal to true if a browser can create an XMLHttpRequest object and if thatXMLHttpRequest
    object has a withCredentials property. To enable cross-domain requests in environments that do not support cors yet but do allow cross-domain XHRrequests (windows gadget, etc), set $.support.cors = true;”
    You just have to add jQuery.support.cors = true; in your client scripting and it works perfectly fine.
    [Cors- Cross-Origin Resource Sharing]
    A simple example:
    $.support.cors = true;
    $(document).ready(function () {
    $.ajax({
    type: "GET",
    url: "http://localhost/MyService.svc/rh/data?id=" + $('#sampleType').val(),
    processData: false,
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    crossDomain: true,
    success: function (data) {
    alert(data)
    error: function (xhr, status, error) {
    alert(error);
    Hope this will be helpful.
    Thanks

    This is very good technich to resolve the problem. but this is not working in Google chrome or Firfox . can any one help me.

  • Accessing windows application through WCF service under IIS

    I am developing a system where user interacts with WCF Service hosted in IIS server. The WCF application then have to fire-up winform application along with some parameters. This winform application do some processing and then load a application(software) installed
    in the server. This application will create some output documents and put it in the share-able folder where user has a access to.
    It is working fine in development environment i.e. output was being created but when I deployed it in IIS, it started throwing errors. I tried loading the WinForm using two methods:
    Winform is loaded creating a instance of WinForm from WCF host
    Instance of WinForm is loaded (.EXE) using System.Process.Start()
    Both operation failed and throws "System.UnauthorizedAccessException". How to achieve this using IIS?
    Saugat K.C.

    Both operation failed and throws "System.UnauthorizedAccessException". How to achieve this using IIS?
    This error is something wrong with the permission, check the permission in the IIS.
    I sale myself ONLY half CNY!

Maybe you are looking for

  • I upgraded to snow leopard but now I have only 1 GB of storage space?

    It seems like all my files/apps are duplicated or something. I found all my old files, but do I really have to load all my music back in to itunes? Same thing with my photos, I have them all but they aren't showing up into iphoto.

  • What's a good External Hard Drive to use with Time Capsule

    I have a MacBook and a 1GB Time Capsule, and until recently used my TC to store and access the music and video files I've purchased from the iTunes store as well as my Time Machine backups. The HD in the TC crashed a few months ago, and necessitated

  • In Mail  how do I save photo attachments?

    Im using Ipad Air and cant figure out how to save photos people sent me in an email. Ive tapped on the photo and looked for an icon but cant seem to figure this out ... many thanks.

  • Buttons created in InDesign don't display properly in Acrobat DC

    I am having issues with how buttons created in InDesign CC (2014) and exported to interactive PDF display in Acrobat DC. These buttons use transparent layers and effects such as drop shadow. The buttons displayed great in Acrobat XI. Acrobat XI: Acro

  • ACR 6.6 update for PSE 9

    To quote the Adobe readme: "Adobe® Photoshop® Camera Raw 6.6 Read Me Installation This new version of the Camera Raw plug-in replaces the original Camera Raw plug-in that was installed with Photoshop CS5, Photoshop Elements 9 and Premiere Elements 9.