Daily Archives

Articles indexed Wednesday June 27 2012

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

  • Safely dereferencing FirstOrDefault call in Linq c#

    - by samy
    For brevity's sake in my code, i'd like to be able to do the following: having a collection, find the first element matching a lambda expression; if it exists, return the value of a property or function. If it doesn't exist, return null. var stuff = {"I", "am", "many", "strings", "obviously"}; var UpperValueOfAString = stuff.FirstOrDefault(s => s.contains("bvi")).ToUpper(); // would return "OBVIOUSLY" var UpperValueOfAStringWannabe = stuff.FirstOrDefault(s => s.contains("unknown token")).ToUpper(); // would return null Is it possible with some linq-syntax-fu or do i have to check explicitly for the return value before proceeding?

    Read the article

  • HTTP status 405 - HTTP method POST is not supported by this URL

    - by Wont Say
    I am getting this "HTTP method POST is not supported by this URL" error when I run my project. The funny thing is, it was running perfectly fine two days ago. After I made a few changes to my code but then restored my original code and its giving me this error. Could you please help me? Here is my index.html: <form method="post" action="login.do"> <div> <table> <tr><td>Username: </td><td><input type="text" name="e_name"/> </td> </tr> <tr><td> Password: </td><td><input type="password" name="e_pass"/> </td> </tr> <tr><td></td><td><input type="submit" name ="e_submit" value="Submit"/> Here is my Login servlet: public class Login extends HttpServlet { /** * Processes requests for both HTTP * <code>GET</code> and * <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { /* * TODO output your page here. You may use following sample code. */ int status; String submit = request.getParameter("e_submit"); String submit2 = request.getParameter("a_submit"); out.println("Here1"); String e_name = request.getParameter("e_name"); String e_password = request.getParameter("e_pass"); String a_name = request.getParameter("a_name"); String a_password = request.getParameter("a_pass"); out.println(e_name+e_password+a_name+a_password); Author author = new Author(a_name,a_password); Editor editor = new Editor(e_name,e_password); // If it is an AUTHOR login: if(submit==null){ status = author.login(author); out.println("Author Login"); //Incorrect login details if(status==0) { out.println("Incorrect"); RequestDispatcher view = request.getRequestDispatcher("index_F.html"); view.forward(request, response); } //Correct login details --- AUTHOR else { out.println("Correct login details"); HttpSession session = request.getSession(); session.setAttribute(a_name, "a_name"); RequestDispatcher view = request.getRequestDispatcher("index_S.jsp"); view.forward(request, response); } } //If it is an EDITOR login else if (submit2==null){ status = editor.login(editor); //Incorrect login details if(status==0) { RequestDispatcher view = request.getRequestDispatcher("index_F.html"); view.forward(request, response); } //Correct login details --- EDITOR else { out.println("correct"); HttpSession session = request.getSession(); session.setAttribute(e_name, "e_name"); session.setAttribute(e_password, "e_pass"); RequestDispatcher view = request.getRequestDispatcher("index_S_1.html"); view.forward(request, response); } } out.println("</body>"); out.println("</html>"); } finally { out.close(); } } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPost(req, resp); } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doGet(req, resp); }} And my web.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet> <servlet-name>Login</servlet-name> <servlet-class>controller.Login</servlet-class> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Login</servlet-name> <url-pattern>/login.do</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> I use Glassfish v3 server - let me know anything else you need to know

    Read the article

  • PHP Echo current filename without extension

    - by Christian Nikkanen
    I'm working on a very simple homemade CMS that simply uses a rich text editor and database to save the website contents and displays them to visitors. Heres the save.php that saves it: <?php include 'mysqlconnection.php'; mysql_query("UPDATE Content SET Content='$_POST[edit]' WHERE PageName='$_POST[PageName]'"); mysql_close($con); ?> <?php header('Location:http://xxx.com/Kayttoliittyma'); ?> It just saves it to the database. The pagename part is the part where I need to echo the filename without the extension. It would echo to the forms hidden field. But how?

    Read the article

  • ScrollTo and toggle div

    - by user1466260
    I'm a big fan ov 8020.com and my goal is to create a porfolio with the same functionality like the one they have. Here is my markup This section should be hidden <section id="work-container"> <div id="work-list-51" class="work-details"> <h1> <div class="close-project"> </div> <div id="work-list-52" class="work-details"> <h1> <div class="close-project"> </div> <div id="work-list-53" class="work-details"> <h1> <div class="close-project"> </div> </section> This section will hold the thumbnails. When you click a thumbnail you will scroll to the top and the div will slidetoggle. <ul id="work-list"> <li id="work-list-51"><a data-page="51" href="#work-list-51"> <img width="230" height="230" alt="Mariann Rosa" src="sites/default/files/styles/square_thumbnail/public/field/image/mariann.jpg"> </a></li> <li id="work-list-52"><a data-page="52" href="#work-list-52"> <img width="230" height="230" alt="Mariann Rosa" src="sites/default/files/styles/square_thumbnail/public/field/image/mariann.jpg"> </a></li> <li id="work-list-53"><a data-page="53" href="#work-list-53"> <img width="230" height="230" alt="Mariann Rosa" src="sites/default/files/styles/square_thumbnail/public/field/image/mariann.jpg"> </a></li> </ul> I have come this far: $(document).ready(function(){ $("#work-list a").click(function(event){ event.preventDefault(); $('html, body').animate ( {scrollTop: $('#top').offset().top}, 800 ); }); $('#work-list a').click(function(e) { $('#work-container > div').hide(); $(this.hash).slideToggle(1600); }); }); It scrolls to top and the div becomes visible but it does not work correctly :)

    Read the article

  • PL/SQL REGEXP_LIKE testing string for allowed characters

    - by Arino
    I need to verify that the provided string has only allowed characters using Oracle regular expressions (REGEXP_LIKE). Allowed chars are: abcdefghijklmnopqrstuvwxyz0123456789_-. Trying to execute SELECT CASE WHEN REGEXP_LIKE('abcdefghijklmnopqrstuvwxyz0123456789_-.' , '^[a-z0-9_\-\.]+$') THEN 'true' ELSE 'false' END tmp FROM dual; results in 'false'. Any ideas on this?

    Read the article

  • Asynchronous javascript issue

    - by amit
    I am trying to create a function which takes values from various html elements of the page to create a string and pass on to a variable. now this works great for all browsers except IE 8 and 9. IE tends to skip the part of fetching the values and goes straight to the variable and finds nothing.. is there a way to sync it all so that it works in IE? function seturl() { var qstring = returnQString(); $('span.keyword').text($.trim($('#hdnKeyWord').attr('value'))); $('input.search_box').attr('value', $.trim($('#hdnKeyWord').attr('value'))); $('#hdnSearchKeyword').attr('value', $.trim($('#hdnKeyWord').attr('value'))); $(".search_box").val($.trim($("#hdn_span_hdnKeyWord").text())); $(".header_inner input[type='text']").focus(); $(".search_term input[type='text']").focus(); $('#locationurl').attr('value', qstring); } function returnQString(){ var qstring = $.trim($('#locationurl').attr('init')); //initial value of the url qstring += "?type=" + $('#hdnSTSearch').attr('value'); // type of handler hit qstring += "&keyword=" + encodeURIComponent($('#hdnKeyWord').attr('value')); // keyword addition qstring += "&pagestart=" + $('#current_page').attr('value'); // pagestart(current page) addition qstring += "&pagesize=" + $('#show_per_page').attr('value'); // per page size addition qstring += "&facets=" // facetsearch $.each(selectedFilter.items, function (index, value) { qstring += value.filter + ","; }); qstring += "&selectedSection=" + selectedSection // Section Select return qstring; }

    Read the article

  • Usage of @specialized in traits

    - by paradigmatic
    I have a trait and an implementation looking like: trait Foo[A] { def bar[B >: A: Ordering]: Foo[B] } class FooImpl[A]( val a: A, val values: List[Foo[A]] ) extends Foo[A] { def bar[B >: A] = { /* concrete implementation */} } I would like to use the @specialized annotation on A and B to avoid autoboxing. Do I need to use it in both trait and implementation, only in implementation, or only in trait ?

    Read the article

  • How to pass an associative array as argument to a function in Bash?

    - by niksfirefly
    How do you pass an associative array as an argument to a function? Is this possible in Bash? The code below is not working as expected: function iterateArray { local ADATA="${@}" # associative array for key in "${!ADATA[@]}" do echo "key - ${key}" echo "value: ${ADATA[$key]}" done } Passing associative arrays to a function like normal arrays does not work: iterateArray "$A_DATA" or iterateArray "$A_DATA[@]"

    Read the article

  • Women Techmakers

    Women Techmakers A panel of technical women leaders at Google talk about innovation, product leadership, and getting more women to the table. Susan Wojcicki (SVP, Advertising) Angela Lai (VP, Engineering of Payments) Anna Patterson (Director, Engineering) Gayathri Rajan (Director, Product Management) Megan Smith (VP, New Business Development) as moderator From: GoogleDevelopers Views: 10 3 ratings Time: 00:00 More in Education

    Read the article

  • ASP.NET MVC 3 SERIES

    - by carlone
      Estimados Lectores,   Luego de un tiempo ausente en mi blog, re-tomamos el rumbo… en esta oportunidad quiero comunicarles que iniciaré una serie de screencast sobre ASP.NET MVC, en donde me estare enfocando desde los conceptos básicos del patrón, pasaremos por las definiciones y conceptos utilizados dentro del ASP.NET MVC para la Vista, El controlador y el Modelo.   Estos videos tengo pensados que sean cápsulas no mayores a los 10 minutos para que sean fáciles de entender y visualizar.   Para los que quieran prepararse con tiempo les recomiendo descargar las tools requeridas para esta series-curso:   Descargar los tools de ASP.NET MVC 3 para VS2010: http://www.microsoft.com/en-us/download/details.aspx?id=1491 , seleccionar el archivo “AspNetMVC3ToolsUpdateSetup.exe” (Nota: si tienen el web platform installer también pueden instalar desde esta tool el ASP.NET MVC 3)   Recuerden que pueden utilizar el Web Developer Express 2010 también para el desarrollo:  mi recomendación es que lo hagan por medio del Web Platform Installer:  Install Visual Web Developer Express Free   Bueno esten pendientes de los próximos videos que estaré publicando.   Cualquier comentario o sugerencia es bienvenido!   Saludos   Carlos A. Lone

    Read the article

  • Exception Handling And Other Contentious Political Topics

    - by Justin Jones
    So about three years ago, around the time of my last blog post, I promised a friend I would write this post. Keeping promises is a good thing, and this is my first step towards easing back into regular blogging. I fully expect him to return from Pennsylvania to buy me a beer over this. However, it’s been an… ahem… eventful three years or so, and blogging, unfortunately, got pushed to the back burner on my priority list, along with a few other career minded activities. Now that the personal drama of the past three years is more or less resolved, it’s time to put a few things back on the front burner. What I consider to be proper exception handling practices is relatively well known these days. There are plenty of blog posts out there already on this topic which more or less echo my opinions on this topic. I’ll try to include a few links at the bottom of the post. Several years ago I had an argument with a co-worker who posited that exceptions should be caught at every level and logged. This might seem like sanity on the surface, but the resulting error log looked something like this: Error: System.SomeException Followed by small stack trace. Error: System.SomeException Followed by slightly bigger stack trace. Error: System.SomeException Followed by slightly bigger stack trace. Error: System.SomeException Followed by slightly bigger stack trace. Error: System.SomeException Followed by slightly bigger stack trace. Error: System.SomeException Followed by slightly bigger stack trace. Error: System.SomeException Followed by slightly bigger stack trace. Error: System.SomeException Followed by slightly bigger stack trace.   These were all the same exception. The problem with this approach is that the error log, if you run any kind of analytics on in, becomes skewed depending on how far up the stack trace your exception was thrown. To mitigate this problem, we came up with the concept of the “PreLoggedException”. Basically, we would log the exception at the very top level and subsequently throw the exception back up the stack encapsulated in this pre-logged type, which our logging system knew to ignore. Now the error log looked like this: Error: System.SomeException Followed by small stack trace. Much cleaner, right? Well, there’s still a problem. When your exception happens in production and you go about trying to figure out what happened, you’ve lost more or less all context for where and how this exception was thrown, because all you really know is what method it was thrown in, but really nothing about who was calling the method or why. What gives you this clue is the entire stack trace, which we’re losing here. I believe that was further mitigated by having the logging system pull a system stack trace and add it to the log entry, but what you’re actually getting is the stack for how you got to the logging code. You’re still losing context about the actual error. Not to mention you’re executing a whole slew of catch blocks which are sloooooooowwwww……… In other words, we started with a bad idea and kept band-aiding it until it didn’t suck quite so bad. When I argued for not catching exceptions at every level but rather catching them following a certain set of rules, my co-worker warned me “do yourself a favor, never express that view in any future interviews.” I suppose this is my ultimate dismissal of that advice, but I’m not too worried. My approach for exception handling follows three basic rules: Only catch an exception if 1. You can do something about it. 2. You can add useful information to it. 3. You’re at an application boundary. Here’s what that means: 1. Only catch an exception if you can do something about it. We’ll start with a trivial example of a login system that uses a file. Please, never actually do this in production code, it’s just concocted example. So if our code goes to open a file and the file isn’t there, we get a FileNotFound exception. If the calling code doesn’t know what to do with this, it should bubble up. However, if we know how to create the file from scratch we can create the file and continue on our merry way. When you run into situations like this though, What should really run through your head is “How can I avoid handling an exception at all?” In this case, it’s a trivial matter to simply check for the existence of the file before trying to open it. If we detect that the file isn’t there, we can accomplish the same thing without having to handle in in a catch block. 2. Only catch an exception if you can do something about it. Continuing with the poorly thought out file based login system we contrived in part 1, if the code calls a Login(…) method and the FileNotFound exception is thrown higher up the stack, the code that calls Login must account for a FileNotFound exception. This is kind of counterintuitive because the calling code should not need to know the internals of the Login method, and the data file is an implementation detail. What makes more sense, assuming that we didn’t implement any of the good advice from step 1, is for Login to catch the FileNotFound exception and wrap it in a new exception. For argument’s sake we’ll say LoginSystemFailureException. (Sorry, couldn’t think of anything better at the moment.) This gives us two stack traces, preserving the original stack trace in the inner exception, and also is much more informative to the calling code. 3. Only catch an exception if you’re at an application boundary. At some point we have to catch all the exceptions, even the ones we don’t know what to do with. WinForms, ASP.Net, and most other UI technologies have some kind of built in mechanism for catching unhandled exceptions without fatally terminating the application. It’s still a good idea to somehow gracefully exit the application in this case if possible though, because you can no longer be sure what state your application is in, but nothing annoys a user more than an application just exploding. These unhandled exceptions need to be logged, and this is a good place to catch them. Ideally you never want this option to be exercised, but code as though it will be. When you log these exceptions, give them a “Fatal” status (e.g. Log4Net) and make sure these bugs get handled in your next release. That’s it in a nutshell. If you do it right each exception will only get logged once and with the largest stack trace possible which will make those 2am emergency severity 1 debugging sessions much shorter and less frustrating. Here’s a few people who also have interesting things to say on this topic:  http://blogs.msdn.com/b/ericlippert/archive/2008/09/10/vexing-exceptions.aspx http://www.codeproject.com/Articles/9538/Exception-Handling-Best-Practices-in-NET I know there’s more but I can’t find them at the moment.

    Read the article

  • Which IP should I use for my nameserver

    - by Luke Bream
    Sorry to ask whats probably very obvious question. I have just got a new server that is fantastically cheap but unfortunatly doesnt come with any technical support and Im very out of my depth ! My hosting company has provided the following information... Below you will find your additional IP addresses added to the server 5.9.36.51 Please note that you can use the subnet only for this server. IP: 5.9.225.64 /27 Mask: 255.255.255.224 Broadcast: 5.9.225.95 Useable IP addresses: 5.9.225.65 to 5.9.225.94 It has cPanel with WHM and im going through the setup... I have a number of questions... my domian is purchased from godaddy and I want to use it as the name server. Question 1: Which IP or IP's do I enter into the godaddy interface for ns1.mydomian.com ns2.mydomain.com Question 2: In the WHM nameserver setup what do I enter for... Please enter an IP address for each of your nameservers. ns1.mydomain.com ?????? ns2.mydomain.com ?????? Add "A Entries" for Hostname IP for Entry: ????????? Thanks for aany help you can give Luke

    Read the article

  • HTTP Error: 413 Request Entity Too Large

    - by Torben Gundtofte-Bruun
    What I have: I have an iPhone app that sends HTTP POST requests (XML format) to a web service written in PHP. This is on a hosted virtual private server so I can edit httpd.conf and other files on the server, and restart Apache. The problem: The web service works perfectly as long as the request is not too large, but around 1MB is the limit. After that, the server responds with: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>413 Request Entity Too Large</title> </head><body> <h1>Request Entity Too Large</h1> The requested resource<br />/<br /> does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit. </body></html> The web service writes its own log file, and I can see that small messages are processed fine. Larger messages are not logged at all so I guess that something in Apache rejects them before they even reach the web service? Things I've tried without success: (I've restarted Apache after every change. These steps are incremental.) hosting provider's web-based configuration panel: disable mod_security httpd.conf: LimitXMLRequestBody 0 and LimitRequestBody 0 httpd.conf: LimitXMLRequestBody 100000000 and LimitRequestBody 100000000 httpd.conf: SecRequestBodyLimit 100000000 At this stage, Apache's error.log contains a message: ModSecurity: Request body no files data length is larger than the configured limit (1048576) It looks like my step #4 didn't really take, which is consistent with step #1 but does not explain why mod_security appears to be active after all. What more can I try, to get the web service to receive large messages?

    Read the article

  • Subdomain returns error when restarting Apache

    - by xXx
    I try to install a subdomain on my dedicated server. I made a new DNS rules to point my sub domain to the IP of my serv. After reading this Subdomain on apache i tried to add new rules on Apache : NameVirtualHost *:80 <VirtualHost *:80> ServerName tb.mysite.org DocumentRoot /home/mysite/wwww/tb/ <Directory "/home/mysite/wwww/tb/"> AllowOverride All Allow from all </Directory> </VirtualHost> Then i restart Apache but it returns sudo /etc/init.d/apache2 restart * Restarting web server apache2 Warning: DocumentRoot [/home/mysite/wwww/tb/] does not exist [Wed Jun 27 10:32:58 2012] [warn] NameVirtualHost *:80 has no VirtualHosts ... waiting Warning: DocumentRoot [/home/mysite/wwww/tb/] does not exist [Wed Jun 27 10:32:59 2012] [warn] NameVirtualHost *:80 has no VirtualHosts the tb/ folder is existing, don't why Apache can't find it... And it says that NameVirtualHost:80 has no VirtualHosts...

    Read the article

  • ssh rsa keys expires after 5 years

    - by Kreker
    I'm using an old login with ssh-rsa public/private key and all was good. I noticed that a couple of days ago the authorizazion was avoid with message "server refused our keys". After diggin' I figured out that the couple of keys stop working after exactly 5 years of their creation. So I make a new pair of keys, take the public one, paste inside a file in ~/.ssh of the username that I'm using, converted it with ssh-keygen -if and paste the new file into authorized_keys but the I still get "server refused our key". It's ok to copy and paste the real key without transfer it? What I'm missing? This isn't my first time using a pair of keys and I follow the same procedure as described. I'm in doubt if I'm changing the correct authorized_keys file but I've take a look in /etc/passwd and see where is the home of the login which I'm using.

    Read the article

  • Libvirt/KVM in NAT: can't access from host (and can't forward)

    - by SharkWipf
    I'm trying to set up a port forward to a KVM guest, managed through Libvirt on Debian 6. The VM is running in NAT, through the "default" network. This all runs fine, the VM has full internet connection. However, the host cannot reach the vm internally. Neither ping, nc nor nmap on the NAT network give any signs of the VM. Due to this, the normal iptables forwarding rules don't work either. $ cat /etc/debian_version 6.0.5 $ libvirtd --version libvirtd (libvirt) 0.9.11.3 $ kvm --version QEMU emulator version 1.0 (qemu-kvm-1.0+dfsg-11, Debian), Copyright (c) 2003-2008 Fabrice Bellard ifconfig: eth0 Link encap:Ethernet HWaddr 54:04:a6:f1:6f:10 inet addr:x.x.x.x Bcast:x.x.x.x Mask:255.255.255.x inet6 addr: fe80::5604:a6ff:fef1:6f10/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:118902 errors:0 dropped:0 overruns:0 frame:0 TX packets:142357 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13247173 (12.6 MiB) TX bytes:95163190 (90.7 MiB) Interrupt:28 Base address:0xe000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:230646 errors:0 dropped:0 overruns:0 frame:0 TX packets:230646 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:204577107 (195.0 MiB) TX bytes:204577107 (195.0 MiB) virbr0 Link encap:Ethernet HWaddr fe:54:00:e2:d2:60 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5050 errors:0 dropped:0 overruns:0 frame:0 TX packets:961 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:666759 (651.1 KiB) TX bytes:400701 (391.3 KiB) vnet0 Link encap:Ethernet HWaddr fe:54:00:e2:d2:60 inet6 addr: fe80::fc54:ff:fee2:d260/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5050 errors:0 dropped:0 overruns:0 frame:0 TX packets:125687 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:739803 (722.4 KiB) TX bytes:6886609 (6.5 MiB)

    Read the article

  • SSH not working after installing SVN server on Debian

    - by sLIDe
    Today I had to install SVN server on my Debian server. I used this tutorial (only I didn't do anything to connect to SVN through file://, http:// or https://, only svn:// and svn+ssh://). After I installed SVN server and configured it after that tutorial, I tried to connect to it. I could connect to it using svn:// protocol, but when I tried to connect using svn+ssh:// protocol, my servers SSH stopped responding. Even after I stopped SVN server and restarted SSH server I can't connect to it.

    Read the article

  • Worker processes not starting in IIS 7.5. What should I check?

    - by locster
    I have a Windows 7 machine (Windows version 6.1.7601 SP1 Build 7601) with IIS installed. At some point the installation appears to have become 'corrupted' in some way, as any requests are now met with the message: Service Unavailable HTTP Error 503. The service is unavailable. In IIS manager IIS is started and the app pool I am using reports itself as 'Started', yet there is no w3wp.exe process listed in the process list in task manager (I am a local admin and have clicked the 'Show processes from all users' button. I have enabled logging for the web site (at default location of %SystemDrive%\inetpub\logs\LogFiles), but this folder is empty. I am assuming that this log output is written by w3wp.exe as it handles requests (no w3wp.exe, no log file?). Presumably there is another layer of request handling that is responsible for starting the worker processes, does thsi layer have log files I can check, and/or can I uninstall/re-install that layer? Thanks.

    Read the article

  • Decrease in disk performance after partitioning and encryption, is this much of a drop normal?

    - by Biohazard
    I have a server that I only have remote access to. Earlier in the week I repartitioned the 2 disk raid as follows: Filesystem Size Used Avail Use% Mounted on /dev/mapper/sda1_crypt 363G 1.8G 343G 1% / tmpfs 2.0G 0 2.0G 0% /lib/init/rw udev 2.0G 140K 2.0G 1% /dev tmpfs 2.0G 0 2.0G 0% /dev/shm /dev/sda5 461M 26M 412M 6% /boot /dev/sda7 179G 8.6G 162G 6% /data The raid consists of 2 x 300gb SAS 15k disks. Prior to the changes I made, it was being used as a single unencrypted root parition and hdparm -t /dev/sda was giving readings around 240mb/s, which I still get if I do it now: /dev/sda: Timing buffered disk reads: 730 MB in 3.00 seconds = 243.06 MB/sec Since the repartition and encryption, I get the following on the separate partitions: Unencrypted /dev/sda7: /dev/sda7: Timing buffered disk reads: 540 MB in 3.00 seconds = 179.78 MB/sec Unencrypted /dev/sda5: /dev/sda5: Timing buffered disk reads: 476 MB in 2.55 seconds = 186.86 MB/sec Encrypted /dev/mapper/sda1_crypt: /dev/mapper/sda1_crypt: Timing buffered disk reads: 150 MB in 3.03 seconds = 49.54 MB/sec I expected a drop in performance on the encrypted partition, but not that much, but I didn't expect I would get a drop in performance on the other partitions at all. The other hardware in the server is: 2 x Quad Core Intel(R) Xeon(R) CPU E5405 @ 2.00GHz and 4gb RAM $ cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 32 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.05 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 6/i Rev: 1.11 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: HL-DT-ST Model: CD-ROM GCR-8240N Rev: 1.10 Type: CD-ROM ANSI SCSI revision: 05 I'm guessing this means the server has a PERC 6/i RAID controller? The encryption was done with default settings during debian 6 installation. I can't recall the exact specifics and am not sure how I go about finding them? Thanks

    Read the article

  • NDR for meeting requests

    - by Adam
    We've got a mailbox for each department (e.g [email protected] and [email protected]) and everyone in that department has access to it, access is granted using Exchange Management Console. If I send a calendar invite to [email protected], I get a Undeliverable report: Delivery has failed to these recipients or groups: User_A The e-mail address you entered couldn't be found. Check the address and try resending the message. If the problem continues, please contact your helpdesk. User_B The e-mail address you entered couldn't be found. Check the address and try resending the message. If the problem continues, please contact your helpdesk. User_C The e-mail address you entered couldn't be found. Check the address and try resending the message. If the problem continues, please contact your helpdesk. The users are no longer in AD or Exchange but we cannot find any mention of them within any deligates or permissions anywhere. We only started to get this problem AFTER we upgraded our DCs from Windows Server 2003 to Windows Server 2008 and Exchange server from Windows Server 2003, with Exchange 2005 to Windows Server 2008, with exchange 2010.

    Read the article

  • Centreon setup (web part) config not writeable

    - by Evgeniy
    I have a problem with Centreon installation. At end of install process, I stopped at 10th step: Writable Centreon Configuration File (centreon.conf.php) Critical: Not Writeable /etc/centreon/ asterisk:asterisk (755) Should be : (755) Generate Centreon configuration file OK /etc/centreon/centreon.conf.php asterisk:asterisk (755) Should be : (755) Generate Centstorage configuration file OK /etc/centreon//conf.pm asterisk:asterisk (755) Should be : (755) But permissions and owner are OK. And I tried chmod -R 777 /etc/centreon Please help to understand what's wrong. UPD: Screenshot: http://gyazo.com/82701d119a5e0d98947ad35406a5b8f3

    Read the article

  • Where do Outlook folders go when moved?

    - by balexandre
    I have an account with external user mailboxes opened and accidentally I have moved a folder and now I can't find it anywhere. Action: I clicked on a folder and dragged it into another one. Result: Can't find the moved folder anywhere The above picture is the folders I currently have from my Outlook 2010 (via Exchange 2010), under an AD Network. Where can I (me, having admin rights over the network) retrieve that missing folder again? Attempts: The original and the one folder I need was accidentally moved, but I have created a poi folder and tried the same way, and I got the same result... the folder went missing. I also tried to reboot the client machine and access the same mailbox from OWA ... no luck on both attempts :( Any ideas on how I can retrieve the missing folder and its emails again?

    Read the article

  • Combine two or more compressed files

    - by shantanuo
    I have 2 gz files those I need to merge into one. time join <(zcat r_TR2_2012-05-28-08-10-00.gz) <(zcat r_TR1_2012-05-28-08-10-00.gz) The above statement is not working as expected. I am using 3 commands to do the needful. gunzip r_TR2_2012-05-28-08-10-00.gz gunzip r_TR1_2012-05-28-08-10-00.gz tar -zcvf combined.tar.gz r_TR1_2012-05-28-08-10-00 r_TR2_2012-05-28-08-10-00 Is there any way to do it in 1 statement?

    Read the article

  • What can I send back to the browser while I wait for PHP execution?

    - by Matt Malesky
    So....I have a PHP page that involves a lot of backend execution, namely 'exec' calls to run shell commands on the host server. This can take upwards of a few minutes depending on the calls involved. (If you look below, each recursion through the exec calls is mounting a LUN; I'd like to sometimes do upwards of 100 per execution.) I'm curious on what I can do to send content back to the browser (and prevent it from timing out). <!DOCTYPE html> <html> <head> <title>sfvmtk</title> </head> <body> <?php // TEMPORARY VARIABLES FOR TESTING $hba = 'vmhba38'; $svip = '10.10.20.100'; $targets = array ( 0 => array ( 'iqn' => 'iqn.2010-01.com.sf:t5np.esxtest.41', 'account' => 'esx', 'isecret' => 'isecret00000', 'tsecret' => 'tsecret00000' ), 1 => array ( 'iqn' => 'iqn.2010-01.com.sf:t5np.esxtest2.42', 'account' => 'esx2', 'isecret' => 'isecret00001', 'tsecret' => 'tsecret00001' ) ); $hostname = $_REQUEST['hostname']; $username = $_REQUEST['username']; $password = $_REQUEST['password']; foreach ($targets as $ctarget) { exec('esxcli -s '.$hostname.' -u '.$username.' -p '.$password.' iscsi adapter discovery statictarget add -A '.$hba.' -a '.$svip.' -n '.$ctarget['iqn'], $out); exec('esxcli -s '.$hostname.' -u '.$username.' -p '.$password.' iscsi adapter target portal auth chap set -A '.$hba.' -a '.$svip.' -N '.$ctarget['account'].' -d uni -l required -n '.$ctarget['iqn'].' -S '.$ctarget['isecret'], $out); exec('esxcli -s '.$hostname.' -u '.$username.' -p '.$password.' iscsi adapter target portal auth chap set -A '.$hba.' -a '.$svip.' -N '.$ctarget['account'].' -d mutual -l required -n '.$ctarget['iqn'].' -S '.$ctarget['tsecret'], $out); } exec('vicfg-rescan --server '.$hostname.' --username '.$username.' --password '.$password.' '.$hba, $out); ?> </body> </html>

    Read the article

  • How to secure Apache for shared hosting environment? (chrooting, avoid symlinking...)

    - by Alessio Periloso
    I'm having problems dealing with Apache configuration: the problem is that I want to limit each user to his own docroot (so, a chroot() would be what I'm looking for), but: Mod_chroot works only globally and not for each virtualhost: i have the users in a path like the following one /home/vhosts/xxxxx/domains/domain.tld/public_html (xxxxx is the user), and can't solve the problem chrooting /home/vhosts, because the users would still be allowed to see each other. Using apache-mod-itk would slow down the websites too much, and I'm not sure if it would solve anything Without using any of the previous two, I think the only thing left is avoiding symlinking, not allowing the users to link to something that doesn't belong to them. So, I think I'm going to follow the third point but... how to efficiently avoid symlinking while still keeping mod_rewrite working?! The php has already been chrooted with php-fpm, so my only concern is about Apache itself.

    Read the article

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