Search Results

Search found 4275 results on 171 pages for 'accept'.

Page 18/171 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Is it possible to force the WCF test client to accept a self-signed certificate?

    - by Lawrence Johnston
    I have a WCF web service running in IIS 7 using a self-signed certificate (it's a proof of concept to make sure this is the route I want to go). It's required to use SSL. Is it possible to use the WCF Test Client to debug this service without needing a non-self-signed certificate? When I try I get this error: Error: Cannot obtain Metadata from https:///Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https:///Service1.svc Metadata contains a reference that cannot be resolved: 'https:///Service1.svc'. Could not establish trust relationship for the SSL/TLS secure channel with authority ''. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.HTTP GET Error URI: https:///Service1.svc There was an error downloading 'https:///Service1.svc'. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.

    Read the article

  • How to configure a WCF service to only accept a single client identified by a x509 certificate

    - by Johan Levin
    I have a WCF client/service app that relies on secure communication between two machines and I want to use use x509 certificates installed in the certificate store to identify the server and client to each other. I do this by configuring the binding as <security authenticationMode="MutualCertificate"/>. There is only client machine. The server has a certificate issued to server.mydomain.com installed in the Local Computer/Personal store and the client has a certificate issued to client.mydomain.com installed in the same place. In addition to this the server has the client's public certificate in Local Computer/Trusted People and the client has the server's public certificate in Local Computer/Trusted People. Finally the client has been configured to check the server's certificate. I did this using the system.servicemodel/behaviors/endpointBehaviors/clientCredentials/serviceCertificate/defaultCertificate element in the config file. So far so good, this all works. My problem is that I want to specify in the server's config file that only clients that identify themselves with the client.mydomain.com certificate from the Trusted People certificate store are allowed to connect. The correct information is available on the server using the ServiceSecurityContext, but I am looking for a way to specify in app.config that WCF should do this check instead of my having to check the security context from code. Is that possible? Any hints would be appreciated. By the way, my server's config file looks like this so far: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="MyServer.Server" behaviorConfiguration="CertificateBehavior"> <endpoint contract="Contracts.IMyService" binding="customBinding" bindingConfiguration="SecureConfig"> </endpoint> <host> <baseAddresses> <add baseAddress="http://localhost/SecureWcf"/> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="CertificateBehavior"> <serviceCredentials> <serviceCertificate storeLocation="LocalMachine" x509FindType="FindBySubjectName" findValue="server.mydomain.com"/> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors> <bindings> <customBinding> <binding name="SecureConfig"> <security authenticationMode="MutualCertificate"/> <httpTransport/> </binding> </customBinding> </bindings> </system.serviceModel> </configuration>

    Read the article

  • ArrayCollection error in Flex does not accept single XML nodes - alternatives?

    - by Rees
    hello, i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection. this error occurs as the line of code: myList= e.result.list.name; Why can't ArrayCollection work with a single node? I'm using this ArrayCollection as a dataprovider for a Component -is there an alternative I can use that will take BOTH single and repeating nodes as well as work as a dataprovider? Thanks in advance! code: [Bindable] private var myList:ArrayCollection= new ArrayCollection(); private function getList(e:Event):void{ var getStudyLoungesService:HTTPService = new HTTPService(); getStuffService.url = "website.com/asdf.php"; getStuffService.addEventListener(ResultEvent.RESULT, onGetList); getStuffService.send(); } private function onGetList(e:ResultEvent):void{ myList= e.result.list.name; }

    Read the article

  • Generic function that accept a table and column name and returns all the primary key values that mat

    - by nashr rafeeg
    i have functions that look like this that is littered through out the code def get_M_status(S): M_id = merital.select(merital.c.marital_status_description == S).execute().fetchone() if M_id == None: print "Warning: No Marital id found for %s Merital status to Single" % S M_id = merital.select(merital.c.marital_status_description == "Single").execute().fetchone() return M_id[0] i was wondering if their is a way to write a generic function where i can pass the relevant values ie: table name primary key column filter column and filter value cheers

    Read the article

  • How can I get IE8 to accept a css :before tag?

    - by William Calleja
    I have the following CSS code .editable:before { content: url(../images/icons/icon1.png); padding-right:5px; } this is used in conjuntion with the following markup: <span class="editable"></span> In every other blessed browser in the world my icon is appearing, but IE8 seems to have a problem with this. Isn't the :before pseudo-element CSS2? isn't content: also a CSS2 command? what gives?

    Read the article

  • How do I get netcat to accept connections from outside the LAN?

    - by Chris
    I'm using netcat as a backend to shovel data back and forth for a program I'm making. I tested my program on the local network, and once it worked I thought it would be a matter of simply forwarding a port from my router to have my program work over the internet. Alas! This seems not to be the case. If I start netcat listening on port 6666 with: nc -vv -l -p 6666, then go to 127.0.0.1:6666 in a browser, as expected I see a HTTP GET request come through netcat (and my browser sits waiting in vain). If I go to my.external.ip.address:6666, however, nothing comes through at all and the browser displays 'could not connect to my.external.ip.address:6666'. I know that the port is correctly forwarded, as www.canyouseeme.org says port 6666 is open (and when netcat is not listening, that its closed). If I run netcat with -g my.adslmodem's.local.address to set the gateway address, I get the same behavior. Am I using this command line option correctly? Any insight as to what I'm doing wrong?

    Read the article

  • Could the UIHint attribute accept a property of the current class ?

    - by user252160
    I found the follwing code in MSDN . How can I change this "UnitsInStock" with a value that my Product class has. For instance, Product has a FieldType property which has a string property called Name. I'd like to use that FieldType.Name property instead of hardcoding with a string. However, I cannot specify "this", or the current instance as an argument of the UIHint attribute . Please, help using System; using System.Web.DynamicData; using System.ComponentModel.DataAnnotations; [MetadataType(typeof(ProductMetadata))] public partial class Product { } public partial class ProductMetadata { [UIHint("UnitsInStock")] [Range(100, 10000, ErrorMessage = "Units in stock should be between {1} and {2}.")] public object UnitsInStock; }

    Read the article

  • How to make Spring accept fluent (non-void) setters?

    - by Chris
    Hi, I have an API which I am turning into an internal DSL. As such, most methods in my PoJos return a reference to this so that I can chain methods together declaratively as such (syntactic sugar). myComponent .setID("MyId") .setProperty("One") .setProperty2("Two") .setAssociation(anotherComponent) .execute(); My API does not depend on Spring but I wish to make it 'Spring-Friendly' by being PoJo friendly with zero argument constructors, getters and setters. The problem is that Spring seems to not detect my setter methods when I have a non-void return type. The return type of this is very convenient when chaining together my commands so I don't want to destroy my programmatic API just be to compatible with Spring injection. Is there a setting in Spring to allow me to use non-void setters? Chris

    Read the article

  • Why does a function that takes IEnumerable<interface> not accept IEnumerable<class>?

    - by Matt Whitfield
    Say, for instance, I have a class: public class MyFoo : IMyBar { ... } Then, I would want to use the following code: List<MyFoo> classList = new List<MyFoo>(); classList.Add(new MyFoo(1)); classList.Add(new MyFoo(2)); classList.Add(new MyFoo(3)); List<IMyBar> interfaceList = new List<IMyBar>(classList); But this produces the error: `Argument '1': cannot convert from 'IEnumerable<MyFoo>' to 'IEnumerable<IMyBar>' Why is this? Since MyFoo implements IMyBar, one would expect that an IEnumerable of MyFoo could be treated as an IEnumerable of IMyBar. A mundane real-world example being producing a list of cars, and then being told that it wasn't a list of vehicles. It's only a minor annoyance, but if anyone can shed some light on this, I would be much obliged.

    Read the article

  • Outlook is unable to accept french-accented characters in my mailto string?

    - by 4501
    Outlook is causing some problems when being passed a mailto string with accented characters in it. Changing the codepage for my entire webpage that has this string on it solves this problem, but that causes other problems in the system, so I would not like to do that. A string like such returns a lot of garbage characters: "mailto:[email protected]?subject=Mon bâtiment / Départementé / Bureau n'est pas répertorié" Meanwhile, this cuts off the character after the "D" "mailto:[email protected]?subject=Mon bâtiment / D&eacute;partement&#233; / Bureau n'est pas r&#233;pertori&#233;" What gives? Is there no way to make this work? I am in Canada, so some regional issues might be taking effect here?

    Read the article

  • getting maps to accept a dynamically generated KML file?

    - by arc
    Hi. I have a button that launches the google maps app on my device via an intent. I want to be able to pass it a php page that generates a KML file. I have done this on a website before using the googlemaps api in JS - but it doesn't seem to work on Android. My php file is as follows; <?php echo '<kml xmlns="http://www.google.com/earth/kml/2">'; echo '<Placemark>'; echo '<name>Google Inc.</name>'; echo '<description>1600 Amphitheatre Parkway, Mountain View, CA 94043</description>'; echo '<Point>'; echo '<coordinates>-122.0841430, 37.4219720, 0</coordinates>'; echo '</Point>'; echo '</Placemark>'; echo '</kml>'; ?> Launching with: final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=http://website.com/kml_gen.php")); startActivity(myIntent); It launches maps, finds the file - but won't display it 'because it contains errors'. Is this just not possible, or are there other ways to construct the intent that might work?

    Read the article

  • How can I accept a hash mark in a URL via $_GET?

    - by bccarlso
    From what I have been able to understand, hash marks (#) aren't sent to the server, so it doesn't seem likely that I will be able to use raw PHP to parse data like in the URL below: index.php?name=Ben&address=101 S 10th St Suite #301 I'm looking to pre-populate form fields with this $_GET data. How would I do this with Javascript (or jQuery), and is there a fallback that wouldn't break my form for people not using Javascript? Currently if there is a hash (usually in the address field), everything after that is not parsed in or stored in $_GET.

    Read the article

  • How to make iPhone application accept incorrect server certificate but only specific one?

    - by Igor Romanov
    I need to work with private HTTPS API and client has incorrect certificate on the host. Certificate is for www.clienthost.com and I'm working with api.clienthost.com. So I need to connect via HTTPS to api.clienthost.com ignoring incorrect certificate but still make sure it is the one for www.clienthost.com and not something else. I found this answer: http://stackoverflow.com/questions/933331/how-to-use-nsurlconnection-to-connect-with-ssl-for-an-untrusted-cert and it seems to solve half of my problem but I'm trying to figure out how to still check certificate for host is one I expect to see and not different.

    Read the article

  • How to get bit rotation function to accept any bit size?

    - by calccrypto
    i have these 2 functions i got from some other code def ROR(x, n): mask = (2L**n) - 1 mask_bits = x & mask return (x >> n) | (mask_bits << (32 - n)) def ROL(x, n): return ROR(x, 32 - n) and i wanted to use them in a program, where 16 bit rotations are required. however, there are also other functions that require 32 bit rotations, so i wanted to leave the 32 in the equation, so i got: def ROR(x, n, bits = 32): mask = (2L**n) - 1 mask_bits = x & mask return (x >> n) | (mask_bits << (bits - n)) def ROL(x, n, bits = 32): return ROR(x, bits - n) however, the answers came out wrong when i tested this set out. yet, the values came out correctly when the code is def ROR(x, n): mask = (2L**n) - 1 mask_bits = x & mask return (x >> n) | (mask_bits << (16 - n)) def ROL(x, n,bits): return ROR(x, 16 - n) what is going on and how do i fix this?

    Read the article

  • Google Maps custom marker - can the iframe accept one like the static maps?

    - by alex
    I was reading the static maps API, and it says you can include a custom marker in the GET params. You simply link to an image file. I now have a second Google Map within an iframe, and was wondering if you can attach custom markers via the GET params to it? Here is the src attribute of the iframe currently. http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=111+Fake+Street+Noosaville+Queensland+Australia&ie=UTF8&output=embed I can't seem to find the documentation on how to do this, if possible. Is this possible?

    Read the article

  • Cheapest way to go for somebody who wants to accept payments, but won't be accepting hundreds of ord

    - by blockhead
    I have a client who lectures, and wants to sell spots to his lecture online. I would preferably like to set him up with a solution that allows me to collect billing information on his site. My experience with e-commerce is in using solutions like Authorize.net, however this does not seem cost effective since I can't imagine he's making a huge profit off of this. I'm afraid he would lose money in the cost of using Authorize.net (or any payment gateway for the matter). I could use google checkout or paypal express, but this would require me to leave his site (although with google checkout, it looks like, from a glance, that I could just submit to their form from my server, and likely with paypal as well, but I don't know if this is against their TOS). What is the most cost-effective solution for accepting credit card payments in this situation?

    Read the article

  • How to accept an incoming call by clicking a button?

    - by upright
    HI, all! I'm trying to implement my own phone call handling UI. What I want to do is, if a call comes in, the incoming telephone number and a picture are displayed, and, if I press a button, the incoming call will be accepted/answered. The related codes are: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); answerButton = (Button) findViewById(R.id.pickup); answerButton.setOnClickListener(new OnClickListener() { public void onClick(final View v) { Intent intent = new Intent("android.intent.action.ANSWER"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }); Sadly, the code does not work. At first, an exception is thrown if I press my answer button: ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.ANSWER Then I added an entry in the AndroidManifest.xml: I run the app again, there is no exception anymore. However, I doubt the incoming call is not really accepted. Because if the press the Android's screen answer button (green button), the incoming call is accepted and a green button is also displayed on the upper left corner of the emulator screen, while my app doesn't. I also read the Phone app's source code in android source. There is method such as acceptCall() in the Phone class. But these codes seem difficult for me to use, because there are many imports declaration in the code, such as : import com.android.internal.telephony.Call; import com.android.internal.telephony.CallStateException; import com.android.internal.telephony.CallerInfo; import com.android.internal.telephony.CallerInfoAsyncQuery; import com.android.internal.telephony.Connection; import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.Phone; And, if I add these imports in my code, there will be too many errors, such as : "The import com.android.internal.telephony cannot be resolved" What is the right and simple way for my problem? Thanks in advance!

    Read the article

  • Why won't C# accept a (seemingly) perfectly good Sql Server CE Query?

    - by VoidKing
    By perfectly good sql query, I mean to say that, inside WebMatrix, if I execute the following query, it works to perfection: SELECT page AS location, (len(page) - len(replace(UPPER(page), UPPER('o'), ''))) / len('o') AS occurences, 'pageSettings' AS tableName FROM PageSettings WHERE page LIKE '%o%' UNION SELECT pageTitle AS location, (len(pageTitle) - len(replace(UPPER(pageTitle), UPPER('o'), ''))) / len('o') AS occurences, 'ExternalSecondaryPages' AS tableName FROM ExternalSecondaryPages WHERE pageTitle LIKE '%o%' UNION SELECT eventTitle AS location, (len(eventTitle) - len(replace(UPPER(eventTitle), UPPER('o'), ''))) / len('o') AS occurences, 'MainStreetEvents' AS tableName FROM MainStreetEvents WHERE eventTitle LIKE '%o%' Here i am using 'o' as a static search string to search upon. No problem, but not exeactly very dynamic. Now, when I write this query as a string in C# and as I think it should be (and even as I have done before) I get a server-side error indicating that the string was not in the correct format. Here is a pic of that error: And (although I am only testing the output, should I get it to quit erring), here is the actual C# (i.e., the .cshtml) page that queries the database: @{ Layout = "~/Layouts/_secondaryMainLayout.cshtml"; var db = Database.Open("Content"); string searchText = Request.Unvalidated["searchText"]; string selectQueryString = "SELECT page AS location, (len(page) - len(replace(UPPER(page), UPPER(@0), ''))) / len(@0) AS occurences, 'pageSettings' AS tableName FROM PageSettings WHERE page LIKE '%' + @0 + '%' "; selectQueryString += "UNION "; selectQueryString += "SELECT pageTitle AS location, (len(pageTitle) - len(replace(UPPER(pageTitle), UPPER(@0), ''))) / len(@0) AS occurences, 'ExternalSecondaryPages' AS tableName FROM ExternalSecondaryPages WHERE pageTitle LIKE '%' + @0 + '%' "; selectQueryString += "UNION "; selectQueryString += "SELECT eventTitle AS location, (len(eventTitle) - len(replace(UPPER(eventTitle), UPPER(@0), ''))) / len(@0) AS occurences, 'MainStreetEvents' AS tableName FROM MainStreetEvents WHERE eventTitle LIKE '%' + @0 + '%'"; @:beginning <br/> foreach (var row in db.Query(selectQueryString, searchText)) { @:entry @:@row.location &nbsp; @:@row.occurences &nbsp; @:@row.tableName <br/> } } Since it is erring on the foreach (var row in db.Query(selectQueryString, searchText)) line, that heavily suggests that something is wrong with my query, however, everything seems right to me about the syntax here and it even executes to perfection if I query the database (mind you, un-parameterized) directly. Logically, I would assume that I have erred somewhere with the syntax involved in parameterizing this query, however, my double and triple checking (as well as, my past experience at doing this) insists that everything looks fine here. Have I messed up the syntax involved with parameterizing this query, or is something else at play here that I am overlooking? I know I can tell you, for sure, as it has been previously tested, that the value I am getting from the query string is, indeed, what I would expect it to be, but as there really isn't much else on the .cshtml page yet, that is about all I can tell you.

    Read the article

  • Will this web service accept both raw xml and an object?

    - by ChadNC
    We have a web service that provides auto insurance quotes and a company that provides an insurance agency management system would like to use the web service for thier client but they want to pass the web service raw xml instead of using the wsdl to create a port, the object the service expects and calling the web method. The web service has performed flawlessly by creating an object like so com.insurance.quotesvc.AgencyQuote service = new com.insurance.quotesvc.AgencyQuote(); com.insurance.quotesvc.QuotePortType port = service.getQuotePortType(); com.insurance.quotesvc.schemas.request.ACORD parameter = null; Then create initialize the request object with the other objects that make up the response. parameter = factory.createACORD(); parameter.setSignonRq(signOn); parameter.setInsurancesSvcRq(svcRq); And send the request to the web service. com.insurance.quotesvc.schemas.response.ACORD result = null; result = port.requestQuote(parameter); By doing that I am able to easily marshall the request and the result into an xml file and do with them as I wish. So if a client was to send the web service via an http post as raw xml inside of a soap envelope. Would the web service be able to handle the xml without any changes being made to the web service or would there need to be changes made to the web service in order for it to handle a request of that type? The web service is a JAX_WS and we currently have both Java and C# clients consuming the web service using the method described above but now there is another client who wants to send raw xml inside of a soap envelope instead of creating the objects. I feel pretty sure that they will be making the call to the web service using vb. I'm sure I'm missing something obvious but it is eluding me at the moment and any help is greatly appreciated.

    Read the article

  • How to force my method to accept objects from external software?

    - by Roman
    I have a method which needs to take a callback object as an argument and then (at the moment when it's needed) my method will call a specific method of the callback object. I wrote a class called Manager which has a method called addListener. As the argument for this method I need to use a callback object which is defined by the external software. So, I define the addListener in the following way: public void addListener(Listener listener). Of course Eclipse complains because it does not know what Listener is (because the Listener is defined by the external software). The only think that I know (should know) about the Listener is that it has a method called doSomething. So, to pleasure Eclipse I add an interface before my Manager class: interface Listener { void doSomething(); } public class CTManager { ... The problem seems to be solved but then I try to test my software. So, I create a class called test. In this class I create an instance of the Manager class and try to use addListener method of this instance. I also create a class Listener, instantiate it and give the instance to the addListener. And it's the place where the problem appears. Eclipse writes that addListener is not applicable to the given argument. I think it's because it expect something from my Listenr interface but gets something from the Listener class. How can I solve this problem?

    Read the article

  • How come Java doesn't accept my LinkedList in a Generic, but accepts its own?

    - by master chief
    For a class assignment, we can't use any of the languages bultin types, so I'm stuck with my own list. Anyway, here's the situation: public class CrazyStructure <T extends Comparable<? super T>> { MyLinkedList<MyTree<T>> trees; //error: type parameter MyTree is not within its bound } However: public class CrazyStructure <T extends Comparable<? super T>> { LinkedList<MyTree<T>> trees; } Works. MyTree impleements the Comparable interface, but MyLinkedList doesn't. However, Java's LinkedList doesn't implement it either, according to this. So what's the problem and how do I fix it? MyLinkedList: public class MyLinkedList<T extends Comparable<? super T>> { private class Node<T> { private Node<T> next; private T data; protected Node(); protected Node(final T value); } Node<T> firstNode; public MyLinkedList(); public MyLinkedList(T value); //calls node1.value.compareTo(node2.value) private int compareElements(final Node<T> node1, final Node<T> node2); public void insert(T value); public void remove(T value); } MyTree: public class LeftistTree<T extends Comparable<? super T>> implements Comparable { private class Node<T> { private Node<T> left, right; private T data; private int dist; protected Node(); protected Node(final T value); } private Node<T> root; public LeftistTree(); public LeftistTree(final T value); public Node getRoot(); //calls node1.value.compareTo(node2.value) private int compareElements(final Node node1, final Node node2); private Node<T> merge(Node node1, Node node2); public void insert(final T value); public T extractMin(); public int compareTo(final Object param); }

    Read the article

  • Is it possible to have a mysql table accept a null value for a primary_key column referencing a diff

    - by Dr.Dredel
    I have a table that has a column which holds the id of a row in another table. However, when table A is being populated, table B may or may not have a row ready for table A. My question is, is it possible to have mysql prevent an invalid value from being entered but be ok with a NULL? or does a foreign key necessitate a valid related value? So... what I'm looking for (in pseudo code) is this: Table "person" id | name Table "people" id | group_name | person_id (foreign key id from table person) insert into person (1, 'joe'); insert into people (1, 'foo', 1)//kosher insert into people (1, 'foo', NULL)//also kosher insert into people(1, 'foo', 7)// should fail since there is no id 7 in the person table. The reason I need this is that I'm having a chicken and egg issue where it makes perfect sense for the rows in the people table to be created before hand (in this example, I'm creating the groups and would like them to pre-exist the people who join them). And I realize that THIS example is silly and I would just put the group id in the person table rather than vice-versa, but in my real-world problem that is not workable. Just curious if I need to allow any and all values in order to make this work, or if there's some way to allow for null.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >