Search Results

Search found 21126 results on 846 pages for 'client cert'.

Page 11/846 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • A Generic, IDisposable WCF Service Client

    - by Steve Wilkes
    WCF clients need to be cleaned up properly, but as they're usually auto-generated they don't implement IDisposable. I've been doing a fair bit of WCF work recently, so I wrote a generic WCF client wrapper which effectively gives me a disposable service client. The ServiceClientWrapper is constructed using a WebServiceConfig instance, which contains a Binding, an EndPointAddress, and whether the client should ignore SSL certificate errors - pretty useful during testing! The Binding can be created based on configuration data or entirely programmatically - that's not the client's concern. Here's the service client code: using System; using System.Net; using System.Net.Security; using System.ServiceModel; public class ServiceClientWrapper<TService, TChannel> : IDisposable     where TService : ClientBase<TChannel>     where TChannel : class {     private readonly WebServiceConfig _config;     private TService _serviceClient;     public ServiceClientWrapper(WebServiceConfig config)     {         this._config = config;     }     public TService CreateServiceClient()     {         this.DisposeExistingServiceClientIfRequired();         if (this._config.IgnoreSslErrors)         {             ServicePointManager.ServerCertificateValidationCallback =                 (obj, certificate, chain, errors) => true;         }         else         {             ServicePointManager.ServerCertificateValidationCallback =                 (obj, certificate, chain, errors) => errors == SslPolicyErrors.None;         }         this._serviceClient = (TService)Activator.CreateInstance(             typeof(TService),             this._config.Binding,             this._config.Endpoint);         if (this._config.ClientCertificate != null)         {             this._serviceClient.ClientCredentials.ClientCertificate.Certificate =                 this._config.ClientCertificate;         }         return this._serviceClient;     }     public void Dispose()     {         this.DisposeExistingServiceClientIfRequired();     }     private void DisposeExistingServiceClientIfRequired()     {         if (this._serviceClient != null)         {             try             {                 if (this._serviceClient.State == CommunicationState.Faulted)                 {                     this._serviceClient.Abort();                 }                 else                 {                     this._serviceClient.Close();                 }             }             catch             {                 this._serviceClient.Abort();             }             this._serviceClient = null;         }     } } A client for a particular service can then be created something like this: public class ManagementServiceClientWrapper :     ServiceClientWrapper<ManagementServiceClient, IManagementService> {     public ManagementServiceClientWrapper(WebServiceConfig config)         : base(config)     {     } } ...where ManagementServiceClient is the auto-generated client class, and the IManagementService is the auto-generated WCF channel class - and used like this: using(var serviceClientWrapper = new ManagementServiceClientWrapper(config)) {     serviceClientWrapper.CreateServiceClient().CallService(); } The underlying WCF client created by the CreateServiceClient() will be disposed after the using, and hey presto - a disposable WCF service client.

    Read the article

  • How to store and update data table on client side (iOS MMO)

    - by farseer2012
    Currently i'm developing an iOS MMO game with cocos2d-x, that game depends on many data tables(excel file) given by the designers. These tables contain data like how much gold/crystal will be cost when upgrade a building(barracks, laboratory etc..). We have about 10 tables, each have about 50 rows of data. My question is how to store those tables on client side and how to update them once they have been modified on server side? My opinion: use Sqlite to store data on client side, the server will parse the excel files and send the data to client with JSON format, then the client parse the JOSN string and save it to Sqlite file. Is there any better method? I find that some game stores csv files on client side, how do they update the files? Could server send a whole file directly to client?

    Read the article

  • Tutorial: Simple WCF XML-RPC client

    - by mr.b
    Update: I have provided complete code example in answer below. I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side, what I would like to accomplish is to create a simplest possible client (in C# preferably) using WCF. Let's say that Contract for service exposed via XML-RPC is as follows: [ServiceContract] public interface IContract { [OperationContract(Action="Ping")] string Ping(); // server returns back string "Pong" [OperationContract(Action="Echo")] string Echo(string message); // server echoes back whatever message is } So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http. Aaand, what's next? :)

    Read the article

  • .NET Webservice Client: Auto-retry upon call failure

    - by Yon
    Hi, We have a .NET client calling a Java webservice using SSL. Sometimes the call fails due to poor connectivity (the .NET Client is a UI that is used from the weirdest locations). We would like to implement an automatic retry mechanism that will automatically retry a failed call X times before giving up. This should be done solely with specific types of connectivity exceptions (and not for exceptions generated by the web service itself). We tried to find how to do it on the Binding/Channel level, but failed... any ideas? Thanks, yonadav

    Read the article

  • SSL cert install in Mongrel

    - by normalocity
    Running a RoR app. I've created a self-signed SSL cert for my test/dev environment, which consists of a single mongrel, and Mac OS X Leopard. Can I install the SSL cert in such a way that mongrel will use it, or do I have build a different server stack to handle SSL (e.g. Apache in front of a mongrel cluster), and install the cert inside of Apache? For my production server, I'll eventually build a server stack like this, so it's no big deal if I have to go that direction - it's just a question of now or later. Thanks!

    Read the article

  • Pass client side js variable into server side jscript

    - by George
    How can I get the query string from the browser url using client side js and set it as a variable to use in some server side scripting? Client side script: var project = getQueryString("P"); function getQueryString(param) { var queryString = window.location.search.substring(1); splitQueryString = queryString.split("&"); for (i=0; i<splitQueryString.length; i++) { query = splitQueryString[i].split("="); if (query[i] == param) { return query[1]; } } } Server side script: response.write ('<td><a href="/index.asp?P=' + project + ">' + obj.BODY[i].NAME + '</a></td>');

    Read the article

  • NLog not logging messages on XP SP3 with .NET 3.5 Client Profile

    - by oltman
    I'm writing a program that is targeting the .NET 3.5 Client Profile and using NLog. I configure my logger programmatically on start up (no config file.) It works perfectly on Vista and Windows 7, but when running on a fresh install of XP SP3 with the .NET Client Profile installed, it will not log any of the variables in the layout string. For example, with the layout string set to: target.Layout = "MESSAGE: ${longdate}|${level}|${message}"; It will log "MESSAGE: | | |" Again, this only happens on XP SP3, and the logger is set to throw exceptions. Any ideas what may be causing this?

    Read the article

  • qpid-cpp-client won't update through yum

    - by alexus
    somewhere around last week I received a notification for update, so I've tried "yum update" and that's what I'm getting... [alexus@wcmisdlin02 ~]$ sudo yum update Loaded plugins: refresh-packagekit Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package qpid-cpp-client.x86_64 0:0.10-3.el6 will be updated --> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-service-0.4.0-5.el6.x86_64 --> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-host-0.4.0-5.el6.x86_64 --> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-net-0.4.0-5.el6.x86_64 --> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-service-0.4.0-5.el6.x86_64 --> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-host-0.4.0-5.el6.x86_64 --> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-net-0.4.0-5.el6.x86_64 ---> Package qpid-cpp-client.x86_64 0:0.14-22.el6_3 will be an update ---> Package qpid-cpp-client-ssl.x86_64 0:0.10-3.el6 will be updated ---> Package qpid-cpp-client-ssl.x86_64 0:0.14-22.el6_3 will be an update ---> Package qpid-qmf.x86_64 0:0.10-6.el6 will be updated ---> Package qpid-qmf.x86_64 0:0.14-14.el6_3 will be an update --> Finished Dependency Resolution Error: Package: matahari-net-0.4.0-5.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) Requires: libqpidcommon.so.5()(64bit) Removing: qpid-cpp-client-0.10-3.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) libqpidcommon.so.5()(64bit) Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security) Not found Error: Package: matahari-net-0.4.0-5.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) Requires: libqpidclient.so.5()(64bit) Removing: qpid-cpp-client-0.10-3.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) libqpidclient.so.5()(64bit) Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security) Not found Error: Package: matahari-service-0.4.0-5.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) Requires: libqpidclient.so.5()(64bit) Removing: qpid-cpp-client-0.10-3.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) libqpidclient.so.5()(64bit) Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security) Not found Error: Package: matahari-service-0.4.0-5.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) Requires: libqpidcommon.so.5()(64bit) Removing: qpid-cpp-client-0.10-3.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) libqpidcommon.so.5()(64bit) Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security) Not found Error: Package: matahari-host-0.4.0-5.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) Requires: libqpidcommon.so.5()(64bit) Removing: qpid-cpp-client-0.10-3.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) libqpidcommon.so.5()(64bit) Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security) Not found Error: Package: matahari-host-0.4.0-5.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) Requires: libqpidclient.so.5()(64bit) Removing: qpid-cpp-client-0.10-3.el6.x86_64 (@anaconda-ScientificLinux-201107271550.x86_64) libqpidclient.so.5()(64bit) Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security) Not found You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest [alexus@wcmisdlin02 ~]$ any ideas?

    Read the article

  • ASP.NET MVC 2: Custom client side validation rule for dropdowns

    - by Nigel
    I have some custom validation that I need to perform that involves checking the selected option of a dropdown and flagging it as invalid should the user select a specific option. I am using ASP.NET MVC 2 and have a custom Validator and custom server side and client side validation rules as described in this blog article. The server side validation is working fine, however, the client side validation is failing. Here is the javascript validation rule: Sys.Mvc.ValidatorRegistry.validators["badValue"] = function(rule) { var badValue = rule.ValidationParameters["badValue"]; return function(value, context) { if (value != badValue) { return true; } return rule.ErrorMessage; }; }; The rule is being applied to the dropdowns successfully, and placing a breakpoint within the returned function confirms that the validation is firing, and that the 'badValue' is being correctly set. However, 'value' is always null, and so the check always fails. What am I doing wrong?

    Read the article

  • Passing Custom headers from .Net 1.1 client to a WCF service

    - by sreejith
    I have a simple wcf service which uses basicHttp binding, I want to pass few information from client to this service via custom SOAP header. My client is a .net application targetting .Net 1.1, using visual studio I have created the proxy( Added a new web reference pointing to my WCF service) I am able to call methods in the WCF service but not able to pass the data in message header. Tried to override "GetWebRequest" and added custom headers in the proxy but for some reason when I tried to access the header using "OperationContext.Current.IncomingMessageHeaders.FindHeader" it is not thier. Any idea how to solve this prob? This is how I added the headers protected override System.Net.WebRequest GetWebRequest(Uri uri) { HttpWebRequest request; request = (HttpWebRequest)base.GetWebRequest(uri); request.Headers.Add("tesData", "test"); return request; }

    Read the article

  • Server database -> client database update based on version

    - by user296191
    Hi, What is the recommended method of collecting items in a server database, versioning the database then deploying only the version differences to a client ? Should it by a field in the table (ie. Version: 3.3.9876) against each record ? Should it be DateTime (server based) in each record ? And whats the best way to just deploy the changes to a client with an older version of the database ? Is it a DUMP to a file with a Bulk import of some description ? Open to comments.. Suggestions. Database can be anything (firebird, mysql, sqlserver, sqlite)... Any info greatly appreciated.

    Read the article

  • Client side templating with unknown variables

    - by Eirik Johansen
    Our company has an intranet consisting of several e-mail templates filled with variables (like [[NAME]], [[PROJECT]] and so on). I was thinking of implementing some sort of client side templating to make it easier to replace these variables with actual values. The problem is that among all the client side template solutions I've located so far, all of them seem to assume that the JS code knows all the template variables that exist in the markup, and none of them seem to be able to fetch a list of variables defined in the markup. Does anyone know of any solutions/plugin which makes this possible? Thanks in advance!

    Read the article

  • Accessing HTTP status code while using WCF client for accessing RESTful services

    - by Hemant
    Thanks to this answer, I am now able to successfully call a JSON RESTful service using a WCF client. But that service uses HTTP status codes to notify the result. I am not sure how I can access those status codes since I just receive an exception on client side while calling the service. Even the exception doesn't have HTTP status code property. It is just buried in the exception message itself. So the question is, how to check/access the HTTP status code of response when the service is called.

    Read the article

  • Open files on client side from ORACLE Forms

    - by Mousarules
    I'm trying to put a code on a button so that the used would be able to open a specific excel file whenever he pressed it , unfortunately the code i was using ( AppID ) happened to be opening the file on the server side not the client side ; please find the code below : DECLARE AppID PLS_INTEGER; BEGIN AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office12\WINWORD.EXE C:\test\'||:TT_PER_RF_MAIN.T_NUMBER||'.docx', DDE.APP_MODE_NORMAL); END; Can anyone help me how to let the users ( client side ) be able to open it on thier own PCs?

    Read the article

  • CSSOMParser in gwt client side

    - by Zoja
    What i would like to do is to read an css file from a GET request on the client side, and then i would like to parse it to check all the classes. The problem is that I need to implement CSSOMParser for that, and here are the imports import org.w3c.dom.css.CSSRule; import org.w3c.dom.css.CSSRuleList; import org.w3c.dom.css.CSSStyleRule; import org.w3c.dom.css.CSSStyleSheet; import com.steadystate.css.parser.CSSOMParser; the problem is that none of those classes ale probably javascript compilant, so they don't want to compile if they're on the client side. Is there a way to get it done ?

    Read the article

  • How to: WCF XML-RPC client?

    - by mr.b
    I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side, what I would like to accomplish is to create a simplest possible client (in C# preferably) using WCF. Let's say that Contract for service exposed via XML-RPC is as follows: [ServiceContract] public interface IContract { [OperationContract(Action="Ping")] string Ping(); // server returns back string "Pong" [OperationContract(Action="Echo")] string Echo(string message); // server echoes back whatever message is } So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http. Aaand, what's next? :) P.S. I have tried googling around for samples and similar, but all that I could come up with are some blog-related samples that use existing (and very big/numerous) classes, which implement appropriate IContract (or IBlogger) interfaces, so that most of what I am interested is hidden below several layers of abstraction...

    Read the article

  • Restarting service from a client computer without rights

    - by Jason
    I have already created the program to restart a SQL database but it only works if the client has the rights. This is going to be done on a local network from a client computer when they can't get a person that has the password on the phone. Any thoughts I'm currently using the servicecontroller to start and stop database. When I don't have the rights I get a access denied error, or This operation might require other privileges. Not sure if impersonation would work since I don't have the userid and password.

    Read the article

  • MVC2 Client-Side Validation for injected Ajax response

    - by radu-negrila
    Hi, I have the following scenario for an MVC 2 website. The user checks a radio. I make a jQuery GET to retrieve some html (partial view + view model). The view-model is annotated with validation attributes. I need client-side validation for the new html's inputs. I tried placing the following line in the partial view: <% Html.EnableClientValidation(); % I was naive. Also for the obtained html I use jQuery's .html to populate my placeholder, which also would execute the javascript. Not that there is any. Is is possible to update the page's validation logic and metadata after the ajax call ? Any ideas (beside remote client side validation) ? Thanks in advance.

    Read the article

  • FTP client to zip before upload and unzip on the server after upload

    - by Ronaldo Junior
    I am always working with some big websites that is annoying to upload given the number of small files. I use Filezilla but am happy to buy some commercial solution if there is one out there that can zip the files before upload and then unzip it after upload. Its a pain to have to manually do that all the time. If someone know of any ftp client or extension for Filezilla or other that would do that... I sent an email to the support for CuteFTP and WSFtp - no answer so far... I know FTP protocol does not allow this command - thats why Im asking for a extension (if anyone know) or a free or commercial FTP client that do the job...

    Read the article

  • sbs 2001 essentials rdp cert install package

    - by Crash893
    Im using Microsoft SBS 2011 esentials to allow some of my users to remote into there work machines when they try they get and error that says that the rd gateway can not be trusted I looked up the error on google and confirmed that i need to install the ssl cert on the local machine but the instructions given are for sbs 2011 standard (website here ) but the path given is not in sbs essentials so where can i find the " Install Certificate Package.zip " file in essentials?

    Read the article

  • Programmatically assigning an existing ssl cert to a website in iis6 via powershell or vbscript

    - by dagda1
    Hi, I have the following powershell script that creates a new website in IIS6: https://github.com/dagda1/iis6/blob/master/create-site.ps1 Does anyone know how I can assign an existing ssl cert to the website? I know I can set the port number using adsutil.vbs like this: cscript adsutil.vbs set w3svc/xxx/securebindings ":443:somewhere.com" But I am drawing a big blank when it comes to assigning an existing ssl certificate. Thanks Paul

    Read the article

  • Programmatically assigning an existing ssl cert to a website in iis6 via powershell or vbscript

    - by dagda1
    Hi, I have the following powershell script that creates a new website in IIS6: https://github.com/dagda1/iis6/blob/master/create-site.ps1 Does anyone know how I can assign an existing ssl cert to the website? I know I can set the port number using adsutil.vbs like this: cscript adsutil.vbs set w3svc/xxx/securebindings ":443:somewhere.com" But I am drawing a big blank when it comes to assigning an existing ssl certificate. Thanks Paul

    Read the article

  • MVC3/Razor Client Validation Not firing

    - by Jason Gerstorff
    I am trying to get client validation working in MVC3 using data annotations. I have looked at similar posts including this MVC3 Client side validation not working for the answer. I'm using an EF data model. I created a partial class like this for my validations. [MetadataType(typeof(Post_Validation))] public partial class Post { } public class Post_Validation { [Required(ErrorMessage = "Title is required")] [StringLength(5, ErrorMessage = "Title may not be longer than 5 characters")] public string Title { get; set; } [Required(ErrorMessage = "Text is required")] [DataType(DataType.MultilineText)] public string Text { get; set; } [Required(ErrorMessage = "Publish Date is required")] [DataType(DataType.DateTime)] public DateTime PublishDate { get; set; } } My cshtml page includes the following. <h2>Create</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @using (Html.BeginForm()) { @Html.ValidationSummary(true) Post <div class="editor-label"> @Html.LabelFor(model => model.Title) </div> <div class="editor-field"> @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) </div> <div class="editor-label"> @Html.LabelFor(model => model.Text) </div> <div class="editor-field"> @Html.EditorFor(model => model.Text) @Html.ValidationMessageFor(model => model.Text) Web Config: <appSettings> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> Layout: <head> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script> So, the Multiline Text annotation works and creates a text area. But none of the validations work client side. I don't know what i might be missing. Any ideas?? i can post more information if needed. Thanks!

    Read the article

  • Solutions for redundant server and client code?

    - by Fragsworth
    In our system, the code which exists on the client side (in Flash and Javascript) mirrors the code that exists on the server side (e.g. in Python or PHP), normally with respect to the models, the methods available for those models, and the unit tests written for them. This becomes a problem in systems where you want to minimize data transfer (e.g. multiplayer games). I do not want to write the same code and unit tests redundantly for both the client and server, but I don't know of any standard solutions to deal with this. Basically, I want a language/compiler which can produce models and methods for three main languages: Actionscript, Javascript, and any server language. Does something like this exist?

    Read the article

  • How to use Amazons' X.509 key and X.509 cert

    - by April
    How do I use Amazons' X.509 key and X.509 cert? I have downloaded these two files but don't know how to use them. Using rightscale (https://my.rightscale.com/aws_credentials/), do I copy and paste the content of these two files? When I do, the rightscale app says not valid. What am I doing wrong? How do I use these?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >