Search Results

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

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

  • 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

  • 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

  • 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

  • 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

  • How can i show correct last login date time in website?

    - by Hemant Kothiyal
    Hi All, I have created a asp.net website, that we are going to deploy at India. All client of this website would be from SWEDEN. This site have option (last login date time) at user's dashboard after successfull login. Now my problem is that if application is deploy at India and user loggedin from SWEDEN then user is able to show only server date time which is of India. My Steps are as following 1. User logged into site first time at 10 AM(server time), surfing starts... 2. Logged out at 10:30 (server time) 3. Application store server datetime in database. 4. Next time user come, application will store same date and time from database as last loggin datetime. How can i store SWEDEN date time in database when user logged out from site, it will in future grow to other country also. Please help?

    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

  • add different characters to a NSString one by one??

    - by hemant
    i am retrieving different characters from a string by using thsi function and adding 5 to them to display the corresponding character for eg. 'a' displays 'f' and 'h' displays 'm'.. but the problem is that i am not able to add these characters into a string which i can use to display to display like 'fm'...can anyone help?? heres the code strResult(mutablestring) is getting null only. `str=@"John"; int a=[str length]; for(i=0;i char ch=[str characterAtIndex:i]; ch=ch+5; temp=[NSString stringWithFormat:@"%c",ch]; [strResult appendString:temp]; NSLog(@"%c",ch); }`

    Read the article

  • MVC design for archived data view

    - by Hemant Tank
    Implementation of a standard archive process in ASP.Net MVC. Backend SQL Server 2005 We've an existing web app built in MVC. We've an Entity "Claim" and it has some child entities like ClaimDetails, Files, etc... A pretty standard setup in DB. Each entity has its own table and are linked via FK. Now, we need to have an "Archive" feature in web app which will allow admin to archive a Claim and its child entities. An archived Claim shud become readonly when visited again. Here're some points on which I need your valued opinion - To keep it simple and scalable (for a few million records) for now we plan to simply add a bit field "Archived" to the Claim table in db. And change the behavior accordingly in the web app. We've a 'Manage claim' page which renders a bunch of diff views for Claim and its child entities. Now, for a readonly view we can either use the same views or have a separate set of views. What do you suggest? At controller level, we can identify archived claim and select which view to render. At model level, though it'd be great to be able to use the same model used for Manage Claim - but it might not get us the "text" of some lookup fields. For example, Claim.BrandId is rendered as a dropdown in Manage claim (requires only BrandId) but for readonly view we need 'BrandText'. Any existing ref or architecture level example would be great. Here's my prev SO post but its more about db level changes: Design a process to archive data (SQL Server 2005) Thank you.

    Read the article

< Previous Page | 1 2 3  | Next Page >