Search Results

Search found 5 results on 1 pages for 'srodriguez'.

Page 1/1 | 1 

  • Windows 2008, 2 NICS, routing problem

    - by Srodriguez
    Dear all, I've some questions regarding basic routing, can't seem to relate to other questions posted in this site. My architecture: Windows 2008 server with 2 nics in the server. NIC1: IP 10.198.6.xxx, submask 255.255.252.0, gateway 10.198.4.xxx NIC2: IP 192.168.168.xxx, submask 255.255.255, no gateway defined both NICS are just connected to two separate switches, with other computers. I want to be able that all the requests that have a destination of 192.168.168.xxx are redirected to the NIC2, all the other to the NIC1. I know it's possible to do it with the route command, but normally we have to specify a gateway? (route ADD 192.168.168.0 MASK 255.255.255.0 ???) How can this be archived? Thanks a lot for your help!

    Read the article

  • Enhance Localization performances? (ComponentResourceManager.ApplyResources)

    - by Srodriguez
    Dear all, After experiencing some performances issues on my client side, we decided to give a try to some of the performance profilers to try to find the bottleneck or identify the guilty parts of the code. Of course, as many performance investigations, the problems comes from various things, but something I find out is that the ComponentResourceManager.ApplyResources of my user controls takes way too much time in the construction of my forms: more than 24% of the construction time is spent in the ApplyResources inside the InitializeComponent(). This seems rather a lot for only "finding a resource string and putting it in it's container". What is exactly done in the ComponentResourceManager.ApplyResources ? I guess more than searching the string, if not it wouldn't take that long. Is there a way to enhance the performances of the localization? Our software is localized in several languages, so we do need to keep this multi-lingual feature. Any recommendations regarding this issue? Thanks! PS: We are coding in C#, .NET 3.5 SP1.

    Read the article

  • System.IO.IOException: file used by another process

    - by Srodriguez
    Dear all, I've been working in this small piece of code that seems trivial but still i cannot really see where is the problem. My functions does a pretty simple thing. Opens a file, copy its contents, replace a string inside and copy it back to the original file (a simple search and replace inside a text file then). I didn't really know how to do that as I'm adding lines to the original file, so i just create a copy of the file, (file.temp) copy also a backup (file.temp) then delete the original file(file) and copy the file.temp to file. I get an exception while doing the delete of the file. Here is the sample code: private static bool modifyFile(FileInfo file, string extractedMethod, string modifiedMethod) { Boolean result = false; FileStream fs = new FileStream(file.FullName + ".tmp", FileMode.Create, FileAccess.Write); StreamWriter sw = new StreamWriter(fs); StreamReader streamreader = file.OpenText(); String originalPath = file.FullName; string input = streamreader.ReadToEnd(); Console.WriteLine("input : {0}", input); String tempString = input.Replace(extractedMethod, modifiedMethod); Console.WriteLine("replaced String {0}", tempString); try { sw.Write(tempString); sw.Flush(); sw.Close(); sw.Dispose(); fs.Close(); fs.Dispose(); streamreader.Close(); streamreader.Dispose(); File.Copy(originalPath, originalPath + ".old", true); FileInfo newFile = new FileInfo(originalPath + ".tmp"); File.Delete(originalPath); File.Copy(fs., originalPath, true); result = true; } catch (Exception ex) { Console.WriteLine(ex); } return result; }` And the related exception System.IO.IOException: The process cannot access the file 'E:\mypath\myFile.cs' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.Delete(String path) at callingMethod.modifyFile(FileInfo file, String extractedMethod, String modifiedMethod) Normally these errors come from unclosed file streams, but I've taken care of that. I guess I've forgotten an important step but cannot figure out where. Thank you very much for your help,

    Read the article

  • MVC pattern implementation. What is the n-relation between its components

    - by Srodriguez
    Dear all, I'm working in a C# project and we are , in order to get some unity across the different parts of our UI, trying to use the MVC pattern. The client is windows form based and I'm trying to create a simple MVC pattern implementation. It's been more challenging than expected, but I still have some questions regarding the MVC pattern. The problem comes mostly from the n-n relationships between its components: Here is what I've understood, but I'm not sure at all of it. Maybe someone can correct me? Model: can be shared among different Views. 1-n relationship between Model-View View: shows the state of the model. only one controller (can be shared among different views?). 1-1 relationship with the Model, 1-1 relationship with the controller Controller: handles the user actions on the view and updates the model. One controller can be shared among different views, a controller interacts only with one model? I'm not sure about the two last ones: Can a view have several controller? Or can a view share a controller with another view? Or is it only a 1:1 relationship? Can a controller handle several views? can it interact with several models? Also, I take advantage of this question to ask another MVC related question. I've suppressed all the synchronous calls between the different members of the MVC, making use of the events and delegates. One last call is still synchronous and is actually the most important one: The call between the view and the controller is still synchronous, as I need to know rather the controller has been able to handle the user's action or not. This is very bad as it means that I could block the UI thread (hence the client itself) while the controller is processing or doing some work. How can I avoid this? I can make use of the callback but then how do i know to which event the callback comes from? PS: I can't change the pattern at this stage, so please avoid answers of type "use MVP or MVVC, etc ;) Thanks!

    Read the article

  • MVC pattern implementation. What is the n-relation between its components

    - by Srodriguez
    Dear all, I'm working in a C# project and we are , in order to get some unity across the different parts of our UI, trying to use the MVC pattern. The client is windows form based and I'm trying to create a simple MVC pattern implementation. It's been more challenging than expected, but I still have some questions regarding the MVC pattern. The problem comes mostly from the n-n relationships between its components: Here is what I've understood, but I'm not sure at all of it. Maybe someone can correct me? Model: can be shared among different Views. 1-n relationship between Model-View View: shows the state of the model. only one controller (can be shared among different views?). 1-1 relationship with the Model, 1-1 relationship with the controller Controller: handles the user actions on the view and updates the model. One controller can be shared among different views, a controller interacts only with one model? I'm not sure about the two last ones: Can a view have several controller? Or can a view share a controller with another view? Or is it only a 1:1 relationship? Can a controller handle several views? can it interact with several models? Also, I take advantage of this question to ask another MVC related question. I've suppressed all the synchronous calls between the different members of the MVC, making use of the events and delegates. One last call is still synchronous and is actually the most important one: The call between the view and the controller is still synchronous, as I need to know rather the controller has been able to handle the user's action or not. This is very bad as it means that I could block the UI thread (hence the client itself) while the controller is processing or doing some work. How can I avoid this? I can make use of the callback but then how do i know to which event the callback comes from? PS: I can't change the pattern at this stage, so please avoid answers of type "use MVP or MVVC, etc ;) Thanks!

    Read the article

1