Search Results

Search found 998 results on 40 pages for 'hemant kumar'.

Page 5/40 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • 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

  • 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

  • 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

  • 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

  • asp.net multiligual website culture settings

    - by Hemant Kothiyal
    Hi, In asp.net multilingual website in english Uk and swedish, i have three rsources file 1. en-GB.resx 2. sv-SE.resx 3. Culture neutral file. I have create one base class and all pages is inherited from that class. There i write following lines to set UICULTURE and culture 1. Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture.Name; 2. Thread.CurrentThread.CurrentCulture = CultureInfo.CurrentCulture.Name; Question: Suppose my browser language is Swedish(sv-SE) then this code will run because it find CurrentUICulture and CurrentCulture values as sv-SE. Now if suppose browser language is Swedish(sv) only, in that case values will be set as CurrentUICulture = sv; and CurrentCulture = sv-SE Now the problem is that user can able to view all text in Culture neutral resource file that i kept as english while all decimal saperators, currency and other will be appear in swedish. It looks confusing to usr. What would be right approach. I am thinking following solution. Please correct me? 1. i can create extra resource file for sv also. 2. I check value of CurrentUICulture in base class and if it is sv then replace it with sv-SE Please correct me which one is right approach or Is there any other good way of doing?

    Read the article

  • Global.asax Event: Application_OnPostAuthenticateRequest

    - by Hemant Kothiyal
    Hi, I am using Application_OnPostAuthenticateRequest event in global.asax to get roles and permissions of authenticated user also i have made my custom principal class to get user detail and roles and permission. To get some information which remain same for that user. following are the code void Application_OnPostAuthenticateRequest(object sender, EventArgs e) { // Get a reference to the current User IPrincipal objIPrincipal = HttpContext.Current.User; // If we are dealing with an authenticated forms authentication request if ((objIPrincipal.Identity.IsAuthenticated) && (objIPrincipal.Identity.AuthenticationType == "Forms")) { CustomPrincipal objCustomPrincipal = new CustomPrincipal(); objCustomPrincipal = objCustomPrincipal.GetCustomPrincipalObject(objIPrincipal.Identity.Name); HttpContext.Current.User = objCustomPrincipal; CustomIdentity ci = (CustomIdentity)objCustomPrincipal.Identity; HttpContext.Current.Cache["CountryID"] = FatchMasterInfo.GetCountryID(ci.CultureId); HttpContext.Current.Cache["WeatherLocationID"] = FatchMasterInfo.GetWeatherLocationId(ci.UserId); Thread.CurrentPrincipal = objCustomPrincipal; } } My question is as following This event fires every time for every request. Hence for each request the code execute? My approach is right or not? Is it right to add HttpContext.Current.Cache in this event or we should move it on session start

    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

  • How can i Put java Scripts at the Bottom

    - by Hemant Kothiyal
    Hi, In my asp.net page, i am refring external javascript file. As per my learning in web, it's recommended that always put inline java script at the bottom of page. There is no information i get about external javascript refrence I want to know that if i am refing external javascript file then where should i write? Inside top of the page bottom after closing tag of

    Read the article

  • Roles for "Hhtpcontext.user" in Asp.net Formauthentication

    - by Hemant Kothiyal
    In asp.net global.asax, where should i write code to assign role in httpcontext.user? What i have read in site is that it should be part of "Application_onPostauthentication" event of global.asax but i am not getting that if i write there then it is execute for each request of user. I think this should fetch one for one authentication at session. I don't know even why microsoft also suggest to write code there? Please if anybody know the fact make me clear?

    Read the article

  • How Session out trigger on browser close?

    - by Hemant Kothiyal
    Hi, Yesterday morning i open gmail account in Internet Exlorer second tab. I checked my mail and closed that tab (not browser). Then at the time of evining i again open second tab of browser and enetr gmail.com, it automatically redirect me at my email account without asking login. I shocked and i thought i should remain browser open for whole night and today open gmail in second tab , it behave similar means without login screen it redirect in my gmail account. Then i closed that tab and open another browser session and enter gmail i again surprised that i redirect me login page. At the same time i open second tab of first browser and it automatically redirect me at mail account page. What i councluded by this behaviour is that might be gmail server keep my browser id at their server so that whenever i eneter gmail.com on second tab of first browser, it automatically redirect me at gmail account. I don't know i am right or not? Please clear me this concept? What happens with my session at gmail server when i closed my browser tab? As per my opinion it should automatically logout me but why this doesn't happened?

    Read the article

  • How can i Put java Scripts at the Bottom of asp.net page?

    - by Hemant Kothiyal
    Hi, In my asp.net page, i am refring external javascript file. As per my learning in web, it's recommended that always put inline java script at the bottom of page. There is no information i get about external javascript refrence I want to know that if i am refing external javascript file then where should i write? Inside top of the page bottom after closing tag of

    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

  • 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

  • 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

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >