Verify correct port in javascript for wcf service

down votefavorite
I have 10 different port number in for loop in my javascript, and wcf service is hosted on one of port number from listed 10 ports.
Is there any way i can check by using loop, on which port number my service responses just fine without any error in javascript using ajax json.
Here I have sample code but I want to check this for 10 diff port number:
<script type = "text/javascript">
$("#search").live("click", function ()
var link = document.createElement('a');
link.setAttribute('href', 'http://localhost:55154/Services/Service.svc/GetCustomers');
alert(link.port);
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: 'http://localhost:55154/Services/Service.svc/GetCustomers',
data: '{"prefix": "' + $("#prefix").val() + '"}',
processData: false,
dataType: "json",
success: function (response)
alert(response);
//var customers = eval(response.d);
//var html = "";
//$.each(customers, function () {
// html += "<span>Name: " + this.Name + " Id: " + this.Id + "</span><br />";
//$("#results").html(html == "" ? "No results" : html);
error: function (a, b, c) {
alert(a.responseText);
</script>

Hello,
>is there a specific port number I cannot use?
NO, there is no such port num. You can use any port number for your site and WCF service.
>Is there a way to find the port number of the Site URL
You can find port from central admin.
http://msdn.microsoft.com/en-in/library/hh167832%28v=nav.70%29.aspx
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help

Similar Messages

  • Issue with creating a proxy assembly for WCF services

    Hi
    I am in the process of creating a proxy assembly for WCF services (Project Server 2010) and followed instructions as per below URL
    http://msdn.microsoft.com/en-us/library/ff621594.aspx#pj14_CreateProxyAssembly_UsingWebConfig
    Getting an error when i ran GenWCFProxyAssembly.cmd in Visual studio command prompt as well as DOS command prompt
    Please make a note, i have unzipped Source.zip under Documentation\Intellisense\WCF (path )
    Did i missed out any thing
    Kindly help me with this, trying to do this for the past 5 days
    Regards
    Santosh

    Issue has been resolved after adding environment variable for sn.exe
    Regards
    Santosh

  • Where are settings saved for WCF Service Applications?

    Default Settings for a WCF Service Application are stored in the web.config file and are Read Only because only Application settings are allowed i.e. you cannot change the Scope from "Application" to "User" in the settings designer like
    with other components.  So, in order to save changes to settings the WCF Service Application will need to create a setting property at runtime like this:
    System.Configuration.SettingsProperty newProperty;
    newProperty = new System.Configuration.SettingsProperty("NewSetting");
    newProperty.IsReadOnly = false;
    newProperty.DefaultValue = "New Setting";
    Properties.Settings.Default.Properties.Add(newProperty);
    Properties.Settings.Default.Save();
    OK...this works, but I've looked everywhere and I can't find where the new setting property is being saved.  I have already looked in the C:\Users\[username]\AppData\[Local or Roaming]\[Company Name]\[AppName...etc.]\[version]\user.config and although
    a user.config file was created it does not contain the new property.  Anyone have a clue?
    Actually, this doesn't work...the settings are not saved to the file system.  I located some other posts and modified my code as follows, but the settings are still not saved to the file system.
    System.Configuration.SettingsProperty newProperty;
    newProperty = new System.Configuration.SettingsProperty("NewSetting");
    newProperty.Provider = Properties.Settings.Default.Providers["LocalFileSettingsProvider"];
    newProperty.Attributes.Add(typeof(System.Configuration.UserScopedSettingAttribute), new System.Configuration.UserScopedSettingAttribute());
    newProperty.PropertyType = typeof(string);
    newProperty.IsReadOnly = false;
    newProperty.DefaultValue = "New Setting";
    try
    Properties.Settings.Default.Properties.Add(newProperty);
    catch
    //Just ignore it for now.
    Properties.Settings.Default.Save();
    The new setting appears to be saved only in memory.  If I close Visual Studio then the setting is lost.  Also, I deleted the C:\Users\[username]\AppData\[Local or Roaming]\[Company Name]\[AppName...etc.]\[version]\user.config files and the file
    is no longer being created.
    Looks like I will need to explicitly load/save a text file or use the registry to persist changes to settings.

    Hello Steven,
    >>The new setting appears to be saved only in memory. 
    It seems that the Save() method only saves these runtime added in memory, I suggest you could check the Save method source code since now the .NET is source opened:http://referencesource.microsoft.com/#System/sys/system/configuration/ApplicationSettingsBase.cs,9664b0111a35af52
    >>Looks like I will need to explicitly load/save a text file or use the registry to persist changes to settings.
    Someone provides an implementation about this approach, you could check it:
    http://stackoverflow.com/a/1075318
    Or you could set it in a register entry:
    http://stackoverflow.com/a/26518724
    Regards.
    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.

  • Visual Studio generates wrong proxy and client config for WCF Service Host with customBinding

    Hi,
    I have  a simple WCF test service.
    The serviceModel configuration for the looks like this:
    <system.serviceModel>
    <bindings>
    <customBinding>
    <binding name="NewBinding0">
    <byteStreamMessageEncoding>
    <readerQuotas maxDepth="10" maxStringContentLength="10000" maxArrayLength="10000"
    maxBytesPerRead="1000" maxNameTableCharCount="200" />
    </byteStreamMessageEncoding>
    <tcpTransport />
    </binding>
    </customBinding>
    </bindings>
    <diagnostics>
    <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" />
    </diagnostics>
    <services>
    <service name="WcfServiceLibrary2.Service1">
    <endpoint address="mex" binding="mexHttpBinding" name="mexName"
    contract="IMetadataExchange" />
    <endpoint address="net.tcp://localhost:8734/WcfServiceLibrary2/Service1.svc"
    binding="customBinding" bindingConfiguration="NewBinding0" name="tcpName"
    bindingName="" contract="WcfServiceLibrary2.IService1" />
    <host>
    <baseAddresses>
    <add baseAddress="http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary2/Service1/" />
    </baseAddresses>
    </host>
    </service>
    </services>
    <behaviors>
    <serviceBehaviors>
    <behavior name="">
    <serviceMetadata httpGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    </system.serviceModel>
    However the auto generated client side serviceModel looks like this:
    <system.serviceModel>
    <bindings>
    <customBinding>
    <binding name="tcpName">
    <textMessageEncoding messageVersion="Soap12" />
    <tcpTransport />
    </binding>
    </customBinding>
    </bindings>
    <client>
    <endpoint address="net.tcp://localhost:8734/WcfServiceLibrary2/Service1.svc"
    binding="customBinding" bindingConfiguration="tcpName" contract="ServiceReference2.IService1"
    name="tcpName" />
    </client>
    </system.serviceModel>
    Note the Encoding has changed to from byteStreamMessageEncoding to textMessageEncoding.
    When I test the service with WCF Test Client, I get the error "Addressing Version 'AddressingNone (http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not support adding
    WS-Addressing headers."
    The error message makes sense in considering the client is mis-configured. I could manually modify the client side configuration, but I don't know how to give that to the WCF Test Client.
    When I run my own test client code, I get a NullReferenceException creating the Channel
    at System.Text.UTF8Encoding.GetByteCount(String chars)
    at System.ServiceModel.Channels.EncodedFramingRecord..ctor(FramingRecordType recordType, String value)
    at System.ServiceModel.Channels.EncodedContentType.Create(String contentType)
    at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.CreatePreamble()
    at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel..ctor(ChannelManagerBase factory, IConnectionOrientedTransportChannelFactorySettings settings, EndpointAddress remoteAddresss, Uri via, IConnectionInitiator connectionInitiator, ConnectionPool connectionPool, Boolean exposeConnectionProperty, Boolean flowIdentity)
    at System.ServiceModel.Channels.ConnectionOrientedTransportChannelFactory`1.OnCreateChannel(EndpointAddress address, Uri via)
    at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
    at System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverDuplexSession.CreateInnerChannelBinder(EndpointAddress to, Uri via)
    at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
    at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
    at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
    at System.ServiceModel.ClientBase`1.CreateChannel()
    at System.ServiceModel.ClientBase`1.CreateChannelInternal()
    at System.ServiceModel.ClientBase`1.get_Channel()
    at ConsolWCFTestApp.ServiceReference2.Service1Client.GetXSDFiles(String path) in c:\Users\malley\Documents\Visual Studio 2013\Projects\WcfService1\ConsolWCFTestApp\Service References\ServiceReference2\Reference.cs:line 127
    at ConsolWCFTestApp.Program.Main(String[] args) in c:\Users\malley\Documents\Visual Studio 2013\Projects\WcfService1\ConsolWCFTestApp\Program.cs:line 14
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    Any suggestions much appreciated.
    Martin

    Hi Martin00,
    I have tested your code in my side and I can meet the same exception as you.
    >>"Addressing Version 'AddressingNone (http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not support adding WS-Addressing headers."
    Based the above exception, I try to use the following config:
    <textMessageEncoding messageVersion="Soap12" />
    Instead of this config code:
    <byteStreamMessageEncoding>
    <readerQuotas maxDepth="10" maxStringContentLength="10000" maxArrayLength="10000"
    maxBytesPerRead="1000" maxNameTableCharCount="200" />
    </byteStreamMessageEncoding>-->
    After that it works fine as following:
    Best Regards,
    Amy Peng
    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.

  • SPSiteCollection.Add in WCF service for FBA web application throws "user not found"

    Hi,
    I use SharePoint 2010 SP2. Programmatically I can create a FBA-based web application and now I want to add a new site collection ("/") subsequently. Everything is done in a WCF web service with its own application pool and web
    application. In extracts my code looks like this:
    const uint cLID = 1031;
    const string cSiteWebTemplate = "BLANKINTERNETCONTAINER#0";
    const string cAdminName = "i:0#.f|user|username";
    const string cDisplayName = "username";
    const string cSiteAdminEmail = "[email protected]";
    SPWebApplication webApplication = SPWebApplication.Lookup(new Uri("https://www.someurl.com"));
    using (SPSite newSite = webApplication.Sites.Add("/", "some title", "some site collection comment", cLID, cSiteWebTemplate, cAdminName, cDisplayName, cSiteAdminEmail, null, null, null, false))
    I also have a Windows forms based application where the exactly same code (except the changes required for WCF services) runs smooth, no exceptions or errors.
    Now every time the webApplication.Sites.Add-method is called inside the WCF service by any client I get the following exception (it is in German, English
    translation in square brackets):
    Microsoft.SharePoint.SPException: Der Benutzer kann nicht gefunden werden. [user cannot be found]
      bei [at] Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, SPSiteSubscription siteSubscription, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName,
    String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName)
      bei Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteSubscription siteSubscription, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin,
    String secondaryContactName, String secondaryContactEmail, Boolean useHostHeaderAsSiteName)
      bei Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName,
    String secondaryContactEmail, Boolean useHostHeaderAsSiteName)
    The process user is the same both for my Windows forms based application and my WCF service and I expect the code runs the same in both cases. I did not find any matching forum entry and I have no idea why a WCF service does not execute
    the same way as a Windows forms application. Additionally, before applying SP2, I used an ASMX service with a similar code snippet and it also worked fine.
    Can anyone please tell me why calling
    webApplication.Sites.Add-method by a WCF service does not work? Is there anything I can do to make it work properly?

    The creation of a new web application using SharePoint API works in WCF service. I also lined out that...
    SPWebApplication webApplication = SPWebApplication.Lookup(new Uri(https://www.someurl.com));
    ... works in WCF service. In return I really get the very web application that I requested. Also exactly the same code snippet is called by exactly the same user context both in WCF Service and Windows forms application. Only for Windows forms
    application it does not throw the exception but in WCF Service it does. I had some WCF Service specialist colleague looking through the code and web.config and he stated it looks ok (unfortunately he does not have any experience with SharePoint).
    If you state "It's not, then your WCF config is wrong" what do you think I need to add or change in web.config in order to make it work? BTW: I did not modify app.config in my Windows forms application, so I thought I do not need to modify my web.config.

  • BizTalk published WCF service throwing HTTP 404 error using ISA reverse proxy settings

    I have published my schemas as a WCF service from BizTalk 2010 "Publish WCF Service" wizard. I used Wcf-basicHTTP adapter in receive port. I am able to run the service successfully on localhost IIS and I tested my biztalk solution by sending request using SOAP UI and got response successfully.... Now: Actually, I need to give this service endpoint to my vendor who will send request from outside my company's network i.e. internet. In my infrastrucrue BizTalk is behind the firewall so, we setup a REVERSE proxy server at DMZ layer and it is configured properly. I have tested a simple WCF service by replacing the localhost with Proxy server configured address <DNSName> and it worked absolutely fine. But when I change localhost in my BizTalk schema based published WCF service it is not working and I am getting following error. Really strugling to get it resolved. I wasted a whole 3 days....very upset. Please help me out by giving the detailed step solution. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /BizTalkServiceInstance/MyService.svc I am surprized why other c# code based WCF services are working fine with reverse proxy settings. Server Error in '/' Application. The resource cannot be found.Is there any special things to consider Biztalk exposed wcf servcie over ssl in IIS cluster with ISA

    Hi Singam :)
    First I would start by browsing any other files (files other than the one from WCF) just to ensure that the reverse-proxy’s redirection rules are set correctly. If you get the same 404 error when you try to access other service/files “through reverse-proxy”,
    then it’s an issue in the redirection rule(s) in reverse-proxy.
    If others are fine i.e. no issue in reverse-proxy setup as such, then try the following for WCF service's web.config file. I have seen this issue in WCF service (not just BizTalk’s artifacts exposed as service in reverse-proxy). Add serviceHostingEnvironment
    config as show with in serviceModel section.
    <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
    Regards,
    M.R.Ashwin Prabhu
    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.

  • How To Configure TREX Name Server&Port for UDDI  Service Registry Settings

    Hello Experts,
    we are using CE 7.1 SP 4 and I would like to use the trex service in the Service Registry.
    I use \NWA\Service Registry Configuration\Service Registry Settings\Keyword Search and want to test the TREX Communication using the Test Connection Button.
    If I do so, I receive "Connection to TREX not successful".
    When I press the Update TREX button I receive this exception:
    com.sapportals.trex.TrexException: TREX Name Server (including back-up servers) is down or not accessable. (Errorcode 7217)
    I tried to configure the trex.service with the two parameters: nameserver.address and nameserver.backupserverlist -> tcpip://myhostname.mydomain:30001 (Instance 00).
    I am not sure if the port number is correct -> is there a way to lookup the correct port number?
    Is there something else I should configure?
    Thanks for help, best regards
    Thomas

    Hi Ganesh,
    In order to access the Visual Administrator, go to Start > Programs > SAP J2EE Engine > Visual Administrator. After you login, you will see 2 nodes i.e. Dispatcher and Server. Expand the Server node. Then go to "Services" and expand it. Then go all the way down to "TREX Service". Then on the right hand side, go to the property "nameserver.address" where you will key in "tcpip://<nameserver>:<port>". Then hit "Update" and click on the "Save" button. Then when you go to TRex Monitor, you should be able to see the Name Server running. Hope this helps.
    Thanks,
    Sri
    P.S Please rewards points if you find this helpful. Thanks.

  • Apparently a recent update did not install correctly and we get a message: Service (Apple Mobile Device) failed to start. Verify that you have sufficient privileges to start system services. How do we fix?

    Apparently a recent update did not install correctly and we get a message: Service (Apple Mobile Device) failed to start. Verify that you have sufficient privileges to start systen services, How do we fix this?

    Solving the iTunes Installation Problems in Windows
    1. Apple has posted their solution here: iTunes 11.1.4 for Windows- Unable to install or open - MSVCR80 issue.
    2. If the Apple article does not fully resolve the problem for you, then try Troubleshooting issues with iTunes for Windows updates - MSVCR80.

  • Can you specify the port for default services when installing OEG?

    Hi everyone,
    The default installation of OEG 11g uses 8090 port for management services, and 8080 for the virtualized services that you register in the gateway. After installation, you can change the ports by editing gateway's Profile Repository in Policy Studio. But is there a way to specify the port number before/during the installation?
    Thanks,
    Iris

    Hi -
    here are the steps to change the listening port (in 11.1.1.6)
    - Connect to OEG using Policy Studio
    - Click on "Edit Active Configuration"
    - Under "Services", find the default services, and you'll see a listener for port 8080 there. Right-click to edit this.
    - Change the port from 8080 to your desired port. Note that if you've installed the software and running it as a non-root user on Linux, then it will not have permission to bind to a low-number port (like port 80 for instance)
    - Now deploy your change (for 11.1.1.6 hit F6 or click on the "deploy" button which is towards the right of the toolbar in Policy Studio).
    - You may also choose to version your configuration at this point (click on "version" which is beside the "deploy" button and enter a comment about your version).
    Now verify that OEG is listening on your new port. You can see it bind to the new port by looking at the trace [Connect a browser to port 8090 on OEG, login as admin or another user who has rights to view the trace, then click on "Trace"].
    It's a usual practice to configure a new listener on SSL (e.g. on port 443) then to delete that pre-configured port 8080 listener, if you want to only receive traffic over SSL.

  • 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

  • Do I need to open ports for my services if I am connecting through VPN

    Hi,
    I work in a small office and we are trying to connect people remotely to our server through VPN.
    Using the Server App I managed to make VPN work and successfully connected to our file share points, so that means file sharing worked without opening ports for afp on my Airport router.
    On the other side I cant connect to other services as iCal and Address Book as I am locally in the office. Does that mean I have to open the ports for those services on the router, if yes then why use VPN in the first place.
    Thanks,

    If I understood you correctly:
    External client -> (server.domain.name) -> Router -> Server: is working
    Internal client -> (server.domain.name) -> Router -> Server: is not working
    Internal client -> (local ip) -> Server: is working
    If yes, you can implement a-la "split zone DNS".
    1. On the external DNS your domain name server.domain.name resolved to the external router IP.
    2. You should add record (and zone) server.domain.name to your OS X Lion Server DNS pointing to local IP
    When you are connected to VPN, system sets DNS server to your Lion server and server.domain.name is resolving to local IP.
    When you are working without VPN, system use external DNS and server.domain.name is resolving to external IP.
    Of course, you should open ports for your services on the router is you want to use them from external network.
    I am using this configuration and it works perfectly.

  • Expose an orchestration as WCF service with a Request-Response port set to Direct Binding

    Hello , 
      I'm trying to expose an orchestration as a WCF service (while the Request-Response port is set to Direct binding) . Is this possible ? (the issue will be correlating back the response to the synchronous WCF request after the response is posted back
    to the Message Box by the Direct Send logical port).
    I have no problem in exposing the orchestration while I'm setting the Binding port to 'Specify Later' (What I'm trying to do actually is to expose a orchestration using different adapters (like Http and Wcf ) in the same time ).
    Thanks

    Yes, you can publish an orchestration as WCF/Web service which has direct bound request-response port.
    Subscription works based on “EpmRRCorrelationToken”
    and “RouteDirectToTP”. When you enlist the orchestration which
    has the direct bound request-response port (also published as service), its subscription are based on above two context properties and they take care of correction.
    And also the response matches to the request part of the port due to the nature of two-way communication protocol.
    Create an Orchestration with direct-bound request-response port and publish it as service. This will work. Give it a try
    Regards,
    M.R.Ashwin Prabhu
    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.

  • SVI needed for WiSM service-port?

    I currently have a vlan/SVI on my 6506 for the WiSM service-port. The WiSM has an address on the same subnet. To manage the WiSM, I either https to the Management interface address or use 'session slot X proc Y' from the the 6506. Since I am essentially only using two addresses from a subnet for this service-port I would like to free up the subnet. Can I keep my current functionality by having a vlan only (with the wism service-vlan XX command) with no SVI? Thanks.

    Yes, correct. You dont have to have this as a SVI. You can just drop them into the vlan with no SVI. So long as the WiSMs have a service port and IP and they are on the same subnet in the same vlan you are good.
    After you set this up do a show wism status .. You should see thet are all up.
    In fact I bloged about a security issue with the service port and the SVI interface. Its a good read..
    http://www.my80211.com/security-labs/2010/10/7/cisco-wism-config-practice-opens-svi-vulnerability.html
    I hope this helps.

  • 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.

  • 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

Maybe you are looking for