Search Results

Search found 63131 results on 2526 pages for 'error message'.

Page 55/2526 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • error C2146: syntax error : missing ';' before identifier 'g_App'

    - by numerical25
    I wish c++, was a little more specific on the messages they give. The following error is being thrown in the document below main.h #ifndef main_h #define main_h //includes #include <windows.h> #include <commctrl.h> #include <d3d9.h> #include <fstream> #include "capplication.h" //constants #define TITLE "D3D Tut 01: Create Window" #define WINDOW_X 350 #define WINDOW_Y 320 //Button ID's #define ID_START 1 #define ID_CANCEL 2 //globals extern CApplication g_App; //function prototypes LRESULT CALLBACK WindowProcedure(HWND,UINT,WPARAM,LPARAM); #endif The only header file that could possible throw this error is the capplication.h. given below capplication.h #ifndef capplication_h #define capplication_h #include"main.h" class CApplication { public: CApplication(void); ~CApplication(void); void InitWindow(void); void SaveSettings(void); void LoadSettings(void); void KillWindow(void); inline bool GetWindowStatus(void) { return m_bRunningWindow; } inline HWND GetWindowHandle(void) { return m_hWindow; } inline void SetWindowStatus(bool bRunningWindow) { m_bRunningWindow = bRunningWindow; } private: bool m_bRunningWindow; HWND m_hWindow, m_hBtnStart, m_hBtnCancel, m_hLblResolution, m_hCbResolution, m_hLblBackBuffer, m_hCbBackBuffer, m_hLblDepthStencil, m_hCbDepthStencil, m_hLblVertexProcessing, m_hCbVertexProcessing, m_hLblMultiSampling, m_hCbMultiSampling, m_hLblAnisotropy, m_hCbAnisotropy; DWORD m_dwWidth, m_dwHeight, m_dwVertexProcessing, m_dwAnisotropy; D3DFORMAT m_ColorFormat, m_DepthStencilFormat; D3DMULTISAMPLE_TYPE m_MultiSampling; }; #endif Besides that, the only suspicious thing I see is fstream given in the first code. I did have it as fstream.h But VC++ was not recognizing it so I was told to remove the h and I did. now I am down to this error. and I have no clue what it could be. Possibly something obvious

    Read the article

  • using ftpWebRequest with an error: the remote server returned error 530 not loged in

    - by user1361207
    I am trying to use the ftpWebRequest in c# my code is // Get the object used to communicate with the server. FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://192.168.20.10/file.txt"); request.Method = WebRequestMethods.Ftp.UploadFile; // This example assumes the FTP site uses anonymous logon. request.Credentials = new NetworkCredential("dev\ftp", "devftp"); // Copy the contents of the file to the request stream. StreamReader sourceStream = new StreamReader(@"\file.txt"); byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd()); sourceStream.Close(); request.ContentLength = fileContents.Length; request.UsePassive = true; Stream requestStream = request.GetRequestStream(); requestStream.Write(fileContents, 0, fileContents.Length); requestStream.Close(); FtpWebResponse response = (FtpWebResponse)request.GetResponse(); Console.WriteLine("Upload File Complete, status {0}", response.StatusDescription); response.Close(); and I get an Error in request.GetRequestStream(); the error is: the remote server returned error 530 not loged in if I try to go in to a browser page and in the url I write ftp://192.168.20.10/ the brows page is asking me for a name and password, I put the same name and password and I see all the files and folders in the ftp folder. can any one help me with this problem?

    Read the article

  • PHP: POST Request to ASP.NET website results in 500 server error when html tags included

    - by RyanJD
    My situation: I need to send text to an ASP.NET web service using POST. The entire page there is a form: <form name="aspnetForm" method="post" action="Discussion.aspx?classroom=lG39il1cotOAGJwiNvmQlIPfwmjikD%2fAHLhjjGInAZQ%3d&amp;Page=Posts&amp;ID=794239&amp;Sort=&amp;SortOrder=" id="aspnetForm"> So, I figured if I sent a POST request to this form with the correct inputs it would work. And, to an extent, it has. The form inputs are as follows: <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDw..." /> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWYQLrt..." /> And a bunch of other inputs. The code I have used is as follows: // grab form info $inputs = extract_form_inputs($discussion['body']); $inputs['__EVENTTARGET'] = 'ctl00$cphMain$ctl01$btnSubmit'; $inputs['ctl00$cphMain$ctl01$tbNickname'] = "Your Instructor"; $inputs['ctl00$cphMain$ctl01$reMessage'] = $message; // submit form $r = request_send($discussion['url'], $inputs); extract_form_inputs does exactly that. $discussion['body'] is the content of the page. $discussion['url'] is the URL of the page. request_send has two arguments: ($url, $post_array). It performs rawurlencode on each element of the array and joins them up as keypairs, in the same way as http_build_query. The request is url encoded properly, sent to the correct page, and works fine until I insert html tags. I have checked - the 'greater than' and 'less than' symbols ('<' and '') are url-encoded properly. However, the server responds with a 500 error. It accepts any other text. Has anyone else come across this sort of problem? Is there some setting on an ASP.NET server that denies html? I can't see this being the case - there is a rich text editor on the website that I am sending requests to. This text editor performs the same request as I am, only I am doing it remotely. The rich text editor sends html to the form - I have checked that, too, using javascript. Note: I do not have the power to modify the ASP.NET server.

    Read the article

  • Catching error caused by InitialContext.lookup

    - by Martin Schröder
    I'm developing a command line client (Java SE6) that now needs to talk to a Glassfish 2.1 server. The code for setting up this connection is try { final InitialContext context = new InitialContext(); final String ejbName = GeneratorCancelledRemote.class.getName(); generatorCancelled = (GeneratorCancelledRemote) context.lookup(ejbName); } catch (Throwable t) { System.err.println("--> Could not call server:"); t.printStackTrace(System.err); runWithOutEJB = true; } I'm now testing it without a running server and the client (when run from Eclipse 4.2) just bombs with 31.10.2012 10:40:09 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700" org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2783) at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2804) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:261) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:274) at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:184) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:328) at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112) at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69) at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:134) at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:259) at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:204) at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.werkii.latex.generator.Generator.main(Generator.java:344) Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:244) ... 14 more Caused by: java.net.ConnectException: Connection refused: connect at sun.nio.ch.Net.connect(Native Method) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:532) at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105) at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332) ... 15 more It's o.k. for now (while I'm still in development) that it bombs, but it does this repeatedly and the catch clause is never reached (even though I'm catching Throwable) - the message is not printed. So how can I handle connection errors during lookup in my program?

    Read the article

  • windowsupdate troubles on windowsxp after april 2014, plus an explorer error message

    - by sigma4500
    I've spent the last couple of days trying to install windows xp from a cd onto my desktop. The installtion is successful, and I can activate windows, but cannot run windows update. The error I receive from windows update is: Error number: 0x80240036 I understand that after april 2014 microsoft is no longer developing new patches, but I have presumed that customers would continue to have access to all the patches that where made up to this date. How can I install these patches? Is this possible? As mentioned, I can install windows and activate, but cannot run windowsupdate (Error number: 0x80240036). Seperately, there is an error with a windows explorer pull down menu (item) that asks: Is this copy of windows legal? How can I get rid of this message? I am not running a pirated, or illegal copy of windows and this message should not be there. I want continue running windows xp without windows update, but I need to get rid of this windows explorer error message.

    Read the article

  • Create new folder for new sender name and move message into new folder

    - by Dave Jarvis
    Background I'd like to have Outlook 2010 automatically move e-mails into folders designated by the person's name. For example: Click Rules Click Manage Rules & Alerts Click New Rule Select "Move messages from someone to a folder" Click Next The following dialog is shown: Problem The next part usually looks as follows: Click people or public group Select the desired person Click specified Select the desired folder Question How would you automate those problematic manual tasks? Here's the logic for the new rule I'd like to create: Receive a new message. Extract the name of the sender. If it does not exist, create a new folder under Inbox Move the new message into the folder assigned to that person's name I think this will require a VBA macro. Related Links http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/A_420-Extending-Outlook-Rules-via-Scripting.html http://msdn.microsoft.com/en-us/library/office/ee814735.aspx http://msdn.microsoft.com/en-us/library/office/ee814736.aspx http://stackoverflow.com/questions/11263483/how-do-i-trigger-a-macro-to-run-after-a-new-mail-is-received-in-outlook http://en.kioskea.net/faq/6174-outlook-a-macro-to-create-folders http://blogs.iis.net/robert_mcmurray/archive/2010/02/25/outlook-macros-part-1-moving-emails-into-personal-folders.aspx Update #1 The code might resemble something like: Public WithEvents myOlApp As Outlook.Application Sub Initialize_handler() Set myOlApp = CreateObject("Outlook.Application") End Sub Private Sub myOlApp_NewMail() Dim myInbox As Outlook.MAPIFolder Dim myItem As Outlook.MailItem Set myInbox = myOlApp.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox) Set mySenderName = myItem.SenderName On Error GoTo ErrorHandler Set myDestinationFolder = myInbox.Folders.Add(mySenderName, olFolderInbox) Set myItems = myInbox.Items Set myItem = myItems.Find("[SenderName] = " & mySenderName) myItem.Move myDestinationFolder ErrorHandler: Resume Next End Sub Update #2 Split the code as follows: Sent a test message and nothing happened. The instructions for actually triggering a message when a new message arrives are a little light on details (for example, no mention is made regarding ThisOutlookSession and how to use it). Thank you.

    Read the article

  • logparser Message with error codes

    - by nsr81
    Hi All, Is there anyway to get complete error message using LogParser? When I run the following query: logparser -i:EVT -o:NAT "SELECT TimeGenerated,EventID,Message from System WHERE EventTypeName='Error event'" I get the following output: 2009-09-02 19:35:44 7000 The USB Mass Storage Driver service failed to start due to the following error: %%1058 The full "Message" in EventViewer is: Description: The USB Mass Storage Driver service failed to start due to the following error: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. How can I obtain complete message using logparser?

    Read the article

  • Pasting formatted Excel range into Outlook message

    - by Steph
    Hi everyone, I am using Office 2007 and I would like to use VBA to paste a range of formatted Excel cells into an Outlook message and then mail the message. In the following code (that I lifted from various sources), it runs without error and then sends an empty message... the paste does not work. Can anyone see the problem and better yet, help with a solution? Thanks, -Steph Sub SendMessage(SubjectText As String, Importance As OlImportance) Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach As Outlook.Attachment Dim iAddr As Integer, Col As Integer, SendLink As Boolean 'Dim Doc As Word.Document, wdRn As Word.Range Dim Doc As Object, wdRn As Object ' Create the Outlook session. Set objOutlook = CreateObject("Outlook.Application") ' Create the message. Set objOutlookMsg = objOutlook.CreateItem(olMailItem) Set Doc = objOutlookMsg.GetInspector.WordEditor 'Set Doc = objOutlookMsg.ActiveInspector.WordEditor Set wdRn = Doc.Range wdRn.Paste Set objOutlookRecip = objOutlookMsg.Recipients.Add("[email protected]") objOutlookRecip.Type = 1 objOutlookMsg.Subject = SubjectText objOutlookMsg.Importance = Importance With objOutlookMsg For Each objOutlookRecip In .Recipients objOutlookRecip.Resolve ' Set the Subject, Body, and Importance of the message. '.Subject = "Coverage Requests" 'objDrafts.GetFromClipboard Next .Send End With Set objOutlookMsg = Nothing Set objOutlook = Nothing End Sub

    Read the article

  • Exchange 2003 and Outlook rule: Send auto reply message not working

    - by Mestika
    Hi, I have created a distributed group which have to send a auto reply when receiving a mail. I know that it is impossible to send a auto reply within a distributed group, but following a guide I have created a mail account called “noreply”. In outlook I have created a rule in the “noreply” account where I chose following conditions: Send to a person or distributed list (where I selected my distributed group) Then to specify what to do with that message I selected Have server reply using a specific message I’ve created my message and saved it. But when I try to write an e-mail to the distributed group it doesn’t send back the reply message. Does anyone knows what I’m doing wrong? Sincerely Mestika

    Read the article

  • Autoinstall of Microsoft Security Essentials give random error message

    - by vegarwe
    I'm using wpkg to auto install Microsoft security essentials on WinXP. At the first login after the installer finishes I get an error message as msseces.exe starts. After a reboot the message goes away. The error message indicates a random access restriction. "An error has occured in the program. Try to open it again. If this problem continues, you'll need to reinstall Microsoft Security Essentials from the Microsoft Download Center. Error code: 0x80070005" Firstly: Does anyone know why I get this error message? Second: How do I debug this kind of problems? The event log doesn't seem to contain anything useful. Is there a tool to detect and list denied system calls?

    Read the article

  • Exchange 2003 and Outlook rule: Send auto reply message not working

    - by Mestika
    I have created a distributed group which have to send a auto reply when receiving a mail. I know that it is impossible to send a auto reply within a distributed group, but following a guide I have created a mail account called “noreply”. In outlook I have created a rule in the “noreply” account where I chose following conditions: Send to a person or distributed list (where I selected my distributed group) Then to specify what to do with that message I selected Have server reply using a specific message I’ve created my message and saved it. But when I try to write an e-mail to the distributed group it doesn’t send back the reply message. Does anyone knows what I’m doing wrong? Sincerely Mestika

    Read the article

  • Vacation sends autoreply message to the recipient as well

    - by elitalon
    Hi, I have configured my Postfix server with vacation for a domain. Sending a message to [email protected] causes two events: The message is delivered to the recipient ([email protected]) An auto-reply message is sent to the sender, alerting that [email protected] should be used instead. Everything works well except for one particular drawback: the auto-reply is also sent to the recipient, so it receives two messages in the end. What can I do to avoid that? I'm only using the $TO variable in the custom vacation.msg message. And here is Postfix's master.cf vacation line: autoreply unix - n n - - pipe flags=Rhu user=vacation argv=/usr/bin/vacation -j -m /home/vacation/.vacation.msg -f /home/vacation/.vacation.db vacation I know using the -j is a little bit risky according to man page, but I'm kind of testing here.

    Read the article

  • Sending a UDP message to a computer inside a network

    - by Dan
    Say I have the ip and mac address of a computer inside a network and I wish to send him a UDP message. By initializing the mac and ip addresses of the sent message to the given, when the network router recives the message he should pass it to the computer with the same mac address...right? Im asking becuase a program I write dosent seem to handle this limitation. it works great when its on the same network, but otherwise ...nada. Thanks

    Read the article

  • Message Date/Time tag in Lotus Notes

    - by TeeKay
    I've noticed that within Notes (8.5.2, basic client, fat client and iNotes) the date/time displayed on the eMail envelope AND the date/time on the message header is the same and appearently that time that Domino received the message. When using BES, the message forwarded to the BlackBerry by Domino/BES has the RECEIVED date/time on the envelope and the SENT date/time displayed in the message. In the basic/fat client with properties the sent time is viewable in one of the "Received" tags. Having the sent time easily viewable is helpful, especially if your trying to trouble-shoot a problem. Is this a configuration feature? Is it selectable in the client or in Domino? Thx

    Read the article

  • "killed" message from cron.daily, but not when run from command line

    - by Dan Stahlke
    On Fedora 17, I put a file into /etc/cron.daily with the following contents: cd / su dstahlke /home/dstahlke/bin/anacron-daily.sh exit 0 For some reason, I get a mail every day that just says /etc/cron.daily/dstahlke-daily: ...killed. I tried with and without the exit 0 line above (I noticed that some system scripts have that and others don't, I'm not sure of the purpose). Running /etc/cron.daily/dstahlke-daily from the command line as root produces no ...killed message. Other than the message, everything seems to work fine. Putting set -x in the above script, as well as in the /home/dstahlke/bin/anacron-daily.sh script shows that the ...killed message happens just after the latter script terminates (or perhaps just after the su command finishes). What causes the ...killed message? Or, is there a more acceptable way to have anacron run a user script daily? I figured that putting this in /etc/cron.daily would help the system coordinate all of the daily tasks rather than potentially running my task concurrently with the system tasks.

    Read the article

  • How to set original error message for apache 2.2

    - by ffffff
    Apache 2.2 default 414 message is Request-URI Too Large The requested URL's length exceeds the capacity limit for this server. I wanna set custom message so I set http.conf ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var But I do not get along well How to set original error message for apache 2.2

    Read the article

  • Changing the modified date of a message in Exchange 2010

    - by jgoldschrafe
    My organization is in the middle of a process to move their Exchange 2010 messaging system from one archiving platform to another. As part of this process, we need to restore all archived messages back into users' email accounts, and then let the new system import them again. The problem is that when the messages are dumped back, the modified date on the message is set to the date it was restored, which trips up message archiving and basically means nobody will have anything archived for six months. So you don't have to ask: no, our archiving platform only uses the modified timestamp on the message and cannot be altered to temporarily use the sent or received timestamp instead to determine whether to archive it. We and others have asked for the feature, but it doesn't exist right now. What we're looking for is a method to go through the user's mailbox and alter the modified timestamp of each message (or preferably received more than X months ago) to the received date of the message. We also don't want to spend more on this tool per user than we're spending on the archiving solution in the first place. We've run across a few tools that are something ridiculous like $25 per user. I don't think we're even paying close to that for Exchange and the archiving solution put together. Whatever we settle on should function on a live mailbox with no downtime. Playing around with PST imports and hacky little things like that isn't going to work. We're fine with programming/scripting, if anyone knows the best way through PowerShell, COM automation or some other way to best handle this.

    Read the article

  • Error Handling in T-SQL Scalar Function

    - by hydroparadise
    Ok.. this question could easily take multiple paths, so I will hit the more specific path first. While working with SQL Server 2005, I'm trying to create a scalar funtion that acts as a 'TryCast' from varchar to int. Where I encounter a problem is when I add a TRY block in the function; CREATE FUNCTION u_TryCastInt ( @Value as VARCHAR(MAX) ) RETURNS Int AS BEGIN DECLARE @Output AS Int BEGIN TRY SET @Output = CONVERT(Int, @Value) END TRY BEGIN CATCH SET @Output = 0 END CATCH RETURN @Output END Turns out theres all sorts of things wrong with this statement including "Invalid use of side-effecting or time-dependent operator in 'BEGIN TRY' within a function" and "Invalid use of side-effecting or time-dependent operator in 'END TRY' within a function". I can't seem to find any examples of using try statements within a scalar function, which got me thinking, is error handling in a function is possible? The goal here is to make a robust version of the Convert or Cast functions to allow a SELECT statement carry through depsite conversion errors. For example, take the following; CREATE TABLE tblTest ( f1 VARCHAR(50) ) GO INSERT INTO tblTest(f1) VALUES('1') INSERT INTO tblTest(f1) VALUES('2') INSERT INTO tblTest(f1) VALUES('3') INSERT INTO tblTest(f1) VALUES('f') INSERT INTO tblTest(f1) VALUES('5') INSERT INTO tblTest(f1) VALUES('1.1') SELECT CONVERT(int,f1) AS f1_num FROM tblTest DROP TABLE tblTest It never reaches point of dropping the table because the execution gets hung on trying to convert 'f' to an integer. I want to be able to do something like this; SELECT u_TryCastInt(f1) AS f1_num FROM tblTest fi_num __________ 1 2 3 0 5 0 Any thoughts on this? Is there anything that exists that handles this? Also, I would like to try and expand the conversation to support SQL Server 2000 since Try blocks are not an option in that scenario. Thanks in advance.

    Read the article

  • ASP.net FFMPEG video conversion receiving error: "Error number -2 occurred"

    - by Pete
    Hello, I am attempting to integrate FFMPEG into my asp.net website. The process I am trying to complete is to upload a video, check if it is .avi, .mov, or .wmv and then convert this video into an mp4 using x264 so my flash player can play it. I am using an http handler (ashx) file to handle my upload. This is where I am also putting my conversion code. I am not sure if this is the best place to put it, but I wanted to see if i could at least get it working. Additionally, I was able to complete the conversion manually through cmd line. The error -2 comes up when i output the standard error from the process I executed. This is the error i receive: FFmpeg version SVN-r23001, Copyright (c) 2000-2010 the FFmpeg developers built on May 1 2010 06:06:15 with gcc 4.4.2 configuration: --enable-memalign-hack --cross-prefix=i686-mingw32- --cc=ccache-i686-mingw32-gcc --arch=i686 --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-libopencore_amrnb libavutil 50.15. 0 / 50.15. 0 libavcodec 52.66. 0 / 52.66. 0 libavformat 52.61. 0 / 52.61. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.10. 0 / 0.10. 0 532010_Robotica_720.wmv: Error number -2 occurred here is the code below: <%@ WebHandler Language="VB" Class="upload" %> Imports System Imports System.Web Imports System.IO Imports System.Diagnostics Imports System.Threading Public Class upload : Implements IHttpHandler Public currentTime As System.DateTime Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest currentTime = System.DateTime.Now If (Not context.Request.Files("Filedata") Is Nothing) Then Dim file As HttpPostedFile : file = context.Request.Files("Filedata") Dim targetDirectory As String : targetDirectory = HttpContext.Current.Server.MapPath(context.Request("folder")) Dim targetFilePath As String : targetFilePath = Path.Combine(targetDirectory, currentTime.Month & currentTime.Day & currentTime.Year & "_" & file.FileName) Dim fileNameArray As String() fileNameArray = Split(file.FileName, ".") If (System.IO.File.Exists(targetFilePath)) Then System.IO.File.Delete(targetFilePath) End If file.SaveAs(targetFilePath) Select Case fileNameArray(UBound(fileNameArray)) Case "avi", "mov", "wmv" Dim fileargs As String = fileargs = "-y -i " & currentTime.Month & currentTime.Day & currentTime.Year & "_" & file.FileName & " -ab 96k -vcodec libx264 -vpre normal -level 41 " fileargs += "-crf 25 -bufsize 20000k -maxrate 25000k -g 250 -r 20 -s 900x506 -coder 1 -flags +loop " fileargs += "-cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 7 -me_range 16 -keyint_min 25 " fileargs += "-sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -bf 16 -b_strategy 1 -bidir_refine 1 " fileargs += "-refs 6 -deblockalpha 0 -deblockbeta 0 -f mp4 " & currentTime.Month & currentTime.Day & currentTime.Year & "_" & file.FileName & ".mp4" Dim proc As New Diagnostics.Process() proc.StartInfo.FileName "ffmpeg.exe" proc.StartInfo.Arguments = fileargs proc.StartInfo.UseShellExecute = False proc.StartInfo.CreateNoWindow = True proc.StartInfo.RedirectStandardOutput = True proc.StartInfo.RedirectStandardError = True AddHandler proc.OutputDataReceived, AddressOf SaveTextToFile proc.Start() SaveTextToFile2(proc.StandardError.ReadToEnd()) proc.WaitForExit() proc.Close() End Select Catch ex As System.IO.IOException Thread.Sleep(2000) GoTo Conversion Finally context.Response.Write("1") End Try End If End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property Private Shared Sub SaveTextToFile(ByVal sendingProcess As Object, ByVal strData As DataReceivedEventArgs) Dim FullPath As String = "text.txt" Dim Contents As String = "" Dim objReader As StreamWriter objReader = New StreamWriter(FullPath) If Not String.IsNullOrEmpty(strData.Data) Then objReader.Write(Environment.NewLine + strData.Data) End If objReader.Close() End Sub Private Sub SaveTextToFile2(ByVal strData As String) Dim FullPath As String = "texterror.txt" Dim Contents As String = "" Dim objReader As StreamWriter objReader = New StreamWriter(FullPath) objReader.Write(Environment.NewLine + strData) objReader.Close() End Sub End Class

    Read the article

  • Could not load type from assembly error

    - by George Mauer
    I have written the following simple test in trying to learn Castle Windsor's Fluent Interface: using NUnit.Framework; using Castle.Windsor; using System.Collections; using Castle.MicroKernel.Registration; namespace WindsorSample { public class MyComponent : IMyComponent { public MyComponent(int start_at) { this.Value = start_at; } public int Value { get; private set; } } public interface IMyComponent { int Value { get; } } [TestFixture] public class ConcreteImplFixture { [Test] public void ResolvingConcreteImplShouldInitialiseValue() { IWindsorContainer container = new WindsorContainer(); container.Register(Component.For<IMyComponent>().ImplementedBy<MyComponent>().Parameters(Parameter.ForKey("start_at").Eq("1"))); IMyComponent resolvedComp = container.Resolve<IMyComponent>(); Assert.AreEqual(resolvedComp.Value, 1); } } } When I execute the test through TestDriven.NET I get the following error: System.TypeLoadException : Could not load type 'Castle.MicroKernel.Registration.IRegistration' from assembly 'Castle.MicroKernel, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'. at WindsorSample.ConcreteImplFixture.ResolvingConcreteImplShouldInitialiseValue() When I execute the test through the NUnit GUI I get: WindsorSample.ConcreteImplFixture.ResolvingConcreteImplShouldInitialiseValue: System.IO.FileNotFoundException : Could not load file or assembly 'Castle.Windsor, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The system cannot find the file specified. If I open the Assembly that I am referencing in Reflector I can see its information is: Castle.MicroKernel, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc and that it definitely contains Castle.MicroKernel.Registration.IRegistration What could be going on? I should mention that the binaries are taken from the latest build of Castle though I have never worked with nant so I didn't bother re-compiling from source and just took the files in the bin directory. I should also point out that my project compiles with no problem.

    Read the article

  • SQL Server 2005 and 'General network error'

    - by Mariusz
    I know there is a lot of information in the Internet about solving this problem, but it didn't help me. My Delphi application uses dbExpress controls to access the database and execute SQL queries. Once every couple of days, however, it stops working because the database connection fails. This happens on several different computers with different versions of Windows. MSSQL Server 2005 (version 9.0.4035) is installed on each of them. The above mentioned application executes queries every couple of seconds, and they are mainly insert commands. Every couple of days I get a series of exceptions like the following one: [DBNETLIB][ConnectionOpen (PreLoginHandshake()).]General network error. Check your network documentation. And then the SQL server becomes inaccessible until I restart it manually. The information I found in the Internet say that I should install some service packs, change some registry entries etc., but believe me, none of these helps and I don't know what else to do now. Could you please help me solve this problem? Any clues or ideas? I can give you some more information about the server or the application if necessary. Thank you very much in advance.

    Read the article

  • PHP Codeigniter Undefined Offset Error

    - by Matt
    Hello, I am building a Codeigniter shopping cart. On the cart details page I have a form input field allowing the user to type in the quantity required of a product, and a submit button to post the information to the update function. When there is just one item in the cart, when updating the quantity everything works as it should. However, when there is more than one item, changing the quantity of an item and clicking submit results in a ‘Undefined Offset 1: error on the following code in the Model (specifically the two lines within the array) : function validate_update_cart() { $total = $this->cart->total_items(); $item = $this->input->post('rowid'); $qty = $this->input->post('qty'); for($i=0;$i < $total;$i++) { $data = array( 'rowid' => $item[$i], 'qty' => $qty[$i] ); $this->cart->update($data); } } This is the View code to which the above refers: <form action="<?php echo base_url(); ?>home/update" method="post"> <div><input type="hidden" name="rowid[]" value="<?php echo $item['rowid']; ?>"/></div> <div><input type="text" name="qty[]" value="<?php echo $item['qty']; ?>" maxlength="2" class="chg-qty"/></div> <div><input type="submit" value="update" class="update-quantity"/></div> </form> And this is the Controller: function update() { $this->products_model->validate_update_cart(); redirect('cart'); } Please can anyone explain why this is happening? Many thanks, Matt

    Read the article

  • FileSystem.GetFiles() + UnauthorizedAccessException error?

    - by OverTheRainbow
    Hello, It seems like FileSystem.GetFiles() is unable to recover from the UnauthorizedAccessException exception that .Net triggers when trying to access an off-limit directory. In this case, does it mean this class/method isn't useful when scanning a whole drive and I should use some other solution (in which case: Which one?)? Here's some code to show the issue: Private Sub bgrLongProcess_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgrLongProcess.DoWork Dim drive As DriveInfo Dim filelist As Collections.ObjectModel.ReadOnlyCollection(Of String) Dim filepath As String 'Scan all fixed-drives for MyFiles.* For Each drive In DriveInfo.GetDrives() If drive.DriveType = DriveType.Fixed Then Try 'How to handle "Access to the path 'C:\System Volume Information' is denied." error? filelist = My.Computer.FileSystem.GetFiles(drive.ToString, FileIO.SearchOption.SearchAllSubDirectories, "MyFiles.*") For Each filepath In filelist DataGridView1.Rows.Add(filepath.ToString, "temp") 'Trigger ProgressChanged() event bgrLongProcess.ReportProgress(0, filepath) Next filepath Catch Ex As UnauthorizedAccessException 'How to ignore this directory and move on? End Try End If Next drive End Sub Thank you. Edit: What about using a Try/Catch just to have GetFiles() fill the array, ignore the exception and just resume? Private Sub bgrLongProcess_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgrLongProcess.DoWork 'Do lengthy stuff here Dim filelist As Collections.ObjectModel.ReadOnlyCollection(Of String) Dim filepath As String filelist = Nothing Try filelist = My.Computer.FileSystem.GetFiles("C:\", FileIO.SearchOption.SearchAllSubDirectories, "MyFiles.*") Catch ex As UnauthorizedAccessException 'How to just ignore this off-limit directory and resume searching? End Try 'Object reference not set to an instance of an object For Each filepath In filelist bgrLongProcess.ReportProgress(0, filepath) Next filepath End Sub

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >