Search Results

Search found 583 results on 24 pages for 'expired'.

Page 20/24 | < Previous Page | 16 17 18 19 20 21 22 23 24  | Next Page >

  • How do I add a URL parameter to redirected login page using JSF 2.0

    - by Big Al
    I have a question about session timeouts and JSF 2. I have my exception handler working exactly the way everyone prefers but I need to pass a value to the login page. For example, I have a typical login URL - www.acme.com/?companyId=company14 which in turn presents company14 with their own custom login page (using their logo). After they enter the application and do a bit of work, they read an email or 2. The session times out and a session timeout page is shown instructing the user to click Ok to proceed to the login page. How do I add ?companyId=company14 to the URL? I can hardcode it in the exception handler by using this: requestMap.put("companyId", "company14"); and then referring to it on the viewExpired.xhtml page: <h:panelGrid id="expiredGrid" columns="1"> <f:facet name="header"> <h:outputText id="outExpireMsg" value="Your session has expired"/> </f:facet> <h:outputText id="outReqMessage" value="Reloading the page will require login."/> <h:outputText value=""/> <h:button id="okButton" type="submit" value="Ok" outcome="login?companyId=#{companyId}"/> </h:panelGrid> The issue is I can't seem to save the companyId anywhere without it getting wiped out by the session timeout. I'd like to set the companyId in the exceptionhandler using this value. Any ideas?

    Read the article

  • Visual Studio 2008: Can't connect to known good TFS 2010 beta 2

    - by p.campbell
    A freshly installed TFS 2010 Beta 2 is at http://serverX:8080/tfs. A Windows 7 developer machine with VS 2008 Pro SP1 and the VS2008 Team Explorer (no SP). The TFS 2008 Service Pack 1 didn't work for me - "None of the products that are addressed by this software update are installed on this computer." The developer machine is able to browse the TFS site at the above URL. The Issue is around trying to add the TFS server into the Team Explorer window in Visual Studio 2008. Here's a screenshot showing the error: unable to connect to this Team Foundation Server. Possible reasons for failure include: The Team Foundation Server name, port number or protocol is incorrect. The Team Foundation Server is offline. Password is expired or incorrect. The TFS server is up and running properly. Firewall ports are open, and is accessible via the browser on the dev machine!! larger image Question: how can you connect from VS 2008 Pro to a TFS 2010 Beta 2 server? Resolution Here's how I solved this problem: installed VS 2008 Team Explorer as above. re-install VS 2008 Service Pack 1 when adding a TFS server to Team Explorer, you MUST specify the URL as such: http://[tfsserver]:[port]/[vdir]/[projectCollection] in my case above, it was http://serverX:8080/tfs/AppDev-TestProject you cannot simply add the TFS server name and have VS look for all Project Collections on the server. TFS 2010 has a new URL (by default) and VS 2008 doesn't recognize how to gather that list.

    Read the article

  • iPhone developer cert not associating with Provisioning Profiles

    - by baudot
    I'm seeing the dreaded "Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain" error. Strange, as it used to work. Not sure what changed. A few of the symptoms I've noticed beyond this: In the project info, for Code Signing Identity, instead of saying "iPhone Developer: My Name Here", it only says "iPhone Developer", followed by a list of grayed out Provisioning Profiles with the error message "profile doesn't match any valid certificate/private key pair in the keychain." In the organizer, if I click the "Developer Profile" sidebar entry, it shows one entry in the "Identities" pane, "iPhone Distribution: My Name Here". However, no profiles show in the Provisioning Profiles pane. In the organizer, if I click the "Provisioning Profiles" sidebar entry, for each of the profiles there it reports "A valid signing identity matching this profile could not be found in your keychain." I've tried a handful of the usual folk cures for this ailment, without success so far, such as: Cleared my old keypairs and expired developer identity cert out of the keychain. Deleted my old developer profile, created a new one, and regenerated the provisioning profile after. Reconfirmed: The App ID on the provisioning portal for this app is a pure wildcard ID. (The "Bundle Identifier" in the info.plist is just the appname, no reversed domain prefix.) Restored my iPhone. Overstalled the latest version of Xcode.

    Read the article

  • Android app after update: crashes on Motorola Cliq with weird stacktrace

    - by sandis
    So after updating my app on the market I am getting reports from motorola cliq-users that my app crashes on start. The stacktrace is below, and is not very helpful since it does not go trough my app! Unfortunately I have no access to a motorola cliq-phone by myself, and I have changed too many things in this update to know what is causing the trouble. Have anyone of you guys run into the same problem? I would very much appreciate help with this problem! 05-26 11:44:06.521 I/PacketReader( 116): Got the features element 05-26 11:44:06.941 W/WindowManager( 86): No window to dispatch pointer action 0 05-26 11:44:07.381 W/WindowManager( 86): No window to dispatch pointer action 1 05-26 11:44:07.691 W/ActivityManager( 86): Launch timeout has expired, giving up wake lock! 05-26 11:44:07.931 W/ActivityManager( 86): Activity idle timeout for HistoryRecord{43714db8 {my.package/my.package.Main}} 05-26 11:44:08.531 E/AndroidRuntime( 565): Uncaught handler: thread main exiting due to uncaught exception 05-26 11:44:08.541 E/AndroidRuntime( 565): java.lang.RuntimeException: Unable to start activity ComponentInfo{my.packageC/my.package.Main}: java.lang.NullPointerException 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.access$2000(ActivityThread.java:115) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1721) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.os.Handler.dispatchMessage(Handler.java:99) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.os.Looper.loop(Looper.java:123) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.main(ActivityThread.java:3977) 05-26 11:44:08.541 E/AndroidRuntime( 565): at java.lang.reflect.Method.invokeNative(Native Method) 05-26 11:44:08.541 E/AndroidRuntime( 565): at java.lang.reflect.Method.invoke(Method.java:521) 05-26 11:44:08.541 E/AndroidRuntime( 565): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) 05-26 11:44:08.541 E/AndroidRuntime( 565): at com.android.internal.os.ZygoteI

    Read the article

  • SQL Server 2000 intermittent connection exceptions on production server - specific environment probl

    - by StickyMcGinty
    We've been having intermittent problems causing users to be forcibly logged out of out application. Our set-up is ASP.Net/C# web application on Windows Server 2003 Standard Edition with SQL Server 2000 on the back end. We've recently performed a major product upgrade on our client's VMWare server (we have a guest instance dedicated to us) and whereas we had none of these issues with the previous release the added complexity that the new upgrade brings to the product has caused a lot of issues. We are also running SQL Server 2000 (build 8.00.2039, or SP4) and the IIS/ASP.NET (.Net v2.0.50727) application on the same box and connecting to each other via a TCP/IP connection. Primarily, the exceptions being thrown are: System.IndexOutOfRangeException: Cannot find table 0. System.ArgumentException: Column 'password' does not belong to table Table. [This exception occurs in the log in script, even though there is clearly a password column available] System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first. [This one is occurring very regularly] System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable. System.ApplicationException: ExecuteReader requires an open and available Connection. The connection's current state is connecting. System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. And just today, for the first time: System.Web.UI.ViewStateException: Invalid viewstate. We have load tested the app using the same number of concurrent users as the production server and cannot reproduce these errors. They are very intermittent and occur even when there are only 8/9/10 user connections. My gut is telling me its ASP.NET - SQL Server 2000 connection issues.. We've pretty much ruled out code-level Data Access Layer errors at this stage (we've a development team of 15 experienced developers working on this) so we think its a specific production server environment issue.

    Read the article

  • How to cache pages using background jobs ?

    - by Alexandre
    Definitions: resource = collection of database records, regeneration = processing these records and outputting the corresponding html Current flow: Receive client request Check for resource in cache If not in cache or cache expired, regenerate Return result The problem is that the regeneration step can tie up a single server process for 10-15 seconds. If a couple of users request the same resource, that could result in a couple of processes regenerating the exact same resource simultaneously, each taking up 10-15 seconds. Wouldn't it be preferrable to have the frontend signal some background process saying "Hey, regenerate this resource for me". But then what would it display to the user? "Rebuilding" is not acceptable. All resources would have to be in cache ahead of time. This could be a problem as the database would almost be duplicated on the filesystem (too big to fit in memory). Is there a way to avoid this? Not ideal, but it seems like the only way out. But then there's one more problem. How to keep the same two processes from requesting the regeneration of a resource at the same time? The background process could be regenerating the resource when a frontend asks for the regeneration of the same resource. I'm using PHP and the Zend Framework just in case someone wants to offer a platform-specific solution. Not that it matters though - I think this problem applies to any language/framework. Thanks!

    Read the article

  • Refreshing Facebook session from an iframe application

    - by zombat
    I've got a Facebook iframe application that is completely external. By this I mean that once a user accesses the canvas URL to load the application, all the links in the iframe app go to my servers, and the canvas page never gets refreshed unless the user navigates to somewhere else on Facebook and comes back (or does a browser refresh). On the initial load of the app where Facebook creates the iframe, I get passed all the usual parameters like fb_sig_user which allows me to create an internal app session based on the facebook user. This app session (which is not the Facebook session, it's my own app session) is all I need to allow the user to work with the app. The problem comes an hour later. If the user leaves the computer, or uses the app for more than an hour, the Facebook session expires. There are some app pages which require fetching friend information, and once the FB session has expired, these pages break, throwing out errors such as "Error: Session key invalid or no longer valid". My question is whether there is a way to refresh the user's Facebook session from within an iframe application to keep it from expiring an hour later. Do any of the API calls do this? Is there a Facebook Connect trick to ping something? Is there any definitive method to keep it alive? I haven't been able to find any examples that specifically address this.

    Read the article

  • .NET proxy detection

    - by Ziplin
    I am having an issue with .NET detecting the proxy settings configured through internet explorer. I'm writing a client application that supports proxies, and to test I set up an array of 9 squid servers to support various authentication methods for HTTP and HTTPs. I have a script that updates IE to whichever configuration I choose (which proxy, detection via "Auto", PAC, or hardcode). I have tried the 3 methods below to detect the IE configuration through .NET. On occassion I notice that .NET picks up the wrong set of proxy servers. IE has the correct settings, and if I browse the web with IE, I can see I am hitting the correct servers via wireshark. WebRequest.GetSystemWebProxy().GetProxy(destination); GlobalProxySelection.Select.GetProxy(destination); WebRequest.DefaultWebProxy Here are the following tips I have: My script sets a PAC file on a webserver, and updates the configuration in IE, then clears IE's cache .NET seems to get "stuck" on a certain proxy configuration, and I have to set another configuration for .NET to realize there was a change. Occasionally it seems to pick some random set of servers (I'm sure they're not random, just a set of servers I used once and are in some cached PAC file or something). As in, I will check the proxy for the destination "https://www.secure.com" and I may have IE configured for and thus expect to get "http://squidserver:18" and instead it will return "http://squidserver:28" (port 18 runs NTLM, 28 runs without authentication). All the squid servers work. This does not appear to be an issue on XP, only Vista, 2003, and windows 7. Hardcoding the proxy servers in IE ALWAYS works Time always solves the issue - if I leave the computer for about 20 or 30 minutes and come back, .NET picks up the correct proxy settings, as if a cached PAC script expired.

    Read the article

  • .NET Splash screen issues

    - by CODe
    I have a splash screen for my C# database application that is called via the Shown event. The splash screen contains some information that is preprocessed when the main form's constructor is called, hence why I'm using the Shown event, because that information should be available. However, when the splash screen is shown, the main form is whited out, and the menu bar, bottom menu bar, and even the gray background are all white and invisible. It looks like the program is hanging, but after the 5 second delay I have built in, the banner goes away and the program is shown normally. Also, on the banner, I have labels that are not shown when the splash screen displays... Here is my code, some reasoning behind why it isn't working would help greatly. SPLASH SCREEN CODE : public partial class StartupBanner : Form { public StartupBanner(int missingNum, int expiredNum) { InitializeComponent(); missingLabel.Text = missingNum.ToString() + " MISSING POLICIES"; expiredLabel.Text = expiredNum.ToString() + " EXPIRED POLICIES"; } } CALLING CODE : private void MainForm_Shown(object sender, EventArgs e) { StartupBanner startup = new StartupBanner(missingPoliciesNum, expiredPoliciesNum); startup.MdiParent = this; startup.Show(); Thread.Sleep(5000); startup.Close(); } Using startup.ShowDialog() shows the correct label information on the splash screen, but that locks up the application, and I need the splash to go away after about 5 seconds, which is why it's a splash. ;)

    Read the article

  • how to intercept processing when Session.IsNewSession is true

    - by Cen
    I have a small 4-page application for my customers to work through. They fill out information. If they let it sit too long, and the Session timeout out, I want to pop up a javascript alert that their session has expired, and that they need to start over. At that point, then redirected to the beginning page of the application. I'm getting some strange behavior. I'm stepping through code, forcing my Sessioni.IsNewSession to be true. At this point, I write out a call to Javascript to a Literal Control placed at the bottom of the . The javascript is called, and the redirection occurs. However, what is happening is.. I am pressing a button which is more or less a "Next Page" button and triggering this code. The next page is being displayed, and then the Alert and redirection occurs. The result I was expecting was to stay on the same page I received the "Timeout", with the alert to pop-up over it, then redirection. I'm checking for Session.IsNewSession in a BaseClass for these pages, overriding the OnInit event. Any ideas why I am getting this behavior? Thanks!

    Read the article

  • Looking for all-in-one drm/installer/CD creation kit.

    - by user30997
    The company I work for has a download manager in place that handles distribution, DRM, installation of our products - when a user gets them off our website. However, we're using an clunky system for packaging and protecting our products when we do press releases or make retail CDs. Part of the antiquation problem is the fact that the automated system that works with the installer- and DRM-creation software we have is a disaster that needs to be put out of my misery. The list of products that we currently produce, that I would like a new system MUST be capable of producing: Retail CDs, with a certain level of obfuscation to make copying difficult. Downloadable installers that time out after a few hours of use of the product. After the time has expired, removing and reinstalling the product will leave you still blocked from use. Installers that will fail to work after a certain date. I'd love to be able to just feed a tool the directory where a complete product resides and have the installer generated with a couple command-line operations. (The command-line issue is non-negotiable this well be called by an automated tool.) A single-solution package would be far preferable. Software with royalty-based or per-unit based licensing is not an option.

    Read the article

  • Rails' page caching vs. HTTP reverse proxy caches

    - by John Topley
    I've been catching up with the Scaling Rails screencasts. In episode 11 which covers advanced HTTP caching (using reverse proxy caches such as Varnish and Squid etc.), they recommend only considering using a reverse proxy cache once you've already exhausted the possibilities of page, action and fragment caching within your Rails application (as well as memcached etc. but that's not relevant to this question). What I can't quite understand is how using an HTTP reverse proxy cache can provide a performance boost for an application that already uses page caching. To simplify matters, let's assume that I'm talking about a single host here. This is my understanding of how both techniques work (maybe I'm wrong): With page caching the Rails process is hit initially and then generates a static HTML file that is served directly by the Web server for subsequent requests, for as long as the cache for that request is valid. If the cache has expired then Rails is hit again and the static file is regenerated with the updated content ready for the next request With an HTTP reverse proxy cache the Rails process is hit when the proxy needs to determine whether the content is stale or not. This is done using various HTTP headers such as ETag, Last-Modified etc. If the content is fresh then Rails responds to the proxy with an HTTP 304 Not Modified and the proxy serves its cached content to the browser, or even better, responds with its own HTTP 304. If the content is stale then Rails serves the updated content to the proxy which caches it and then serves it to the browser If my understanding is correct, then doesn't page caching result in less hits to the Rails process? There isn't all that back and forth to determine if the content is stale, meaning better performance than reverse proxy caching. Why might you use both techniques in conjunction?

    Read the article

  • ASP.NET, C#: timeout when trying to Transaction.Commit() to database; potential deadlock?

    - by user1843921
    I have a web page that has coding structured somewhat as follows: SqlConnection conX =new SqlConnection(blablabla); conX.Open(); SqlTransaction tran=conX.BeginTransaction(); try{ SqlCommand cmdInsert =new SqlCommand("INSERT INTO Table1(ColX,ColY) VALUES @x,@y",conX); cmdInsert.Transaction=tran; cmdInsert.ExecuteNonQuery(); SqlCommand cmdSelect=new SqlCOmmand("SELECT * FROM Table1",conX); cmdSelect.Transaction=tran; SqlDataReader dtr=cmdSelect.ExecuteReader(); //read stuff from dtr dtr.Close(); cmdInsert=new SqlCommand("UPDATE Table2 set ColA=@a",conX); cmdInsert.Transaction=tran; cmdInsert.ExecuteNonQuery(); //display MiscMessage tran.Commit(); //display SuccessMessage } catch(Exception x) { tran.Rollback(); //display x.Message } finally { conX.Close(); } So, everything seems to work until MiscMessage. Then, after a while (maybe 15-ish seconds?) x.Message pops up, saying that: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." So something wrong with my trans.Commit()? The database is not updated so I assume the trans.Rollback works... I have read that deadlocks can cause timeouts...is this problem cause by my SELECT statement selecting from Table1, which is being used by the first INSERT statement? If so, what should I do? If that ain't the problem, what is?

    Read the article

  • Any danger in calling flash messages html_safe?

    - by PreciousBodilyFluids
    I want a flash message that looks something like: "That confirmation link is invalid or expired. Click here to have a new one generated." Where "click here" is of course a link to another action in the app where a new confirmation link can be generated. Two drawbacks: One, since link_to isn't defined in the controller where the flash message is being set, I have to put the link html in myself. No big deal, but kind of messy. Number two: In order for the link to actually display properly on the page I have to html_safe the flash display function in the view, so now it looks like (using Haml): - flash.each do |name, message| = content_tag :div, message.html_safe This gives me pause. Everything else I html_safe has been HTML I've written myself in helpers and whatnot, but the contents of the flash hash are stored in a cookie client-side, and could conceivably be changed. I've thought through it, and I don't see how this could result in an XSS attack, but XSS isn't something I have a great understanding of anyway. So, two questions: 1. Is there any danger in always html_safe-ing all flash contents like this? 2. The fact that this solution is so messy (breaking MVC by using HTML in the controller, always html_safe-ing all flash contents) make me think I'm going about this wrong. Is there a more elegant, Rails-ish way to do this? I'm using Rails 3.0.0.beta3.

    Read the article

  • Efficiently Serving Dynamic Content in Google App Engine

    - by awegawef
    My app on google app engine returns content items (just text) and comments on them. It works like this (pseudo-ish code): query: get keys of latest content #query to datastore for each item in content if item_dict in memcache: use item_dict else: build_item_dict(item) #by fetching from datastore store item_dict in memcache send all item_dicts to template Sorry if the code isn't understandable. I get all of the content dictionaries and send them to the template, which uses them to create the webpage. My problem is that if the memcache has expired, for each item I want to display, I have to (1) lookup item in memcache, (2) since no memcache exists I must fetch item from the datastore, and (3) store the item in memcache. These calls build up quickly. I don't set an expire time for the entries to the memcache, so this really only happens once in the morning, but the webpage takes long enough to load (~1 sec) that the browser reports it as not existing. Regularly, my webpages take about 50ms to load. This approach works decently for frequent visits, but it has its flaws as shown above. How can I remedy this? The entries are dynamic enough that I don't think it would be in my best interest to cache my initial request. Thanks in advance

    Read the article

  • apache web server configuration problem

    - by mohit
    i want to have apache server to serve only /var/www/ directory now it serves all my files on system from directory "/" i tried to edit httpd.conf placed in /etc/apache2 and placed the folllowing content in it(intially it was empty) <Directory /> Options None AllowOverride None </Directory> DocumentRoot "/var/www" <Directory "/var/www"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> then saved it,restarted apache server put the location /var/www in the web browser address bar,still it shows the higher level directories too then i edited the file Default,Default-ssl in the sites-available folder repeated the same process still apache serves all files on my system 2.when i try to use the following command gedit httpd.conf I get the error gedit:2696): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)

    Read the article

  • PHP/WordPress Session CountDown

    - by Cameron
    I have the following code to show how long a user has left before their session will expire, I am using WordPress. How can I do this? Thanks <script> var obj_Span; var n_Seconds = 0; var n_Minutes = 0; var n_Hours = 0; function F_ConvertNumberToString ( n_Num ) { var str_Num = String(n_Num); if ( str_Num.length < 2 ) str_Num = "0" + str_Num; return str_Num; } function F_CountDown () { if ( n_Hours == 0 && n_Minutes == 0 && n_Seconds == 0 ) { obj_Span.innerHTML = "(Sorry, your session has expired.)"; } else { if ( n_Seconds >= 0 ) n_Seconds --; if ( n_Seconds < 0 ) { n_Minutes --; n_Seconds = 59; } if ( n_Minutes >= 0 ) { window.setTimeout ( "F_CountDown()", 1000 ); } if ( n_Minutes < 0 ) { n_Hours --; n_Minutes = 59; window.setTimeout ( "F_CountDown()", 1000 ); } F_UpdateDisplay (); } } function F_UpdateDisplay ( ) { if ( document.getElementById ) { if (n_Hours > 0 ) obj_Span.innerHTML = "(Remaining " + F_ConvertNumberToString(n_Hours) + ":" + F_ConvertNumberToString(n_Minutes) + ":" + F_ConvertNumberToString(n_Seconds) + ")"; else obj_Span.innerHTML = "(Remaining " + F_ConvertNumberToString(n_Minutes) + ":" + F_ConvertNumberToString(n_Seconds) + ")"; } } function F_StartCountDown ( n_Session ) { obj_Span = document.getElementById ( "CountDown" ); n_Minutes = n_Session; n_Hours = Math.floor(n_Minutes/60); n_Minutes = n_Minutes - (60*n_Hours); F_CountDown (); } </script> <script> F_StartCountDown ( " code here... " ); </script> <span id="CountDown"></span>

    Read the article

  • Ajax request (from .NET) give me unexpected results

    - by ironnailpiercethesky
    I wanted to learn a little more about web and .NET so i decided to write a program to download binaries, webpages and does a little ajax. The first download site i tried was too easy. So i went against uploading.com. It seemed good, no captcha, some ajax use required, you cant guess all the data, it was perfect. After 2hours of messing around i got frustrated. For the life of me i could not get the ajax response to give me what i was expecting. I decided to use tamper data clear my cookies, click on the entry for the ajax request. Copy the Referer, cookies and postdata and came up with this code. It does not work! I am shocked that copying those fields did not work. I even tried setting the user agent (not in code linked) and it still did not work. Why isnt this POST on the ajax request not giving me the correct file? I notice the JsHttpRequest=12719132559480-xml changes based on time so if you want to run the code you should grab a new snapshot with tamperdata (or at least update that url). I dont see any extra headers in tamper data so does anyone know why i might not be getting the response expected? I know disabling cookies or javascript will make the link 'expired' automatically. I dont think javascript will matter because i got the data from tamperdata at the moment of request so what gives? What am i forgetting or what data am i not submitting properly?

    Read the article

  • Test if Java trusts an SSL certificate

    - by Eric R. Rath
    My java web application uses the standard mail libraries to establish an IMAPS connection to a mail server under my control. The mail server used a valid SSL cert issued by a CA. When the cert expired, I renewed it from the same CA, and put the cert into use. But my web application wouldn't trust the new cert. We had never explicitly trusted the old cert, or managed any trust stores. I talked with someone from the CA, and we tracked it down to a difference in the intermediate certs between the old and new cert. The old one used multiple intermediates, including one tied to a root that must've been trusted by default by our version of Java. The new cert used only one intermediate cert, and it was tied to a root missing from our Java version's default trusted cert store. When we renew this cert again in the future, is there an easy way, given a new crt and intermediate crt file, test if Java will consider that cert valid? I didn't see anything in keytool that looked promising. A code solution is okay, but I'd prefer one based on the Java command-line tools.

    Read the article

  • Add leading zeros to this javascript countdown script?

    - by eddjedi
    I am using the following countdown script which works great, but I can't figure out how to add leading zeros to the numbers (eg so it displays 09 instead of 9.) Can anybody help me out please? Here's the current script: function countDown(id, end, cur){ this.container = document.getElementById(id); this.endDate = new Date(end); this.curDate = new Date(cur); var context = this; var formatResults = function(day, hour, minute, second){ var displayString = [ '<div class="stat statBig">',day,'</div>', '<div class="stat statBig">',hour,'</div>', '<div class="stat statBig">',minute,'</div>', '<div class="stat statBig">',second,'</div>' ]; return displayString.join(""); } var update = function(){ context.curDate.setSeconds(context.curDate.getSeconds()+1); var timediff = (context.endDate-context.curDate)/1000; // Check if timer expired: if (timediff<0){ return context.container.innerHTML = formatResults(0,0,0,0); } var oneMinute=60; //minute unit in seconds var oneHour=60*60; //hour unit in seconds var oneDay=60*60*24; //day unit in seconds var dayfield=Math.floor(timediff/oneDay); var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour); var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute); var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute)); context.container.innerHTML = formatResults(dayfield, hourfield, minutefield, secondfield); // Call recursively setTimeout(update, 1000); }; // Call the recursive loop update(); }

    Read the article

  • Protecting my apps security from deassembling

    - by sandis
    So I recently tested deassembling one of my android apps, and to my horror I discovered that the code was quite readable. Even worse, all my variable names where intact! I thought that those would be compressed to something unreadable at compile time. The app is triggered to expire after a certain time. However, now it was trivial for me to find my function named checkIfExpired() and find the variable "expired". Is there any good way of making it harder for a potential hacker messing with my app? Before someone states the obvious: Yes, it is security through obscurity. But obviously this is my only option since the user always will have access to all my code. This is the same for all apps. The details of my deactivation-thingy is unimportant, the point is that I dont want deassembler to understand some of the things I do. side questions: Why are the variable names not compressed? Could it be the case that my program would run faster if I stopped using really long variable names, as are my habit?

    Read the article

  • TortoiseSVN Error: "OPTIONS of 'https://...' could not connect to server (...)"

    - by Zack Peterson
    I'm trying to setup a new computer to synchronize with my SVN repository that's hosted with cvsdude.com. I get this error: Here's what I did (these have worked in the past): Downloaded and installed TortoiseSVN Created a new folder C:\aspwebsite Right-clicked, chose SVN Checkout... Entered the following information, clicked OK: URL of repository: https://<reponame>-svn.cvsdude.com/aspwebsite Checkout directory: C:\aspwebsite Checkout depth: Fully recursive Omit externals: Unchecked Revision: HEAD revision Got TortoiseSVN error: OPTIONS of 'https://<reponame>-svn.cvsdude.com/aspwebsite': could not connect to server (https://<reponame>-svn.cvsdude.com) Rather than getting the error, TortoiseSVN should have asked for my username and password and then downloaded about 90MB. Why can't I checkout from my Subversion repository? Kent Fredric wrote: Either their security certificate has expired, or their hosting is broken/down. Contact CVSDude and ask them whats up. It could also be a timeout, because for me their site is exhaustively slow.. It errors after only a couple seconds. I don't think it's a timeout. Matt wrote: Try visiting https://[redacted]-svn.cvsdude.com/aspwebsite and see what happens. If you can visit it in your browser, you ought to be able to get the files in your SVN client and we can work from there. If it fails, then there's your answer. I can access the site in a web browser.

    Read the article

  • Commenting out portions of code in Scala

    - by akauppi
    I am looking for a C(++) #if 0 -like way of being able to comment out whole pieces of Scala source code, for keeping around experimental or expired code for a while. I tried out a couple of alternatives and would like to hear what you use, and if you have come up with something better? // Simply block-marking N lines by '//' is one way... // <tags> """ anything My editor makes this easy, but it's not really The Thing. It gets easily mixed with actual one-line comments. Then I figured there's native XML support, so: <!-- ... did not work --> Wrapping in XML works, unless you have <tags> within the block: class none { val a= <ignore> ... cannot have //<tags> <here> (not even in end-of-line comments!) </ignore> } The same for multi-line strings seems kind of best, but there's an awful lot of boilerplate (not fashionable in Scala) to please the compiler (less if you're doing this within a class or an object): object none { val ignore= """ This seems like ... <truly> <anything goes> but three "'s of course """ } The 'right' way to do this might be: /*** /* ... works but not properly syntax highlighed in SubEthaEdit (or StackOverflow) */ ***/ ..but that matches the /* and */ only, not i.e. /*** to ***/. This means the comments within the block need to be balanced. And - the current Scala syntax highlighting mode for SubEthaEdit fails miserably on this. As a comparison, Lua has --[==[ matching ]==] and so forth. I think I'm spoilt? So - is there some useful trick I'm overseeing?

    Read the article

  • SQL Server race condition issue with range lock

    - by Freek
    I'm implementing a queue in SQL Server (please no discussions about this) and am running into a race condition issue. The T-SQL of interest is the following: set transaction isolation level serializable begin tran declare @RecordId int declare @CurrentTS datetime2 set @CurrentTS=CURRENT_TIMESTAMP select top 1 @RecordId=Id from QueuedImportJobs with (updlock) where Status=@Status and (LeaseTimeout is null or @CurrentTS>LeaseTimeout) order by Id asc if @@ROWCOUNT> 0 begin update QueuedImportJobs set LeaseTimeout = DATEADD(mi,5,@CurrentTS), LeaseTicket=newid() where Id=@RecordId select * from QueuedImportJobs where Id = @RecordId end commit tran RecordId is the PK and there is also an index on Status,LeaseTimeout. What I'm basically doing is select a record of which the lease happens to be expired, while simultaneously updating the lease time with 5 minutes and setting a new lease ticket. So the problem is that I'm getting deadlocks when I run this code in parallel using a couple of threads. I've debugged it up to the point where I found out that the update statement sometimes gets executing twice for the same record. Now, I was under the impression that the with (updlock) should prevent this (it also happens with xlock btw, not with tablockx). So it actually look like there is a RangeS-U and a RangeX-X lock on the same range of records, which ought to be impossible. So what am I missing? I'm thinking it might have something to do with the top 1 clause or that SQL Server does not know that where Id=@RecordId is actually in the locked range? Deadlock graph: Table schema (simplified):

    Read the article

  • Connecting to database suddenly started throwing exception for my website

    - by Nirvan
    I have an MVC3 application hosted by third party hosting provider. The site has been running well for the past 3 months without any problems. Today suddenly the Application started throwing following Exception as recorded in my logs part of which is shown below. System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. --- System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The message is self explanatory and I first thought I should increase the connect timeout, but then the exception was still thrown suggesting the other part (Server Not Responding). I contacted my hosting provider and he said there was nothing wrong on his part. So I am stuck with a down website and don't know what to do. Any ideas why the provider is throwing the exception listed above. Also, is it possible for me to remotely connect to the database on the hosting server with limited authority. Any tools for that ? I don't have an exposure in database subject, except for application programming. regards, Nirvan

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24  | Next Page >