Search Results

Search found 55 results on 3 pages for 'hemant kothiyal'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • How to fix basicHttpBinding in WCF when using multiple proxy clients?

    - by Hemant
    [Question seems a little long but please have patience. It has sample source to explain the problem.] Consider following code which is essentially a WCF host: [ServiceContract (Namespace = "http://www.mightycalc.com")] interface ICalculator { [OperationContract] int Add (int aNum1, int aNum2); } [ServiceBehavior (InstanceContextMode = InstanceContextMode.PerCall)] class Calculator: ICalculator { public int Add (int aNum1, int aNum2) { Thread.Sleep (2000); //Simulate a lengthy operation return aNum1 + aNum2; } } class Program { static void Main (string[] args) { try { using (var serviceHost = new ServiceHost (typeof (Calculator))) { var httpBinding = new BasicHttpBinding (BasicHttpSecurityMode.None); serviceHost.AddServiceEndpoint (typeof (ICalculator), httpBinding, "http://172.16.9.191:2221/calc"); serviceHost.Open (); Console.WriteLine ("Service is running. ENJOY!!!"); Console.WriteLine ("Type 'stop' and hit enter to stop the service."); Console.ReadLine (); if (serviceHost.State == CommunicationState.Opened) serviceHost.Close (); } } catch (Exception e) { Console.WriteLine (e); Console.ReadLine (); } } } Also the WCF client program is: class Program { static int COUNT = 0; static Timer timer = null; static void Main (string[] args) { var threads = new Thread[10]; for (int i = 0; i < threads.Length; i++) { threads[i] = new Thread (Calculate); threads[i].Start (null); } timer = new Timer (o => Console.WriteLine ("Count: {0}", COUNT), null, 1000, 1000); Console.ReadLine (); timer.Dispose (); } static void Calculate (object state) { var c = new CalculatorClient ("BasicHttpBinding_ICalculator"); c.Open (); while (true) { try { var sum = c.Add (2, 3); Interlocked.Increment (ref COUNT); } catch (Exception ex) { Console.WriteLine ("Error on thread {0}: {1}", Thread.CurrentThread.Name, ex.GetType ()); break; } } c.Close (); } } Basically, I am creating 10 proxy clients and then repeatedly calling Add service method on separate threads. Now if I run both applications and observe opened TCP connections using netstat, I find that: If both client and server are running on same machine, number of tcp connections are equal to number of proxy objects. It means all requests are being served in parallel. Which is good. If I run server on a separate machine, I observed that maximum 2 TCP connections are opened regardless of the number of proxy objects I create. Only 2 requests run in parallel. It hurts the processing speed badly. If I switch to net.tcp binding, everything works fine (a separate TCP connection for each proxy object even if they are running on different machines). I am very confused and unable to make the basicHttpBinding use more TCP connections. I know it is a long question, but please help!

    Read the article

  • How to configure maximum number of channels in WCF?

    - by Hemant
    Consider following code which calls a calculator service: static void Main (string[] args) { for (int i = 0; i < 32; i++) { ThreadPool.QueueUserWorkItem (o => { var client = new CalcServiceClient (); client.Open (); while (true) { var sum = client.Add (2, 3); } }); } Console.ReadLine (); } If I use TCP binding then maximum 32 connections are opened but if I use HTTP binding, only 2 TCP connections are opened. How can I configure the maximum number of connections that can be opened using HTTP binding?

    Read the article

  • problem with linked libraries or classes??

    - by hemant
    i recently finished one project..now when i create a new navigation project in xcode and try to run it in simulator the application crashes and error in debugger window shows that i am missing some classes which i had used in my previous project(not in this one) and in some cases it gives Couldn't register com.yourcompany.GuessGame with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger. is this some problem related to linked libraries??

    Read the article

  • How to configure maximum number of transport channels in WCF using basicHttpBinding?

    - by Hemant
    Consider following code which is essentially a WCF host: [ServiceContract (Namespace = "http://www.mightycalc.com")] interface ICalculator { [OperationContract] int Add (int aNum1, int aNum2); } [ServiceBehavior (InstanceContextMode = InstanceContextMode.PerCall)] class Calculator: ICalculator { public int Add (int aNum1, int aNum2) { Thread.Sleep (2000); //Simulate a lengthy operation return aNum1 + aNum2; } } class Program { static void Main (string[] args) { try { using (var serviceHost = new ServiceHost (typeof (Calculator))) { var httpBinding = new BasicHttpBinding (BasicHttpSecurityMode.None); serviceHost.AddServiceEndpoint (typeof (ICalculator), httpBinding, "http://172.16.9.191:2221/calc"); serviceHost.Open (); Console.WriteLine ("Service is running. ENJOY!!!"); Console.WriteLine ("Type 'stop' and hit enter to stop the service."); Console.ReadLine (); if (serviceHost.State == CommunicationState.Opened) serviceHost.Close (); } } catch (Exception e) { Console.WriteLine (e); Console.ReadLine (); } } } Also the WCF client program is: class Program { static int COUNT = 0; static Timer timer = null; static void Main (string[] args) { var threads = new Thread[10]; for (int i = 0; i < threads.Length; i++) { threads[i] = new Thread (Calculate); threads[i].Start (null); } timer = new Timer (o => Console.WriteLine ("Count: {0}", COUNT), null, 1000, 1000); Console.ReadLine (); timer.Dispose (); } static void Calculate (object state) { var c = new CalculatorClient ("BasicHttpBinding_ICalculator"); c.Open (); while (true) { try { var sum = c.Add (2, 3); Interlocked.Increment (ref COUNT); } catch (Exception ex) { Console.WriteLine ("Error on thread {0}: {1}", Thread.CurrentThread.Name, ex.GetType ()); break; } } c.Close (); } } Basically, I am creating 10 proxy clients and then repeatedly calling Add service method. Now if I run both applications and observe opened TCP connections using netstat, I find that: If both client and server are running on same machine, number of tcp connections are equal to number of proxy objects. It means all requests are being served in parallel. Which is good. If I run server on a separate machine, I observed that maximum 2 TCP connections are opened regardless of the number of proxy objects I create. Only 2 requests run in parallel. It hurts the processing speed badly. If I switch to net.tcp binding, everything works fine (a separate TCP connection for each proxy object even if they are running on different machines). I am very confused and unable to make the basicHttpBinding use more TCP connections. I know it is a long question, but please help!

    Read the article

  • developing sms application in iPhone??

    - by hemant
    Hello, i am new to iPhone programming and i was thinking of developing an sms application through which user can send and receive sms inside my application similar to iPhone own message application.i think apple doesn't provide any API regarding accessing sms inbox?? is there any other way around it??

    Read the article

  • creating a new distribution profile for a application after deleting it from iphone??

    - by hemant
    i created a distribution profile of my application,installed and tested it on my iphone and uploaded the binary to app store...due to some usual reasons apple rejected it and asked me to make a few changes...meanwhile i deleted the application from my iphone...now when i reinstall it says valid provisioning profile is not present so will i have to repeat the whole process of making a distribution profile and then upload it to the store...provisional profile cannot change so should i create the new distribution profile with the same one and delete the old distribution profile i made??

    Read the article

  • testing In-app purchases iphone??

    - by hemant
    while testing my application i bought a product it had on my phone through the test account...now i deleted the application and reinstalled it but in my application it still shows that the product is already bought...when we buy through in-app purchase does the product i bought or its id gets stored on iphone filesystem?? i am just testing the application so i dont know much about what could be wrong in it??

    Read the article

  • uploading a i-phone application to apple store??

    - by hemant
    i have been trying to uplaod an application to apple store for 2 days now..first they said the provisioning profile was not right due to which i had to make a new one and upload it again now after that problem was solved while uploading the new binary it said the version was same with the previous minor version(1.0 - which someone else uploaded in my company)..then i changed the version to 1.1 by changing it in target info properties..then i cleaned all targets quite the xcode,restarted the xcode and build the project again..it succeeded and now wen i uploaded it it still says the same error version same with the previous minor version is there any other way of changing the version number though in my info.plist file it is showing version:1.1??

    Read the article

  • What is SocketOptionName.ReuseAddress used for?

    - by Hemant
    I used to think that using SocketOptionName.ReuseAddress, I can reuse a port that is in TIME_WAIT state. But I tried to experiment with it and it seems it has no effect. If I check sockets using netstat, and it shows the socket is in TIME_WAIT state and I immediately run the client again, I get the exception: Only one usage of each socket address (protocol/network address/port) is normally permitted 172.16.16.16:12345 I cannot make anything out of it. Please can you elaborate what SocketOptionName.ReuseAddress is good for?

    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

  • which touch event to use to slide an image??

    - by hemant
    i am using the following function to move a ball from one location to another wherever user touches the screen..right now i dont have an i-phone to test my application and i am new to i-phone application programming so i wanted to know does this event will also make the ball slide from one point to another wen user maintains the touch?? -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch=[[event allTouches] anyObject]; CGPoint location=[touch locationInView:touch.view]; fball.center=location; }

    Read the article

  • Software marketplace

    - by Hemant
    I have currently working on a desktop application which I intend to make available for purchase. Are there any free or cost effective services/websites which I can use to sell my software and collect payment?

    Read the article

  • change launch image(default.png)??

    - by hemant
    i am quite new to iphone development but i have been given a old application and told to change the launch image(default.png)..i tried to google it but couldn't get much help from it?? how can i change the default image in my old application?? any information regarding it will be really helpful??

    Read the article

  • passing uiimageview as a parameter in NStimer selector??

    - by hemant
    i created a function onTimer passing it a uiimageview parameter...but when i call this function in a NStimer call as shown below i get a syntax error?? is there any other way around it?? [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(onTimer:image) userInfo:nil repeats:YES];

    Read the article

  • Can I use WCF on Visual Studio 2005?

    - by Hemant
    I am about to start a project which consumes third party web services. Because of a legacy system, I am told that I can only use Visual Studio 2005/.NET 2.0. (Though I would have preferred Visual Studio 2008 on .NET 3.5) My understanding is that WCF was released with .NET 3.0. So is there any possibility to use WCF on Visual Studio 2005 by using just the WCF assemblies of .NET 3.0? I will then try to convince them that it is just like using external framework which doesn't disturb anything.

    Read the article

  • coding on back button of navigation based application??

    - by hemant
    In one view during a function call i am assigning 1 to a flag...when i navigate back to previous view i want the the flag value to be retained to that view...how cAn i do coding on the button that appears on the screen to navigate back to the previous screen might be able to do it or is there any better solution???

    Read the article

  • how to get a particular day of week in objective c??

    - by hemant
    using gregorian calender i am able to get the number of day of the week i.e 1 for sunday and 2 for monday etc but i am not able to find a function that displays the name of week then the number?? can anyone help?? here is my code to get the number of day NSDate *dates = [gregorian dateFromComponents:component]; NSDateComponents *weekdayComponents =[gregorian components:(NSDayCalendarUnit | NSWeekdayCalendarUnit) fromDate:dates]; NSUInteger *weekdays = [weekdayComponents weekday]; NSString *dayw=[NSString stringWithFormat:@"%1i",weekdays]; NSLog(@"%@",dayw);

    Read the article

  • using a test account for in app purchases??

    - by hemant
    i created in app purchases in my application.But still my test account doesn’t work fine. When i test my application using test account the sandbox environment asks me to buy the product and after buying it asks me to buy the product again straightaway. Is it some problem while using test accounts or is there a problem in my coding?? this is my first application and figuring out in app purchases for your application can be really hard at times. i have 4 products and this happens only with 1 or 2 products and rest work fine. So i am sure the in app purchases is fine but cant figure out what could be wrong??

    Read the article

  • using a button to navigate to different view in navigation based application??

    - by hemant
    i created a navigation based project but instead of tableview i added a new view with a button to navigate to the other view.. my button code is as shown below but whenever i run it the application doesn't run?? is the code wrong or navigation based application only work with tableview?? -(IBAction)clickMe:(id)sender chdDetails *details=[[chdDetails dalloc]initWithNibName:@"chdDetails" bundle:nil]; [self.navigationController pushViewController:details animated:YES]; [details release]; details=nil;

    Read the article

  • testing an in app purchase??

    - by hemant
    i developed a application with in app purchases..when user buys the subscription it gets stored on my server..after testing it few times i deleted the data from server to test it again but when i buy it the sandbox environment says u you already purchased this.TAP OK to download it again for free also i have used this test account on my previous application?? does it means i will have to create a new test account for this application?? also by mistake i used this account on apple store..i read somewhere that doing this will make your test account invalid...is it true?? should i create a new account for it??

    Read the article

  • What does open source license (like GNU-GPL) mean?

    - by Hemant
    I am looking forward to use an open source product which has GNU-GPL like license and it says that if I use that product, I must share the source code of my application. I am slightly confused about it. I understand that Linux is available under GNU-GPL license as well. Does it mean ALL linux application are and has to be open source? Does it mean I can ask for the source code of complete Oracle DB from Oracle Corp (at least the part that runs on Linux)?

    Read the article

< Previous Page | 1 2 3  | Next Page >