Search Results

Search found 9320 results on 373 pages for 'task managers'.

Page 7/373 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • 8 Things You Didn’t Know You Could Do In Windows 7's Task Manager

    - by Chris Hoffman
    The Windows Task Manager is often used for troubleshooting – perhaps closing an application that isn’t working properly or monitoring system resource usage. However, there’s a lot more you can do with Windows 7’s Task Manager. To quickly open the Task Manager, right-click your taskbar and select Start Task Manager. You can also press Ctrl+Shift+Esc to quickly launch the Task Manager with a keyboard shortcut. Windows 8 may have a great new task manager, but Windows 7’s is still useful. HTG Explains: Is ReadyBoost Worth Using? HTG Explains: What The Windows Event Viewer Is and How You Can Use It HTG Explains: How Windows Uses The Task Scheduler for System Tasks

    Read the article

  • Server 2008 Task Scheduler Mapped Drive Access C#

    - by user219313
    I'm trying do get Server 2008's Task Scheduler to run a C# console app which backs up data to a mapped backup drive somewhere on FastHosts network. I've written a test app which simply does this Directory.CreateDirectory("Z:\" + DateTime.Now.Ticks.ToString()); i.e. just creates a directory on the root of this Z drive. This works fine when I just run the .exe but when I schedule it in Task Scheduler it says the task has completed with return code 3762507597 - I can't find any info on what this means. I'm running the task with the highest Admin privelages as far as I can see.

    Read the article

  • Rails - Help with rake task

    - by jyoseph
    I have a rake task I need to run in order to sanitize (remove forward slashes) some data in the database. Here's the task: namespace :db do desc "Remove slashes from old-style URLs" task :substitute_slashes => :environment do puts "Starting" contents = Content.all contents.each do |c| if c.permalink != nil c.permalink.gsub!("/","") c.save! end end puts "Finished" end end Which allows me to run rake db:substitute_slashes --trace If I do puts c.permalink after the gsub! I can see it's setting the attribute properly. However the save! doesn't seem to be working because the data is not changed. Can someone spot what the issue may be? Another thing, I have paperclip installed and this task is triggering [paperclip] Saving attachments. which I would rather avoid.

    Read the article

  • Get an error when trying to set the build version with the AssemblyInfo Task

    - by Glenn Slaven
    I've added the AssemblyInfo Task reference to my C# project file (VS2008 .NET 3.5), but when I build I get the following error The "AssemblyInfo" task failed unexpectedly. System.ArgumentException: version Parameter name: The specified string is not a valid version number at Microsoft.Build.Extras.Version.ParseVersion(String version) at Microsoft.Build.Extras.AssemblyInfo.Execute() at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) My assemblyinfo file has these two attributes: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

    Read the article

  • Parallel Task Library WaitAny Design

    - by colithium
    I've just begun to explore the PTL and have a design question. My Scenario: I have a list of URLs that each refer to an image. I want each image to be downloaded in parallel. As soon as at least one image is downloaded, I want to execute a method that does something with the downloaded image. That method should NOT be parallelized -- it should be serial. I think the following will work but I'm not sure if this is the right way to do it. Because I have separate classes for collecting the images and for doing "something" with the collected images, I end up passing around an array of Tasks which seems wrong since it exposes the inner workings of how images are retrieved. But I don't know a way around it. In reality there is more to both of these methods but that's not important for this. Just know that they really shouldn't be lumped into one large method that both retrieves and does something with the image. Task<Image>[] downloadTasks = collector.RetrieveImages(listOfURLs); for (int i = 0; i < listOfURLs.Count; i++) { //Wait for any of the remaining downloads to complete int completedIndex = Task<Image>.WaitAny(downloadTasks); Image completedImage = downloadTasks[completedIndex].Result; //Now do something with the image (this "something" must happen serially) } /////////////////////////////////////////////////// public Task<Image>[] RetrieveImages(List<string> urls) { Task<Image>[] tasks = new Task<Image>[urls.Count]; int index = 0; foreach (string url in urls) { string lambdaVar = url; //Required... Bleh tasks[index] = Task<Image>.Factory.StartNew(() => { using (WebClient client = new WebClient()) { //TODO: Replace with live image locations string fileName = String.Format("{0}.png", i); client.DownloadFile(lambdaVar, Path.Combine(Application.StartupPath, fileName)); } return Image.FromFile(Path.Combine(Application.StartupPath, fileName)); }, TaskCreationOptions.LongRunning | TaskCreationOptions.AttachedToParent); index++; } return tasks; }

    Read the article

  • Need Help finding an appropriate task asignment algoritm for a collage project involving coordinatin

    - by Trif Mircea
    Hello. I am a long time lurker here and have found over time many answers regarding jquery and web development topics so I decided to ask a question of my own. This time I have to create a c++ project for collage which should help manage the workflow of a company providing all kinds of services through in the field teams. The ideas I have so far are: client-server application; the server is a dispatcher where all the orders from clients get and the clients are mobile devices (PDAs) each team in the field having one a order from a client is a task. Each task is made up of a series of subtasks. You have a database with estimations on how long a task should take to complete you also know what tasks or subtasks each team on the field can perform based on what kind of specialists made up the team (not going to complicate the problem by adding needed materials, it is considered that if a member of a team can perform a subtask he has the stuff needed) Now knowing these factors, what would a good task assignment algorithm be? The criteria is: how many tasks can a team do, how many tasks they have in the queue, it could also be location, how far away are they from the place but I don't think I can implement that.. It needs to be efficient and also to adapt quickly is the human dispatcher manually assigns a task. Any help or leads would be really appreciated. Also I'm not 100% sure in the idea so if you have another way you would go about creating such an application please share, even if it just a quick outline. I have to write a theoretical part too so even if the ideas are far more complex that what i outlined that would be ok ; I'd write those and implement what I can.

    Read the article

  • Need Help finding an appropriate task assignment algorithm for a college project involving coordinat

    - by Trif Mircea
    I am a long time lurker here and have found over time many answers regarding jquery and web development topics so I decided to ask a question of my own. This time I have to create a c++ project for college which should help manage the workflow of a company providing all kinds of services through in the field teams. The ideas I have so far are: client-server application; the server is a dispatcher where all the orders from clients get and the clients are mobile devices (PDAs) each team in the field having one a order from a client is a task. Each task is made up of a series of subtasks. You have a database with estimations on how long a task should take to complete you also know what tasks or subtasks each team on the field can perform based on what kind of specialists made up the team (not going to complicate the problem by adding needed materials, it is considered that if a member of a team can perform a subtask he has the stuff needed) Now knowing these factors, what would a good task assignment algorithm be? The criteria is: how many tasks can a team do, how many tasks they have in the queue, it could also be location, how far away are they from the place but I don't think I can implement that.. It needs to be efficient and also to adapt quickly is the human dispatcher manually assigns a task. Any help or leads would be really appreciated. Also I'm not 100% sure in the idea so if you have another way you would go about creating such an application please share, even if it just a quick outline. I have to write a theoretical part too so even if the ideas are far more complex that what i outlined that would be ok ; I'd write those and implement what I can. Edit: C++ is the only language I know unfortunately.

    Read the article

  • How do programmers deal with Project Lead/Managers?

    - by Simon
    Project Managers/Technical Leads sometimes tend to be over enthusiastic when it comes to software. But during code reviews if instead of functionality of the code the only complain one hears is about formatting/spacing and similar trivial things, when there are far better things to discuss (Among other things I have noticed the sometimes during the so called "reviews" suggestions are made that implementation needs a re-write just because it doesnt use the most happening technology/buzzword) How do fellow programmers deal with such scenarios? or is this just a one off? (or is the fault entirely on me )If you have similar experience and what you did to overcome it? Feel free to share.

    Read the article

  • Read attributes of MSBuild custom tasks via events in the Logger

    - by gt
    I am trying to write a MSBuild logger module which logs information when receiving TaskStarted events about the Task and its parameters. The build is run with the command: MSBuild.exe /logger:MyLogger.dll build.xml Within the build.xml is a sequence of tasks, most of which have been custom written to compile a (C++ or C#) solution, and are accessed with the following custom Task: <DoCompile Desc="Building MyProject 1" Param1="$(Param1Value)" /> <DoCompile Desc="Building MyProject 2" Param1="$(Param1Value)" /> <!-- etc --> The custom build task DoCompile is defined as: public class DoCompile : Microsoft.Build.Utilities.Task { [Required] public string Description { set { _description = value; } } // ... more code here ... } Whilst the build is running, as each task starts, the logger module receives IEventSource.TaskStarted events, subscribed to as follows: public class MyLogger : Microsoft.Build.Utilities.Logger { public override void Initialize(Microsoft.Build.Framework.IEventSource eventSource) { eventSource.TaskStarted += taskStarted; } private void taskStarted(object sender, Microsoft.Build.Framework.TaskStartedEventArgs e) { // write e.TaskName, attributes and e.Timestamp to log file } } The problem I have is that in the taskStarted() method above, I want to be able to access the attributes of the task for which the event was fired. I only have access to the logger code and cannot change either the build.xml or the custom build tasks. Can anyone suggest a way I can do this?

    Read the article

  • Game Components, Game Managers and Object Properties

    - by George Duckett
    I'm trying to get my head around component based entity design. My first step was to create various components that could be added to an object. For every component type i had a manager, which would call every component's update function, passing in things like keyboard state etc. as required. The next thing i did was remove the object, and just have each component with an Id. So an object is defined by components having the same Ids. Now, i'm thinking that i don't need a manager for all my components, for example i have a SizeComponent, which just has a Size property). As a result the SizeComponent doesn't have an update method, and the manager's update method does nothing. My first thought was to have an ObjectProperty class which components could query, instead of having them as properties of components. So an object would have a number of ObjectProperty and ObjectComponent. Components would have update logic that queries the object for properties. The manager would manage calling the component's update method. This seems like over-engineering to me, but i don't think i can get rid of the components, because i need a way for the managers to know what objects need what component logic to run (otherwise i'd just remove the component completely and push its update logic into the manager). Is this (having ObjectProperty, ObjectComponent and ComponentManager classes) over-engineering? What would be a good alternative?

    Read the article

  • Awesome and LXDE desktop managers messed up KDE

    - by Caleb1994
    I saw a desktop manager named "Awesome" earlier on Google+, and thought I'd give it a try. In short, I didn't like it, but it got me wondering what other desktops were like, which I hadn't tried. The first one to come to mind was LXDE. I installed that, and tried it. I wasn't a big fan, so I just went to log back into KDE. Only, when I log in, everything is screwy. My theme is weird (although, according to system settings, it is still the same). All the categories and application short cuts in the KMenu are gone, except my favorites, which are now renamed with the "short name", it seems. I know these things are global resources, so it is very likely that one of these Window Managers screwed it up, but I need it fixed. Actually, it seems that after restarting the theme problem fixed itself, but the KMenu items disappearing is still a problem. Does anyone know where these items are stored? (I know they are are just .desktop files somewhere, IIRC, but I don't remember where they are usually stored so I can see if they are still there). I'm hoping it's just a matter of a broken link or something somewhere, not deleted shortcuts... :/ In summary: Any ideas on what caused this? Do you know how to fix the KMenu, or at least where the .desktop shortcuts are stored for the KMenu so I can see if they still exist (crosses fingers).

    Read the article

  • Call HttpWebRequest in another thread as UI with Task class - avoid to dispose object created in Task scope

    - by John
    I would like call HttpWebRequest on another thread as UI, because I must make 200 request or server and downloaded image. My scenation is that I make a request on server, create image and return image. This I make in another thread. I use Task class, but it call automaticaly Dispose method on all object created in task scope. So I return null object from this method. public BitmapImage CreateAvatar(Uri imageUri, int sex) { if (imageUri == null) return CreateDefaultAvatar(sex); BitmapImage image = null; new Task(() => { var request = WebRequest.Create(imageUri); var response = request.GetResponse(); using (var stream = response.GetResponseStream()) { Byte[] buffer = new Byte[response.ContentLength]; int offset = 0, actuallyRead = 0; do { actuallyRead = stream.Read(buffer, offset, buffer.Length - offset); offset += actuallyRead; } while (actuallyRead > 0); image = new BitmapImage { CreateOptions = BitmapCreateOptions.None, CacheOption = BitmapCacheOption.OnLoad }; image.BeginInit(); image.StreamSource = new MemoryStream(buffer); image.EndInit(); image.Freeze(); } }).Start(); return image; } How avoid it? Thank Mr. Jon Skeet try this: private Stream GetImageStream(Uri imageUri) { Byte[] buffer = null; //new Task(() => //{ var request = WebRequest.Create(imageUri); var response = request.GetResponse(); using (var stream = response.GetResponseStream()) { buffer= new Byte[response.ContentLength]; int offset = 0, actuallyRead = 0; do { actuallyRead = stream.Read(buffer, offset, buffer.Length - offset); offset += actuallyRead; } while (actuallyRead > 0); } //}).Start(); return new MemoryStream(buffer); } It return object which is null a than try this: private Stream GetImageStream(Uri imageUri) { Byte[] buffer = null; new Task(() => { var request = WebRequest.Create(imageUri); var response = request.GetResponse(); using (var stream = response.GetResponseStream()) { buffer= new Byte[response.ContentLength]; int offset = 0, actuallyRead = 0; do { actuallyRead = stream.Read(buffer, offset, buffer.Length - offset); offset += actuallyRead; } while (actuallyRead > 0); } }).Start(); return new MemoryStream(buffer); } Method above return null

    Read the article

  • Problem with creation of scheduled task from IIS6 on SR2003

    - by Morten Louw Nielsen
    Hi, I have also posted this question on stackoverflow, but will also try here, since it might be more system-related I am writing a webapplication using .NET. The webapp creates scheduled tasks using the System.Diagnostics.Process class, calling SCHTASKS.EXE with parameters. I have changed the identity on the app pool, to a specific domain user. The domain-user is local administrator on all the four webservers. From webserver01 I am creating tasks on webserver01 to webserver04. It works perfect for 3-5 days, but then it breaks. It gives me the following errormessage in a messagebox: "The application failed to initialize properly (0xc0000142). Click on OK to terminate the application." If I have the system in the broken state, and I change the identity of the app pool to Domain administrator, it works. As I change it back to my domain-user, it breaks again. If I reboot the server, it works again for the same amount of days, but will break again. It seems like a permission-related problem. I just don't understand why it works sometimes, and sometimes doesn't. I hope someone outthere has seen this problem! Looking forward to hear from you! Kind regards, Morten, Denmark

    Read the article

  • scheduled task share permissions

    - by Enriquev
    Hello, I would like to know if there is a way I can share : \\server\Scheduled Tasks On server 2003 with normal users, cause as far as I can tell it seems only administrators can see this share, is there anyway I can change this share's permission and add users or groups? I know I can change permission on the jobs themselves, but normal users don't see the folder at all, so they cant access the jobs... Thank You.

    Read the article

  • Cron - run task every 90 min.

    - by Cory J
    Trying to adjust a cron job to run every 90 min. It was previously running every 20 min, which was a simple cron job: */20 * * * * whatever To change it to every 90, it seems like I need to split it into 2 jobs, I've done this: 0 0,3,6,9 * * * whatever 30 1,4,7,10 * * * whatever Is this right? The job doesn't seem to kick off.

    Read the article

  • Group Policy Task Schedule deployed to User Configuration not working, works when in Computer Configuration?

    - by user80130
    I added a Scheduled Task on my Windows 2008 R2 Domain Controller in the Group Policy Manager: MyDomain Policy User Configuration Preferences Control Panel Settings Scheduled Tasks Basic Task, like starting notepad, when user unlocks his workstation. This should show up in the client workstation's task scheduler, but it dosn't. No errors or anything like that. If I use the "Computer Configuration" instead of "User Configuration" the task appears, and I'm able to run the task. I've tried the gpupdate /force followed by gpresult and checked the report, but it dosn't contain the GPO Scheduled Tasks I created? (again, does show up when using "Computer Configuration".) The issue is that I have to run the application in the current users context, and only on a specific Employee OU, and thereby limit this task only to Employee Workstations and not apply the application when the same employee log on to internal servers and such. Primary domain dontroller is a Windows 2008 R2, workstations Windows 7 Enterprise. What am I doing wrong ?

    Read the article

  • System 67 error scheduled task to transfer files

    - by grom
    Running directly on command line the batch script works. But when scheduled to run (Windows 2003 R2 server) as the local administrator, I get the following error: D:\ScadaExport\exported>ping 192.168.10.78 Pinging 192.168.10.78 with 32 bytes of data: Reply from 192.168.10.78: bytes=32 time=11ms TTL=61 Reply from 192.168.10.78: bytes=32 time=15ms TTL=61 Reply from 192.168.10.78: bytes=32 time=29ms TTL=61 Reply from 192.168.10.78: bytes=32 time=10ms TTL=61 Ping statistics for 192.168.10.78: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 10ms, Maximum = 29ms, Average = 16ms D:\ScadaExport\exported>net use Z: \\192.168.10.78\bar-pccommon\scada\ System error 67 has occurred. The network name cannot be found. Any ideas? Google is turning up nothing useful, just keep finding results relating to DNS etc, but using IP address here.

    Read the article

  • Windows scheduler - Tasks not running when user not logged in

    - by Glinkot
    I have Windows Server 2003, with schedules setup via Remote Desktop under one account. That account appears in the 'creator' column too. I have 'Run only if logged on' unticked. When I have logged in under that account and then 'disconnected' leaving the the session alive, the schedule runs. But every time the server is rebooted, the task again fails to run until I again log in and disconnect. Any KB fixes I've missed or issues I've overlooked? Normally I only discover the issue when a user tells me the schedule has stopped running so it's a real reliability issue. I'd also be happy with an answer suggesting an alternative scheduler with higher reliability. Thanks

    Read the article

  • Scheduled Jobs during hours of autumn time change

    - by NealWalters
    I'm wondering how other people deal with this scenario. What if you have a job scheduled to run at 1:30 am. In the autumn, when time changes, the hour of 1:00:00 to 1:59:59 repeats itself and so that job would run twice. Could be Windows Task Scheduler, SQL Agent or any other scheduling tool. Most of these tools seem to be based on machine time, not UTC time. If I told it to run the job at UTC time each night, then I wouldn't have the duplicate hour issue.

    Read the article

  • Unable to remotely schedule tasks from the command line

    - by Eptin
    I'm on a Windows 7 machine, attempting to use the command line to schedule a task on another Windows 7 machine in my company's network. I have administrative-level credentials for both computers. With help from http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357.aspx I have created this line to run on the command prompt: schtasks /Create /S machinename /U username /P password /SC ONCE /TN Test1 /TR C:\Windows\System32\calc.exe /ST 16:30 Whenever I launch that, I get the following error: ERROR: User credentials are not allowed on the local machine. How can I fix this?

    Read the article

  • How to run software, that is not offered though package managers, that requires ia32-libs

    - by Onno
    I'm trying to install the Arma 2 OA dedicated server on a Virtualbox VM so I can test my own missions in a sandbox environment in a way that lets me offload them to another computer in my network. (The other computer is running the VM, but it's a windows machine, and I didn't want to hassle with its installation) It needs at least 2, and preferably 4GB of ram, so I thought I would install the AMD64 version of ubuntu 13.10 to get this going. 'How do you run a 32-bit program on a 64-bit version of Ubuntu?' already explained how to install 32bit software though apt-get and/or dpkg, but that doesn't apply in this case. The server is offered as a compressed download on the site of BI Studio, the developer of the Arma games. Its installation instructions are obviously slightly out of date with the current state of the art. (probably because the state of the art has been updated quite recently :) ) It states that I have to install ia32-libs, which has now apparently been deprecated. Now I have to find out how to get the right packages installed to make sure that it will run. My experience level is like novice-intermediate when it comes to these issues. I've installed a lot of packages though apt-get; I've solved dependency issues in the past; I haven't installed much software without using package managers. I can handle myself with basic administrative work like editing conf files and such. I have just gone ahead and tried to install it without installing ia32-libs through apt-get but to install gcc to get the libs after all. My reasoning being that gcc will include the files for backward compatibility coding and on linux all libs are (as far as I can tell) installed at a system level in /libs . So far it seems to start up. (I can connect with the game server trough my in-game network browser, so it's communicating) I'm not sure if there's any dependency checking going on when running the game server program, so I'm left with a couple of questions: Does 13.10 catch any calls to ia32libs libraries and translate the calls to the right code on amd64? If it runs, does that mean that all required libraries have been loaded correctly, or is there a change of it crashing later on when a library that was needed is missing after all? Is it necessary to do a workaround such as installing gcc? How do I find out what libraries I might need to run this software? (or any other piece of 32-bit software that isn't offered through a package manager)

    Read the article

  • Overriding MSBuildExtensionsPath in the MSBuild task is flaky

    - by Stuart Lange
    This is already cross-posted at MS Connect: https://connect.microsoft.com/VisualStudio/feedback/details/560451 I am attempting to override the property $(MSBuildExtensionsPath) when building a solution containing a C# web application project via msbuild. I am doing this because a web application csproj file imports the file "$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets". This file is installed by Visual Studio to the standard $(MSBuildExtensionsPath) location (C:\Program Files\MSBuild). I would like to eliminate the dependency on this file being installed on the machine (I would like to keep my build servers as "clean" as possible). In order to do this, I would like to include the Microsoft.WebApplication.targets in source control with my project, and then override $(MSBuildExtensionsPath) so that the csproj will import this included version of Microsoft.WebApplication.targets. This approach allows me to remove the dependency without requiring me to manually modify the web application csproj file. This scheme works fine when I build my solution file from the command line, supplying the custom value of $(MSBuildExtensionsPath) at the command line to msbuild via the /p flag. However, if I attempt to build the solution using the MSBuild task in a custom msbuild project file (overriding MSBuildExtensionsPath using the "Properties" attribute), it fails because the web app csproj file is attempting to import the Microsoft.WebApplication.targets from the "standard" Microsoft.WebApplication.targets location (C:\Program Files\MSBuild). Notably, if I run msbuild using the "Exec" task in my custom project file, it works. Even more notably, the FIRST time I run the build using the "MSBuild" task AFTER I have run the build using the "EXEC" task (or directly from the command line), the build works. Has anyone seen behavior like this before? Am I crazy? Is anyone aware of the root cause of this problem, a possible workaround, or whether this is a legitimate bug in MSBuild?

    Read the article

  • Parallelism in .NET – Part 20, Using Task with Existing APIs

    - by Reed
    Although the Task class provides a huge amount of flexibility for handling asynchronous actions, the .NET Framework still contains a large number of APIs that are based on the previous asynchronous programming model.  While Task and Task<T> provide a much nicer syntax as well as extending the flexibility, allowing features such as continuations based on multiple tasks, the existing APIs don’t directly support this workflow. There is a method in the TaskFactory class which can be used to adapt the existing APIs to the new Task class: TaskFactory.FromAsync.  This method provides a way to convert from the BeginOperation/EndOperation method pair syntax common through .NET Framework directly to a Task<T> containing the results of the operation in the task’s Result parameter. While this method does exist, it unfortunately comes at a cost – the method overloads are far from simple to decipher, and the resulting code is not always as easily understood as newer code based directly on the Task class.  For example, a single call to handle WebRequest.BeginGetResponse/EndGetReponse, one of the easiest “pairs” of methods to use, looks like the following: var task = Task.Factory.FromAsync<WebResponse>( request.BeginGetResponse, request.EndGetResponse, null); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The compiler is unfortunately unable to infer the correct type, and, as a result, the WebReponse must be explicitly mentioned in the method call.  As a result, I typically recommend wrapping this into an extension method to ease use.  For example, I would place the above in an extension method like: public static class WebRequestExtensions { public static Task<WebResponse> GetReponseAsync(this WebRequest request) { return Task.Factory.FromAsync<WebResponse>( request.BeginGetResponse, request.EndGetResponse, null); } } This dramatically simplifies usage.  For example, if we wanted to asynchronously check to see if this blog supported XHTML 1.0, and report that in a text box to the user, we could do: var webRequest = WebRequest.Create("http://www.reedcopsey.com"); webRequest.GetReponseAsync().ContinueWith(t => { using (var sr = new StreamReader(t.Result.GetResponseStream())) { string str = sr.ReadLine();; this.textBox1.Text = string.Format("Page at {0} supports XHTML 1.0: {1}", t.Result.ResponseUri, str.Contains("XHTML 1.0")); } }, TaskScheduler.FromCurrentSynchronizationContext());   By using a continuation with a TaskScheduler based on the current synchronization context, we can keep this request asynchronous, check based on the first line of the response string, and report the results back on our UI directly.

    Read the article

  • Killing a deadlocked Task in .NET 4 TPL

    - by Dan Bryant
    I'd like to start using the Task Parallel Library, as this is the recommended framework going forward for performing asynchronous operations. One thing I haven't been able to find is any means of forcible Abort, such as what Thread.Abort provides. My particular concern is that I schedule tasks running code that I don't wish to completely trust. In particular, I can't be sure this untrusted code won't deadlock and therefore I can't be certain if a Task I schedule using this code will ever complete. I want to stay away from true AppDomain isolation (due to the overhead and complexity of marshaling), but I also don't want to leave a Task thread hanging around, deadlocked. Is there a way to do this in TPL?

    Read the article

  • Problem with autocommit in ANT SQL task

    - by Alex Stamper
    I have an SQL script and want to apply it witn ANT task. This script clears out schema, creates new tables and views. The ANT defined task as follows: <sql driver="com.mysql.jdbc.Driver" url="jdbc:mysql://host:3306/smth" userid="smth" password="smth" expandProperties="false" autocommit="true" src="all.sql" > </sql> When this task launches, it shows in log that tables are cleared and created. But when it tries to create first view, it fails with: Failed to execute: CREATE VIEW component... AS SELECT component_raw.id AS MySQLSyntaxErrorException: Table 'component_raw' doesn't exist I have no idea why it fails here. Running this all.sql from MySQL query browser gives no errors. When I launched ANT with -v option, I didn't see any "COMMIT" messages.. Please, help to resolve the problem.

    Read the article

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