w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows service using WCF or .Net Remoting service
If I understand your question properly, what you are looking for is a cache server such as Redis or Memcached. There are a number of .NET clients available for these and other such technologies. For Redis, I suggest you check out the ServiceStack Redis client.

Categories : C#

Is Changing local IP address similar to changing Public address?
Given that the host uses the IP to identify you: The host you are connecting to sees the public address, and this is what then needs to be renewed. You can try it yourself; grab another device on the same network as the one you used first, and try to connect. You'll find that you still have to wait. The local IP-address can only identify you within the local network. The reason is that there's a limited number of IPv4 adresses, so only your router get's a public IP-address, and then your devices get's a local IP from the router. The router then works to send the packages directed at the public address to the correct local IP.

Categories : Networking

how to test x amounts of clients connecting to a php api
For parameterized tests I usually turn to Apache JMeter. It takes a bit of time to set it up, but it will give you great flexibility for stress-testing any kind of service. Refering to your specific needs, you can set up any number of users feed API keys to your requests from an external file define idle times between requests for users via timers randomize timers to have a more lifelike load on your service extract variables from responses via regular expressions use extracted variables in subsequent requests set it up for distributed testing with coordinated requests from several clients All in all, it's a pretty awesome tool.

Categories : PHP

How to add OSGI service references in contexts property of httpserver (Spring remoting)?
You can, instead of using util:map, define a factory or a bean that wires in IRemoteServiceProvider and outputs a Map. class MyMapFactory { List<IRemoteServiceProvider> providers; public Map buildMap() { //build Map of urls to http handlers here. // if the map wraps the list directory it can possibly even be dynamic! Depending on // whether SimpleHttpServerFactoryBean clones the map or uses it directly. } } <bean class="MyMapFactory" id="myMapFactory"/> <bean id="httpServer" class="org.springframework.remoting.support.SimpleHttpServerFactoryBean"> <property name="contexts"> <bean factory-bean="myMapFactory" factory-method="buildMap" class="java.util.Map"/> </property> <property name="port" value="8081" /> </bean&g

Categories : Java

WCF Service - how to protect so only my clients can use it?
If you are using Form Authentication then you can leverage the ASP.NET to check for FormAuthentication Cookie by enabling AspNetCompatibilityRequirementsMode to Required Or if your service is stand alone i.e is consumed by everyone then you can use oauth authentication you can read more about it Oauth Authentication What you could do is there would be a consumer secret key which would be shared to all authenticated clients. The caller would sign some info using this key and server would also sign it using the same key and then compare it. Hope it helps

Categories : C#

WCF Service Base Address vs endpoint address
baseAddress is just that, the base address for your endpoints (unless specified explicitly). So every <endpoint> will inherit from <baseAddress> (which is why they are usually "" and "mex"). e.g. <baseAddresses> <add baseAddress="http://127.0.0.1:1337/" /> </baseaddresses> ... <endpoint address="" contract="MyService.IMyContract" ... /> <endpoint address="mex" contract="IMetadataExchange" ... /> You now have two endpoints: http://127.0.0.1:1337/ - service endpoint http://127.0.0.1:1337/mex - metadata endpoint By exempting the <baseAddress> you're requiring the <endpoints> to both be fully qualified (including the mex (which is not)). e.g. <baseAddresses></baseaddresses> ... <endpoint address="net.tcp://127.0.0.1

Categories : C#

C++ Pointer: changing the contents without changing the address?
The pointer IS the object, so if you do new Object() you create a new one, but the functions with the prevoius pointer will not see it. If you want to change the content, you can do this, because all other objects which know the pointer will reference the values that your object contains. It's a bit similar to a global variable. So you can pass around the pointer and all functions will see your changes as soon as they acces the object.

Categories : C++

Connecting Clients machine to MySQL Server machine
You can use other tool with good looking GUI. For example: HeidiSQL. Then, you need to enable remote access. If you use windows, there is nice wizard for you to enable remote access with a few clicks. The wizard is located it at MySQL Server 5.5inMySQLInstanceConfig.exe. Then Reconfigure Instance -> Next -> Standard Configuration -> Next -> Next. You will see this screen. Tick on "Enable root access from remote machines". Or you can manually configure it to allow remote access from my.ini file. See this link for how to do it. If having done above still does not allow you to connect to your MySQL. Please make sure that Firewall does not block MySQL port.

Categories : Mysql

A service that makes tcp connections to multiple clients
There are several existing components out there that you could use to achieve what you want. Checkout http://www.networkcomms.net and http://code.google.com/p/lidgren-network-gen3/. Having said that people always prefer to add that there is nothing stopping you writing everything from scratch yourself as per the example you give. Disclaimer: I'm a developer for NetworkComms.Net.

Categories : C#

Changing Range Breaks Sub
For Each rng In Sheets("360").Range("B2:CJ2" & Lastrow) Remove the 2 following CJ like this : For Each rng In Sheets("360").Range("B2:CJ" & Lastrow) Lastrow already designates the last row number so if Lastrow value is 300 and you write "CJ2" & Lastrow, your actual range is now B2:CJ2300 which means you're now running 2000 more rows.

Categories : Excel

Best authentication/security strategy for WCF service with multiple clients
The best strategy for you is going to depend on your security requirements. In other words, there is not a best strategy that applies to all solutions. I would suggest taking a look at the WCF Security Guide. It will get you up to speed on the basics of security in WCF. It also has sections for common Intranet and Internet scenarios with prescriptive guidance for each. Based on the little bit of information you've provided here, I think you will find one of these scenarios aligns to your needs. The guide is old, but still very relevant. Later, you may want to look at the benefits of moving to a claims-based security model. This is a huge topic so I'll just point you to this guide for future reference.

Categories : C#

Would lots of idle clients cause a "service too busy" exception?
Just found this http://weblogs.asp.net/pglavich/archive/2007/05/07/wcf-client-channel-pool-improved-client-performance.aspx which looks like exactly what I need.

Categories : C#

Changing css property from js breaks css animation
This has to do with the specificity of your CSS rules. Rules set on the element (by setting the style property, for instance) will have higher specificity than those you declare in a CSS file/style block (unless you use !important). The better approach would be to use classes to set the background property and to change those on the element instead of setting the style directly: buttons[i].className = "myClass"; This StackOverflow answer has a great description of how to set CSS classes in javascript. You can read more details about CSS specificity in this article.

Categories : Javascript

Adding parameter to Restful service POST without breaking clients
Have u considered versioning? E.g. server/ver2/foo I think your only other option would be to implement the new functionality, such that it is not required, e.g. foo (MyType myType) { if (myType.newField exists) { // do new stuff } } One final note, i would recommend combining both approaches, which will ensure that foo is backwards compatible.

Categories : C#

WCF : Making methods in DataContract object accessible to web service clients
The DataMemberAttribute attribute is ignored if it is applied to static members. Member accessibility levels (internal, private, protected, or public) do not affect the data contract in any way. Data Contract supports only state, not behaviour. So your methods do not affect on your data contract. The behaviour of data contacts is described in the following MSDN link: http://msdn.microsoft.com/en-us/library/ms733127.aspx

Categories : C#

Retrieve Outlook logged-in user SMTP address after connecting through OLE
I found it. I have to go through the Accounts object in the namespace: for i := 1 to lNameSpace.Accounts.Count do if lNameSpace.Accounts.Item[i].AccountType = olExchange then begin lAccount := lNameSpace.Accounts.Item[i]; Break; end; if VarIsClear(lAccount) then begin DisConnectFromOutlook; Exit; end; lLoginSMTP := lAccount.SmtpAddress; The only thing I would still like is to determine the default account.

Categories : Delphi

Changing metatable in Lua breaks colon operator
From Lua 5.2 Refernce Manual:String Manipulation The string library provides all its functions inside the table string. It also sets a metatable for strings where the __index field points to the string table. Therefore, you can use the string functions in object-oriented style. For instance, string.byte(s,i) can be written as s:byte(i). So, the object oriented style like str:len() comes from the default metamethod __index, which you have modified.

Categories : Lua

Qt C++: Connecting value changing in two spinboxes
I think, the best solution here would be to block signals from spinboxes, before changing their values in slots: I usually use the helper class like this: class SignalsBlocker { public: SignalsBlocker(QObject* ptr): _ptr(ptr) { _b = ptr->blockSignals(true); } ~SignalsBlocker() { _ptr->blockSignals(_b); } private: QObject* _ptr; bool _b; }; So you can write void MainWindow::on_sbHeight_valueChanged(int arg1) { SignalsBlocker block(ui->sbWidth); if (arg1 != 0) { if (ui->radioRatio1->isChecked()) { ui->sbWidth->setValue((arg1/8)*2); //..... } void MainWindow::on_sbWidth_valueChanged(int arg1) { SignalsBlocker block(ui->sbHeight); if (arg1 != 0) { if (ui->radioRatio1->is

Categories : C++

Windows 8.1 breaks my ASP.NET / IIS : "Service unavailable"
It looks like a simple uninstall and re-install of the rewrite module will do the trick. It doesn't look like the Microsoft Web Platform Installer is able to uninstall it so just go to Programs and Features to uninstall it. You'll find it listed as IIS URL Rewrite Module 2 and just click the Uninstall button on top. Then reinstall it from here: http://www.iis.net/downloads/microsoft/url-rewrite Make sure your App Pool is started - or just restart IIS and it should all work again.

Categories : Misc

Changing binding of WCF service hosted in Web role in azure cloud service
You're probably using basicHttpBinding now - that's what WCF defaults to for HTTP. The reason you don't see a reference to your service in web.config is because of the simplified configuration that was introduced in .NET Framework 4.0. You can still explicitly configure the service in web.config like you had to in earlier versions if you want, but it's not necessary. To do what you're asking, here's what you need to do: Change the protocolMapping to use webHttpBinding instead of basicHttpBinding. Add a webHttp endpoint behavior and set the DefaultOutgoingResponseFormat to "Json". Change your .svc markup file to include the Factory attribute and specify the WebServiceHostFactory. For example: Factory="System.ServiceModel.Activation.WebServiceHostFactory" Finally, add the [WebGet

Categories : Wcf

Connecting Nav Web Service in php
I am dealing with the exact same problem, but have not found a solution because they all come back to this same script. Your problem is that you are getting no result back because of a 401 error code (could not authenticate), which is exactly I where I am stuck as well. The script ends up using CURL to connect, but somehow that fails.

Categories : PHP

Connecting to web-service without metadata
What you should do is download the WSDL file on to your machine and use the svcutil.exe tool to generate code directly from the WSDL. See This Question for an example of how this is done. I believe what you are doing is called WSDL-First development. A more detailed link on that is here.

Categories : C#

How can I guarantee that I am connecting to my service and not someone else?
Unfortunately there is no way to stop Tom from getting the password. Ultimately if Tom knows what he's doing, he can get the password in one way or another. Some possibilities include performing a memory dump while the key is in memory, and reverse engineering the binary to save it out somewhere as you mentioned. The "correct" way to do this is to have Tom send the file to either the admin or the Main Service, and have the service return the unencrypted contents. The bottom line is that if you send Tom the key, no matter what you do to your client you can't stop Tom from recovering the key if he is sufficiently savvy with RE techniques.

Categories : Wcf

Telerik radgrid paging in webshop, breaks when changing product amount on last page
The guys at Telerik helped me, the problem was that I was going through all items and not just the one where the amount changed. Updated tbQuantity_TextChanged protected void tbQuantity_TextChanged(object sender, EventArgs e) { if (!_readMode) { RadNumericTextBox tbQuantity = (RadNumericTextBox)sender; GridDataItem dataItem = (GridDataItem)tbQuantity.NamingContainer; var shopItemID = (int)dataItem.GetDataKeyValue("ID"); var shopItem = _sessionHelper.CurrentCart.CartItems.Find(x => x.ID == shopItemID); if (!shopItem.IsExternal) { _sessionHelper.CurrentCart.CartItems.Find(x => x.ID == shopItemID).Quantity = Convert.ToInt32(tbQuantity.Text); _sessionHelper.Curr

Categories : C#

Null Notifications When Connecting To a Web Service
You're never filling your public static field Values in the first place, so Values.get("name") will return null, and thus toString() is called on a null variable. You attempt to create different variables named Values (or values) in your code, but you never assign anything (other than an empty new object) to the Values field, nor do you directly call any setter methods on the Values field.

Categories : Java

Getting an error connecting web service using SOAPUI
Try disabling the proxy in SOAP-UI, which indicated in the attached screen shot. Or Give a valid proxy connection under Proxy settings in SOAP UI Global preference. By disabling the proxy preference SOAP UI may work in offline. Hope it might solve your issue. Thanks, Madhan

Categories : Web Services

connecting android to .net web service database
You have to implement KvmSerializable.You can see ksoap2-android,CodingTipsAndTricks for more details. that is a very good tutorial.

Categories : Android

Selenium Webdriver: INFO: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
This question solves this problem It's the info-level message. Don't worry about it.

Categories : Java

Multicasting big packet contain all info to multiple clients vs individual packets to targeted clients
One of the major advantages of multicast is scalability so in the future if you tend to have more devices multicast will help. Better to look at multicast vs unicast performance for guidance M. Ebrahimi, M. Daneshtalab, P. Liljeberg, and H. Tenhunen. Performance evaluation of unicast and multicast communication in three-dimensional mesh architectures. In Computer Architecture and Digital Systems (CADS), 2010 15th CSI International Symposium on, pages 161-162, sept. 2010.

Categories : C++

Connecting to a Web Service using Client Certificate authentication
It appears that the server did not understand TLS. I had to specify SSLv3, via System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3;

Categories : C#

Problems connecting with Dbpedia Lookup web service
I talked to the author of the code and he corrected some minor bugs. Here is the code: Here is the link to the corrected code: https://github.com/mark-watson/java_practical_semantic_web/blob/master/src/com/knowledgebooks/info_spiders/DBpediaLookupClient.java Thats a really good example of the use of the Dbpedia Lookup Service with Jena. It works perfectly!

Categories : Java

Connecting to WCF service in Windows Phone 8 (C#) by using domain credentials
I don't have any phone development experience. Where is what I do at a C# Service Level. Uri uri = new Uri("http://whatever.com"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); NetworkCredential networkCredentials = new NetworkCredential(); networkCredentials.Domain = "Domain"; networkCredentials.UserName = "User"; networkCredentials.Password = "Pass"; CredentialCache cc = new CredentialCache(); cc.Add(uri, "Basic", networkCredentials); //NTLM can be used here, but Basic usually works. request.Credentials = cc; request.Method = WebRequestMethods.Http.Get; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { ... }

Categories : C#

Web Service Generated Code: Control serialized XML without unnecessary spaces and line breaks?
This is the answer I gave: The emitted XML looks fine as well as the code. Because your class files for the messages are auto-generated, serialization is taken care of automatically. You could re-work the code to do this part manually, but that would add un-needed complexity to the code. Some options: Serialize manually. There are options to turn off certain formatting when you call serialization directly. I don’t recommend this approach as other developers will wonder why this is being done. Turn on HTTP compression. http://en.wikipedia.org/wiki/HTTP_compression Whitespace doesn’t matter when the messages are compressed. I would recommend this anyway since your messages are 40-70 Meg (rather large). Use JSON JSON has a much smaller size payload as compared to the same X

Categories : C#

Character pointer's address changing
I believe this is undefined behavior. The map array is declared as const, but you write into it in the load_map() function, that's just wrong. Why is it const, when you obviously expect and intend to change it by loading data into it?

Categories : C

Mod Rewrite code with out changing the url in address bar
1. Without mod_rewrite solution: Just place this code on top of your .htaccess or in Apache config: DirectoryIndex index.html index.php 2. mod_rewrite solution: Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteRule ^(abx/xyz)/?$ $1/index.php [L,NC]

Categories : Regex

htaccess redirect url without changing address bar
You should enable mod_proxy. Then allow access with: <proxy http://www.test.bigcartel.com> Allow from all </proxy> And setup the redirection: ProxyPass / http://www.test.bigcartel.com For more options see the docs for mod_proxy.

Categories : Apache

Changing the address of a local variable
The only way that it would be possible is if you actually did the xor swap on the values of the point. In your code it seems like you are trying to set the address of a value on the stack which you cannot do. What I recommend is using std::swap. http://en.cppreference.com/w/cpp/algorithm/swap. To use this your object will gave to be moveContructible and moveAssignable. So in short no, exactly what you want to do is not possible because you cannot assign to the address of a variable. But you can achieve a similar effect in multiple ways using the values of point, making pointers or std::swap

Categories : C++

repo1.maven.org ip address keeps on changing
I am sure this question is more for the Maven Central guys, but I wonder if you can really rely on a pool of IPs even if it exists. I am sure that the infrastructure will be very dynamic as it serves the libraries to the whole world! I found this IP range for Maven Central when searching for the same. This may change very quickly without any notice, or could even be already outdated. You could also try a mirror of central which maybe served through a single IP and use it. Again no guarantees that the IP will never change. Alternatively, you could setup a Maven Repository proxy locally and host it in some sort of a DMZ. Your network guys can either allow all machines from DMZ, or this specific machine (using IP) to access everything outgoing HTTP, which will in-turn allow it to access Mav

Categories : Maven

Rewrite URL with .htacess without changing address bar
You don't need the P flag, since this is all on the same server, you don't need to proxy. Your pattern is close but also matches the title and .htm part of the URI. Try something like: RewriteRule ^posts/[^/]+/[^.]+-([0-9]+).html?$ /viewpost.php?id=$1 [L,NC]

Categories : Regex

How can I find out what's changing the return address of a function in c++
The short answer is: The most portable way of determining if a floating-point exceptional condition has occurred is to use the floating-point exception facilities provided by C in fenv.h. although, unfortunately, this is far from being perfect. I suggest you to read both https://www.securecoding.cert.org/confluence/display/seccode/FLP04-C.+Check+floating-point+inputs+for+exceptional+values and https://www.securecoding.cert.org/confluence/display/seccode/FLP03-C.+Detect+and+handle+floating-point+errors which concisely address the exact question you are posing: Is there a method for checking problems like rounding errors automatically.

Categories : C++



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.