Search Results

Search found 21430 results on 858 pages for 'message digest'.

Page 78/858 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Enterprise Library Logging / Exception handling and Postsharp

    - by subodhnpushpak
    One of my colleagues came-up with a unique situation where it was required to create log files based on the input file which is uploaded. For example if A.xml is uploaded, the corresponding log file should be A_log.txt. I am a strong believer that Logging / EH / caching are cross-cutting architecture aspects and should be least invasive to the business-logic written in enterprise application. I have been using Enterprise Library for logging / EH (i use to work with Avanade, so i have affection towards the library!! :D ). I have been also using excellent library called PostSharp for cross cutting aspect. Here i present a solution with and without PostSharp all in a unit test. Please see full source code at end of the this blog post. But first, we need to tweak the enterprise library so that the log files are created at runtime based on input given. Below is Custom trace listner which writes log into a given file extracted out of Logentry extendedProperties property. using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; using Microsoft.Practices.EnterpriseLibrary.Logging.Configuration; using Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners; using Microsoft.Practices.EnterpriseLibrary.Logging; using System.IO; using System.Text; using System; using System.Diagnostics;   namespace Subodh.Framework.Logging { [ConfigurationElementType(typeof(CustomTraceListenerData))] public class LogToFileTraceListener : CustomTraceListener {   private static object syncRoot = new object();   public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data) {   if ((data is LogEntry) & this.Formatter != null) { WriteOutToLog(this.Formatter.Format((LogEntry)data), (LogEntry)data); } else { WriteOutToLog(data.ToString(), (LogEntry)data); } }   public override void Write(string message) { Debug.Print(message.ToString()); }   public override void WriteLine(string message) { Debug.Print(message.ToString()); }   private void WriteOutToLog(string BodyText, LogEntry logentry) { try { //Get the filelocation from the extended properties if (logentry.ExtendedProperties.ContainsKey("filelocation")) { string fullPath = Path.GetFullPath(logentry.ExtendedProperties["filelocation"].ToString());   //Create the directory where the log file is written to if it does not exist. DirectoryInfo directoryInfo = new DirectoryInfo(Path.GetDirectoryName(fullPath));   if (directoryInfo.Exists == false) { directoryInfo.Create(); }   //Lock the file to prevent another process from using this file //as data is being written to it.   lock (syncRoot) { using (FileStream fs = new FileStream(fullPath, FileMode.Append, FileAccess.Write, FileShare.Write, 4096, true)) { using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8)) { Log(BodyText, sw); sw.Close(); } fs.Close(); } } } } catch (Exception ex) { throw new LoggingException(ex.Message, ex); } }   /// <summary> /// Write message to named file /// </summary> public static void Log(string logMessage, TextWriter w) { w.WriteLine("{0}", logMessage); } } }   The above can be “plugged into” the code using below configuration <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="Trace" logWarningsWhenNoCategoriesMatch="true"> <listeners> <add listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.CustomTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Subodh.Framework.Logging.LogToFileTraceListener, Subodh.Framework.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Subodh Custom Trace Listener" initializeData="" formatter="Text Formatter" /> </listeners> Similarly we can use PostSharp to expose the above as cross cutting aspects as below using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using PostSharp.Laos; using System.Diagnostics; using GC.FrameworkServices.ExceptionHandler; using Subodh.Framework.Logging;   namespace Subodh.Framework.ExceptionHandling { [Serializable] public sealed class LogExceptionAttribute : OnExceptionAspect { private string prefix; private MethodFormatStrings formatStrings;   // This field is not serialized. It is used only at compile time. [NonSerialized] private readonly Type exceptionType; private string fileName;   /// <summary> /// Declares a <see cref="XTraceExceptionAttribute"/> custom attribute /// that logs every exception flowing out of the methods to which /// the custom attribute is applied. /// </summary> public LogExceptionAttribute() { }   /// <summary> /// Declares a <see cref="XTraceExceptionAttribute"/> custom attribute /// that logs every exception derived from a given <see cref="Type"/> /// flowing out of the methods to which /// the custom attribute is applied. /// </summary> /// <param name="exceptionType"></param> public LogExceptionAttribute( Type exceptionType ) { this.exceptionType = exceptionType; }   public LogExceptionAttribute(Type exceptionType, string fileName) { this.exceptionType = exceptionType; this.fileName = fileName; }   /// <summary> /// Gets or sets the prefix string, printed before every trace message. /// </summary> /// <value> /// For instance <c>[Exception]</c>. /// </value> public string Prefix { get { return this.prefix; } set { this.prefix = value; } }   /// <summary> /// Initializes the current object. Called at compile time by PostSharp. /// </summary> /// <param name="method">Method to which the current instance is /// associated.</param> public override void CompileTimeInitialize( MethodBase method ) { // We just initialize our fields. They will be serialized at compile-time // and deserialized at runtime. this.formatStrings = Formatter.GetMethodFormatStrings( method ); this.prefix = Formatter.NormalizePrefix( this.prefix ); }   public override Type GetExceptionType( MethodBase method ) { return this.exceptionType; }   /// <summary> /// Method executed when an exception occurs in the methods to which the current /// custom attribute has been applied. We just write a record to the tracing /// subsystem. /// </summary> /// <param name="context">Event arguments specifying which method /// is being called and with which parameters.</param> public override void OnException( MethodExecutionEventArgs context ) { string message = String.Format("{0}Exception {1} {{{2}}} in {{{3}}}. \r\n\r\nStack Trace {4}", this.prefix, context.Exception.GetType().Name, context.Exception.Message, this.formatStrings.Format(context.Instance, context.Method, context.GetReadOnlyArgumentArray()), context.Exception.StackTrace); if(!string.IsNullOrEmpty(fileName)) { ApplicationLogger.LogException(message, fileName); } else { ApplicationLogger.LogException(message, Source.UtilityService); } } } } To use the above below is the unit test [TestMethod] [ExpectedException(typeof(NotImplementedException))] public void TestMethod1() { MethodThrowingExceptionForLog(); try { MethodThrowingExceptionForLogWithPostSharp(); } catch (NotImplementedException ex) { throw ex; } }   private void MethodThrowingExceptionForLog() { try { throw new NotImplementedException(); } catch (NotImplementedException ex) { // create file and then write log ApplicationLogger.TraceMessage("this is a trace message which will be logged in Test1MyFile", @"D:\EL\Test1Myfile.txt"); ApplicationLogger.TraceMessage("this is a trace message which will be logged in YetAnotherTest1Myfile", @"D:\EL\YetAnotherTest1Myfile.txt"); } }   // Automatically log details using attributes // Log exception using attributes .... A La WCF [FaultContract(typeof(FaultMessage))] style] [Log(@"D:\EL\Test1MyfileLogPostsharp.txt")] [LogException(typeof(NotImplementedException), @"D:\EL\Test1MyfileExceptionPostsharp.txt")] private void MethodThrowingExceptionForLogWithPostSharp() { throw new NotImplementedException(); } The good thing about the approach is that all the logging and EH is done at centralized location controlled by PostSharp. Of Course, if some other library has to be used instead of EL, it can easily be plugged in. Also, the coder ARE ONLY involved in writing business code in methods, which makes code cleaner. Here is the full source code. The third party assemblies provided are from EL and PostSharp and i presume you will find these useful. Do let me know your thoughts / ideas on the same. Technorati Tags: PostSharp,Enterprize library,C#,Logging,Exception handling

    Read the article

  • WebSocket and Java EE 7 - Getting Ready for JSR 356 (TOTD #181)

    - by arungupta
    WebSocket is developed as part of HTML 5 specification and provides a bi-directional, full-duplex communication channel over a single TCP socket. It provides dramatic improvement over the traditional approaches of Polling, Long-Polling, and Streaming for two-way communication. There is no latency from establishing new TCP connections for each HTTP message. There is a WebSocket API and the WebSocket Protocol. The Protocol defines "handshake" and "framing". The handshake defines how a normal HTTP connection can be upgraded to a WebSocket connection. The framing defines wire format of the message. The design philosophy is to keep the framing minimum to avoid the overhead. Both text and binary data can be sent using the API. WebSocket may look like a competing technology to Server-Sent Events (SSE), but they are not. Here are the key differences: WebSocket can send and receive data from a client. A typical example of WebSocket is a two-player game or a chat application. Server-Sent Events can only push data data to the client. A typical example of SSE is stock ticker or news feed. With SSE, XMLHttpRequest can be used to send data to the server. For server-only updates, WebSockets has an extra overhead and programming can be unecessarily complex. SSE provides a simple and easy-to-use model that is much better suited. SSEs are sent over traditional HTTP and so no modification is required on the server-side. WebSocket require servers that understand the protocol. SSE have several features that are missing from WebSocket such as automatic reconnection, event IDs, and the ability to send arbitrary events. The client automatically tries to reconnect if the connection is closed. The default wait before trying to reconnect is 3 seconds and can be configured by including "retry: XXXX\n" header where XXXX is the milliseconds to wait before trying to reconnect. Event stream can include a unique event identifier. This allows the server to determine which events need to be fired to each client in case the connection is dropped in between. The data can span multiple lines and can be of any text format as long as EventSource message handler can process it. WebSockets provide true real-time updates, SSE can be configured to provide close to real-time by setting appropriate timeouts. OK, so all excited about WebSocket ? Want to convert your POJOs into WebSockets endpoint ? websocket-sdk and GlassFish 4.0 is here to help! The complete source code shown in this project can be downloaded here. On the server-side, the WebSocket SDK converts a POJO into a WebSocket endpoint using simple annotations. Here is how a WebSocket endpoint will look like: @WebSocket(path="/echo")public class EchoBean { @WebSocketMessage public String echo(String message) { return message + " (from your server)"; }} In this code "@WebSocket" is a class-level annotation that declares a POJO to accept WebSocket messages. The path at which the messages are accepted is specified in this annotation. "@WebSocketMessage" indicates the Java method that is invoked when the endpoint receives a message. This method implementation echoes the received message concatenated with an additional string. The client-side HTML page looks like <div style="text-align: center;"> <form action=""> <input onclick="send_echo()" value="Press me" type="button"> <input id="textID" name="message" value="Hello WebSocket!" type="text"><br> </form></div><div id="output"></div> WebSocket allows a full-duplex communication. So the client, a browser in this case, can send a message to a server, a WebSocket endpoint in this case. And the server can send a message to the client at the same time. This is unlike HTTP which follows a "request" followed by a "response". In this code, the "send_echo" method in the JavaScript is invoked on the button click. There is also a <div> placeholder to display the response from the WebSocket endpoint. The JavaScript looks like: <script language="javascript" type="text/javascript"> var wsUri = "ws://localhost:8080/websockets/echo"; var websocket = new WebSocket(wsUri); websocket.onopen = function(evt) { onOpen(evt) }; websocket.onmessage = function(evt) { onMessage(evt) }; websocket.onerror = function(evt) { onError(evt) }; function init() { output = document.getElementById("output"); } function send_echo() { websocket.send(textID.value); writeToScreen("SENT: " + textID.value); } function onOpen(evt) { writeToScreen("CONNECTED"); } function onMessage(evt) { writeToScreen("RECEIVED: " + evt.data); } function onError(evt) { writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); } function writeToScreen(message) { var pre = document.createElement("p"); pre.style.wordWrap = "break-word"; pre.innerHTML = message; output.appendChild(pre); } window.addEventListener("load", init, false);</script> In this code The URI to connect to on the server side is of the format ws://<HOST>:<PORT>/websockets/<PATH> "ws" is a new URI scheme introduced by the WebSocket protocol. <PATH> is the path on the endpoint where the WebSocket messages are accepted. In our case, it is ws://localhost:8080/websockets/echo WEBSOCKET_SDK-1 will ensure that context root is included in the URI as well. WebSocket is created as a global object so that the connection is created only once. This object establishes a connection with the given host, port and the path at which the endpoint is listening. The WebSocket API defines several callbacks that can be registered on specific events. The "onopen", "onmessage", and "onerror" callbacks are registered in this case. The callbacks print a message on the browser indicating which one is called and additionally also prints the data sent/received. On the button click, the WebSocket object is used to transmit text data to the endpoint. Binary data can be sent as one blob or using buffering. The HTTP request headers sent for the WebSocket call are: GET ws://localhost:8080/websockets/echo HTTP/1.1Origin: http://localhost:8080Connection: UpgradeSec-WebSocket-Extensions: x-webkit-deflate-frameHost: localhost:8080Sec-WebSocket-Key: mDbnYkAUi0b5Rnal9/cMvQ==Upgrade: websocketSec-WebSocket-Version: 13 And the response headers received are Connection:UpgradeSec-WebSocket-Accept:q4nmgFl/lEtU2ocyKZ64dtQvx10=Upgrade:websocket(Challenge Response):00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 The headers are shown in Chrome as shown below: The complete source code shown in this project can be downloaded here. The builds from websocket-sdk are integrated in GlassFish 4.0 builds. Would you like to live on the bleeding edge ? Then follow the instructions below to check out the workspace and install the latest SDK: Check out the source code svn checkout https://svn.java.net/svn/websocket-sdk~source-code-repository Build and install the trunk in your local repository as: mvn install Copy "./bundles/websocket-osgi/target/websocket-osgi-0.3-SNAPSHOT.jar" to "glassfish3/glassfish/modules/websocket-osgi.jar" in your GlassFish 4 latest promoted build. Notice, you need to overwrite the JAR file. Anybody interested in building a cool application using WebSocket and get it running on GlassFish ? :-) This work will also feed into JSR 356 - Java API for WebSocket. On a lighter side, there seems to be less agreement on the name. Here are some of the options that are prevalent: WebSocket (W3C API, the URL is www.w3.org/TR/websockets though) Web Socket (HTML5 Demos - html5demos.com/web-socket) Websocket (Jenkins Plugin - wiki.jenkins-ci.org/display/JENKINS/Websocket%2BPlugin) WebSockets (Used by Mozilla - developer.mozilla.org/en/WebSockets, but use WebSocket as well) Web sockets (HTML5 Working Group - www.whatwg.org/specs/web-apps/current-work/multipage/network.html) Web Sockets (Chrome Blog - blog.chromium.org/2009/12/web-sockets-now-available-in-google.html) I prefer "WebSocket" as that seems to be most common usage and used by the W3C API as well. What do you use ?

    Read the article

  • How to Use the Signature Editor in Outlook 2013

    - by Lori Kaufman
    The Signature Editor in Outlook 2013 allows you to create a custom signature from text, graphics, or business cards. We will show you how to use the various features of the Signature Editor to customize your signatures. To open the Signature Editor, click the File tab and select Options on the left side of the Account Information screen. Then, click Mail on the left side of the Options dialog box and click the Signatures button. For more details, refer to one of the articles mentioned above. Changing the font for your signature is pretty self-explanatory. Select the text for which you want to change the font and select the desired font from the drop-down list. You can also set the justification (left, center, right) for each line of text separately. The drop-down list that reads Automatic by default allows you to change the color of the selected text. Click OK to accept your changes and close the Signatures and Stationery dialog box. To see your signature in an email, click Mail on the Navigation Bar. Click New Email on the Home tab. The Message window displays and your default signature is inserted into the body of the email. NOTE: You shouldn’t use fonts that are not common in your signatures. In order for the recipient to see your signature as you intended, the font you choose also needs to be installed on the recipient’s computer. If the font is not installed, the recipient would see a different font, the wrong characters, or even placeholder characters, which are empty square boxes. Close the Message window using the File tab or the X button in the upper, right corner of the Message window. You can save it as a draft if you want, but it’s not necessary. If you decide to use a font that is not common, a better way to do so would be to create a signature as an image, or logo. Create your image or logo in an image editing program making it the exact size you want to use in your signature. Save the image in a file size as small as possible. The .jpg format works well for pictures, the .png format works well for detailed graphics, and the .gif format works well for simple graphics. The .gif format generally produces the smallest files. To insert an image in your signature, open the Signatures and Stationery dialog box again. Either delete the text currently in the editor, if any, or create a new signature. Then, click the image button on the editor’s toolbar. On the Insert Picture dialog box, navigate to the location of your image, select the file, and click Insert. If you want to insert an image from the web, you must enter the full URL for the image in the File name edit box (instead of the local image filename). For example, http://www.somedomain.com/images/signaturepic.gif. If you want to link to the image at the specified URL, you must also select Link to File from the Insert drop-down list to maintain the URL reference. The image is inserted into the Edit signature box. Click OK to accept your changes and close the Signatures and Stationery dialog box. Create a new email message again. You’ll notice the image you inserted into the signature displays in the body of the message. Close the Message window using the File tab or the X button in the upper, right corner of the Message window. You may want to put a link to a webpage or an email link in your signature. To do this, open the Signatures and Stationery dialog box again. Enter the text to display for the link, highlight the text, and click the Hyperlink button on the editor’s toolbar. On the Insert Hyperlink dialog box, select the type of link from the list on the left and enter the webpage, email, or other type of address in the Address edit box. You can change the text that will display in the signature for the link in the Text to display edit box. Click OK to accept your changes and close the dialog box. The link displays in the editor with the default blue, underlined text. Click OK to accept your changes and close the Signatures and Stationery dialog box. Here’s an example of an email message with a link in the signature. Close the Message window using the File tab or the X button in the upper, right corner of the Message window. You can also insert your contact information into your signature as a Business Card. To do so, click Business Card on the editor’s toolbar. On the Insert Business Card dialog box, select the contact you want to insert as a Business Card. Select a size for the Business Card image from the Size drop-down list. Click OK. The Business Card image displays in the Signature Editor. Click OK to accept your changes and close the Signatures and Stationery dialog box. When you insert a Business Card into your signature, the Business Card image displays in the body of the email message and a .vcf file containing your contact information is attached to the email. This .vcf file can be imported into programs like Outlook that support this format. Close the Message window using the File tab or the X button in the upper, right corner of the Message window. You can also insert your Business Card into your signature without the image or without the .vcf file attached. If you want to provide recipients your contact info in a .vcf file, but don’t want to attach it to every email, you can upload the .vcf file to a location on the internet and add a link to the file, such as “Get my vCard,” in your signature. NOTE: If you want to edit your business card, such as applying a different template to it, you must select a different View other than People for your Contacts folder so you can open the full contact editing window.     

    Read the article

  • Workflow Foundation: How to create Receive activity with custom message in xaml designer?

    - by Petr Felzmann
    I need to have Receive activity which can receive my custom data. I found examples, but all use coded workflows like such public class ProcessRequest : Activity { public ProcessRequest() { Variable request = new Variable { Name = "request" }; Receive receiveRequest = new Receive { ServiceContractName = "IProcessRequest", OperationName = "Foo", CanCreateInstance = true, Content = ReceiveContent.Create(new OutArgument(request)) }; } } The main point is that Receive.Content property. It is not clear for me how I can do it in XAML designer. What I have to set in the dialog of the Content property - Message or Parameters and what to set inside those options? Thanks for the light!

    Read the article

  • Jmeter Exception response code :000 ,response message:Read timed out,for Java Web service?

    - by vipin k.
    I am testing a java web service(jax-ws),but whenever i am running the test i am getting response code as response message:Read timed out . And at tomcat serevr side i am getting exception : SEVERE: caught throwable ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) I found out that Read timed out exception may occur because of big size of SOAP response. But i am clue less because same web service i can access form an application.

    Read the article

  • Wire the homepage so that it fires off a Push notification message to my iPhone every time someone l

    - by fwd4
    I looking for a simple way to wire the homepage of my website so that it fires off a Push notification message to my iPhone every time someone lands on the page (just visiting in their browser). I'm aware this could become annoying! I currently send regular notifications to my iPhone using cron and curl to check sites / RSS feeds for change and then fire to to the Prowl API who in turn send it to my iPhone - like so: curl https://prowl.weks.net/publicapi/add -F apikey=$apikey -F priority=$priority -F application="$app" -F event="$eventname" -F description="$description" Could I do something similar from with the HTML of the homepage - call a script on my server which in turn fires a similar curl request above? Maybe with Javascript or PHP? Ideally I'd like the loading and rendering of me webpage to be uninterrupted by the call. Hat tip to Prowl - http://prowl.weks.net/api.php and to flx.me Both of which I use to make what I have already working.

    Read the article

  • How come my email link in drupal footer message doesn't work?

    - by Behrooz Karjooravary
    This is what I have typed in the footer message section from the site configuration, sight information page: Copyright Sage 2010 | Contact Us: < a ="mailto:[email protected]" [email protected]< / a | < a="www.mysite.org/contactoptions" other contact options< / a However, when i click on the links nothing happens. I was told all I need to do is set input format to 'Full HTML' in drupal to make that work. But it still doesn't work.

    Read the article

  • how to push data from BlazeDS without recieve message from Flex client?

    - by Teerasej
    Hi, everyone I am using BlazeDS for data-push feature in my Flex application project. From the official tutorial, Getting started with BlazeDS, it shows messaging example with producer/consumer from API. but how can I implement server side which doesn't need to be invoke from Flex client, but from within server-side instead. I got some idea but I don't know how to do because I'm a Flex developer, not Java developer, so I think you can help me. In Google, there's a tutorial show about I need to extend ServiceAdapter class in Java-side, which extends Invoke method. Do I need to extend other class instead of this to do what I want? How to configure the message-config.xml to get the result like I describe above?

    Read the article

  • Does anyone know how to create a message bubble with 2 buttons appears on top of an overlayitem for

    - by Zap
    I currently have implemented an overlayitem that shows an icon for geopoint on a map application in Android. When the icon is clicked, it brings up an AlertDialog from the onTap method below. I have the following questions: Does anyone know how to display a map message bubble directly above the icon overlayitem with 2 callout buttons one to the left of the title and one to the right of the bubble? Does anyone know how to make the overlayitem draggable so I can press and hold it and drag it across the map. I am trying to duplicate the draggable icon behavior that's available on the iPhone. If so, please share some sample code. Thanks protected boolean onTap(int index) { OverlayItem item = mOverlays.get(index); AlertDialog.Builder dialog = new AlertDialog.Builder(mContext); dialog.setTitle(item.getTitle()); dialog.setMessage(item.getSnippet()); dialog.show(); return true; }

    Read the article

  • unexpected T_TRY, expecting T_FUNCTION error message, not sure why ?

    - by Rachel
    I am getting unexpected T_TRY, expecting T_FUNCTION error message and am not sure as too why am getting that, can't we use try and catch block inside class like this: class Processor { protected $dao; protected $fin; try { public function __construct($file) { //Open File for parsing. $this->fin = fopen($file,'w+') or die('Cannot open file'); // Initialize the Repository DAO. $this->dao = new Dao('some name'); } public function initiateInserts() { while (($data=fgetcsv($this->fin,5000,";"))!==FALSE) { $initiate_inserts = $this->dao->initiateInserts($data); } } public function initiateCUpdates() { while (($data=fgetcsv($this->fin,5000,";"))!==FALSE) { $initiate_updates = $this->dao->initiateCUpdates($data); } } public function initiateExecuteIUpdates() { while (($data=fgetcsv($this->fin,5000,";"))!==FALSE) { $initiate_updates = $this->dao->initiateIUpdates($data); } } } catch (Exception $e) { } }

    Read the article

  • Error while printing crystal report, with that exception message "No printers are installed".

    - by Ahmed
    I got an exception with message "No printers are installed." while printing a report for depolyed release of our website. I use _rptDocument.PrintToPrinter(1, false, 0, 0); to print a report. I got that exception, even I've more than one printer installed on my machine. Also, I don't get that exception while development, everything while development is going fine. I used "Publish Web Site" and "Web Project Deployment" options to publish/deploy website, but I got the same result. Any suggestions?

    Read the article

  • I'm trying to install Spree on my Mac with Rails 1.9.2 - I'm getting an error message.

    - by william tell
    I'm doing a local install on Mac OSX of Spree (a Ruby-based ecommerce package) following the tutorial on this page. I'm using RVM to run Ruby 1.9.2 and rails 3.0.3. I run "gem install spree" successfully to load spree version 0.40. But when I run "Gem Install Spree" I get the following message. Can anyone help? /Library/Ruby/Site/1.8/rubygems.rb:335:in `bin_path': can't find executable spree for spree-0.40.0 (Gem::Exception) from /usr/bin/spree:19 Also, when I run "Gem list spree" I get an empty list.

    Read the article

  • How do you diagnose a 500 error on Heroku when there is no error message in the logs?

    - by lala
    I have a Rails app on Heroku that is serving 500 errors at random intervals. Web pages will display "Internal server error" in plain text, instead of the usual "We're sorry. Something went wrong." page. When I refresh the page, it works fine. The logs don't show me an error message, just » 14:20:34.107 2013-10-11 12:20:33.763690+00:00 heroku router - - at=info method=HEAD path=/ host=www.mydomain.com fwd="184.73.237.85/ec2-184-73-237-85.compute-1.amazonaws.com" dyno=web.1 connect=1ms service=63ms status=200 bytes=0 » 14:21:03.957 2013-10-11 12:21:03.561867+00:00 heroku router - - at=info method=GET path=/ host=www.mydomain.com fwd="50.112.95.211/ec2-50-112-95-211.us-west-2.compute.amazonaws.com" dyno=web.1 connect=0ms service=1ms status=500 bytes=21 Support has told me to look at request queuing in New Relic, but New Relic only shows a big red mark saying the server is down (even though the site works fine when refreshed). With no error messages, I'm at a loss for how to diagnose this issue.

    Read the article

  • is that possible to crack Private key with Decrypted message and public key?

    - by matt clarck
    for example company B send an encrypted email with company A's public key (RSA/PGP/SSH/openSSL/...) the employer receive the encrypted email and send it to his boss who have the private key to decrypt message. the boss give decrypted email back to employer to work on it. question is can employer compare encrypted email with decrypted version and find out what is private key ? if it is possible then is there anyway to protect cracking private key from decrypted messages and comparing with encrypted messages/public key ?

    Read the article

  • Can I configure NUnit so that Debug.Fail doesn't show a message box when I run my tests?

    - by panamack
    I have this property: public SubjectStatus Status { get { return status; } set { if (Enum.IsDefined(typeof(SubjectStatus), value)) { status = value; } else { Debug.Fail("Error setting Subject.Status", "There is no SubjectStatus enum constant defined for that value."); return; } } } and this unit test [Test] public void StatusProperty_StatusChangedToValueWithoutEnumDefinition_StatusUnchanged() { Subject subject = new TestSubjectImp("1"); // assigned by casting from an int to a defined value subject.Status = (SubjectStatus)2; Assert.AreEqual(SubjectStatus.Completed, subject.Status); // assigned by casting from an int to an undefined value subject.Status = (SubjectStatus)100; // no change to previous value Assert.AreEqual(SubjectStatus.Completed, subject.Status); } Is there a way I can prevent Debug.Fail displaying a message box when I run my tests, but allow it to show me one when I debug my application?

    Read the article

  • MSNP-SHARP how to send an hello message to an user that changed status from offline to online

    - by Constantine
    I tried in this way. I subscribed to that event who control the user status, its announcing me that user in Online. my code is: void Nameserver_ContactOnline(object sender, ContactEventArgs e) { Talk = messenger.CreateConversation(); Talk.Invite(e.Contact.Mail,ClientType.PassportMember); Talk.SendTextMessage(new TextMessage(Msg)); Talk.End(); LogEvent("Contact online " + e.Contact.Name.ToString() + " " + e.Contact.Mail.ToString()); } someone can give me a hint ? maybe i do something wrong because message wasn't sent. thanks.

    Read the article

  • how can I send messages to/from a Websphere Message Broker from an embedded C client (no JVM)?

    - by queBurro
    What are my options for pubsubing (or point to point but pubsub is better) messages to and from an IBM message broker from an embedded headless C/C++ linux client that doesn't have a JVM? Ideally we want large file transfer (2GB once per day off of the client) encryption (SSL) reliable ('assured' delivery / QoS2, maybe QoS1 would do) The client in question currently only has exes and some bash scripts, I've been playing with MQTTv3 and RSMB, but for that I'd have to chomp the large files up (and reassemble back home) and I don't want to get into that if there's a transport that will do this for me? I've looked at MQTTv5 (but our client's got no JVM); JMS (no JVM) and XMS? which again looks like it gives me a C API but then needs the JVM to be installed on the client (or am I wrong?) any clues or hints would be appreciated, cheers

    Read the article

  • Is there a way to implement an XMPP client or message reciever that can recieve all the messages fro

    - by roberto
    Basically im trying to build a bot that can send a message using one of many accounts out to a user and be able to receive messages to that account it originally used process and do whatever I need it to do. So far I found the JAXL library (http://code.google.com/p/jaxl/) but based on examples it is only able to handle one user at a time. Any suggestions or ideas? thank you in advanced. btw if there is anyway to make the server automatically forward those messages to another program or whatever that works just as well.

    Read the article

  • Workflow Foundation: How to create Recieve activity with custom message in xaml designer?

    - by Petr Felzmann
    I need to have Recieve activity which can receive my custom data. I found examples, but all use coded workflows like such public class ProcessRequest : Activity { public ProcessRequest() { Variable<MyData> request = new Variable<MyData> { Name = "request" }; Receive receiveRequest = new Receive { ServiceContractName = "IProcessRequest", OperationName = "Foo", CanCreateInstance = true, Content = ReceiveContent.Create(new OutArgument<MyData>(request)) }; } } The main point is that Recieve.Content property. It is not clear for me how I can do it in XAML designer. What I have to set in the dialog of the Content property - Message or Parameters and what to set inside those options? Thanks for the light!

    Read the article

  • What Windows message is fired for mouse-up with modifier keys?

    - by Greg
    My WndProc isn't seeing mouse-up notifications when I click with a modifier key (shift or control) pressed. I see them without the modifier key, and I see mouse-down notifications with the modifier keys. I'm using the Windows Forms NativeWindow wrapper to get Windows messages from the WndProc() method. I've tried tracking the notifications I do get, and I the only clue I see is WM_CAPTURECHANGED. I've tried calling SetCapture when I receive the WM_LBUTTONDOWN message, but it doesn't help. Without modifier (skipping paint, timer and NCHITTEST messages): WM_LBUTTONDOWN WM_SETCURSOR WM_MOUSEMOVE WM_SETCURSOR WM_LBUTTONUP With modifier (skipping paint, timer and NCHITTEST messages): WM_KEYDOWN WM_PARENTNOTIFY WM_MOUSEACTIVATE WM_MOUSEACTIVATE WM_SETCURSOR WM_LBUTTONDOWN WM_SETCURSOR (repeats) WM_KEYDOWN (repeats) WM_KEYUP If I hold the mouse button down for a long time, I can usually get a WM_LBUTTONUP notification, but it should be possible to make it more responsive.. What am I missing? Thanks.

    Read the article

  • Why does Net::Twitter complain "HTTP::Message content not bytes"?

    - by Russell C.
    We have been using Perl's Net:Twitter CPAN module (version 3.12) and basic authentication (not OAuth) for almost a year now to syndicate updates from our site to our Twitter account. We just migrated to a new server last week and since the move our updates to Twitter have stopped and the following error is being reported whenever we try to post an update: HTTP::Message content not bytes at /usr/lib/perl5/site_perl/5.8.8/HTTP/Request/Common.pm line 90 Here is the code we're using the update our Twitter account: use Net::Twitter; my $twitter = Net::Twitter->new( traits => [qw/API::REST/], username => $username, password => $password, source => 'twitterfeed' ); my $result = $twitter->update($status); I have no idea what the issue is and was hoping that someone else has run into this issue and can provide a quick solution. Thanks in advance for your help!

    Read the article

  • Any reason why I shouldn't use couchdb for message passing or realtime activity streams?

    - by Up
    While using ampq or xmpp (rabbitmq or ejabbered that could have couchdb as backends) seems like a good fit to deliver real time updates about friend state in a social gaming platform where updates are small but frequent, I can't help but think why wouldn't couchdb be a good platform to deliver such updates? The main advantage I could think of is its ability to filter updates based on friends and availability of changes api, which makes developing such an application and managing it (including replication) quite easy compared to ampq or xmpp where you have to think about how to manage the pubsub nodes and who is subscribed to them at any point in time. However, I can't help but think this is too good to be true, I can't find information on what couchdb's shortcomings are. Somehow, it feels like using MySQL for message passing which is why I am hesitant to using it. Anyone have any experience in using couchdb for such applications? would you recommend another platform to use?

    Read the article

  • I tried installing Ubuntu 10.04 and I got this message - any ideas on what to do?

    - by vette982
    No root file system defined. Please correct this from the partition menu. This message shows up when I first boot into Ubuntu after the installation. I installed it by mounting the ISO with Daemon Tools, and I just did the default Wubi installation. I keep reading everywhere that I need to choose my installation directory, but I don't get any option to do that. These are all the options I get for installation directory. I have a C and D partition on my drive, and I tried installing it on both and no luck either way. Any ideas?

    Read the article

  • how to interpret testng console log message for passing tests?

    - by Kunal Cholera
    I ran testng tests for my test classes, I get the following three types of log output when I run the passing tests. I am using org.testng.AssertJUnit.assertTrue() methods in my tests. [testng] PASSED: testMethod1 on null(test.foo.bar.Class1) [testng] PASSED: testMethod2 on Default test name(test.foo.bar.jar.Class2) [testng] PASSED: testMethod3 Can any one please tell me why for some tests it says "on null" for some it says "on Default test name ... " and for some it does not say anything on the console output. Specifically I want to make it consistent message. Environment : linux Testng framework : 6.3.2beta please advise. thanks.

    Read the article

  • Publish/Subscribe paradigm: Why must message classes not know about their subscribers?

    - by carleeto
    From Wikipedia: "Publish/subscribe (or pub/sub) is a messaging paradigm where senders (publishers) of messages are not programmed to send their messages to specific receivers (subscribers). Rather, published messages are characterized into classes, without knowledge of what (if any) subscribers there may be" I can understand why a sender must not be programmed to send its message to a specific receiver. But why must published messages be classes that do not have knowledge of their subscribers? It would seem that once the messaging system itself is in place, what typically changes as software evolves is the messages sent, the publishers and the receivers. Keeping the messages separate from the subscribers seems to imply that the subscription model might also change. Is this the reason? Also, does this occur in the real world? I realize this may be a basic question, but I'm trying to understand this paradigm and your replies are very much appreciated.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >