Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Stefan Prodan

@Stefan Prodan
About
Posts
20
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Lenghty operations
    S Stefan Prodan

    Look at this http://stefanprodan.wordpress.com/2007/03/22/stop-threads-gracefuly/[^]

    C# help csharp

  • Comunicating with service application.
    S Stefan Prodan

    If the windows application is on the same PC as the service best is to use .NET Remoting with IPC protocol. Registering a IPC port will not make the firewall jump and you can use binary serialization.

    http://stefanprodan.wordpress.com

    C# help

  • C# reverse engineering, [modified]
    S Stefan Prodan

    In VS.NET 2005 right click a .cs file and chose "View Class Diagram".

    http://stefanprodan.wordpress.com

    .NET (Core and Framework) csharp question visual-studio wpf announcement

  • IIS6 with .NET Framework 1.1 and 2.0 at the same time?? can i do that?
    S Stefan Prodan

    You have to make 2 different Application Pools(App1 and App2), set the ASP.NET 1.1 sites to run on the App1 pool and ASP.NET 2.0 on the App2 pool.

    http://stefanprodan.wordpress.com

    .NET (Core and Framework) csharp dotnet question announcement

  • Make MarshalByRefObject thread-safe
    S Stefan Prodan

    I am hosting in a windows service a remoting object as singleton, I want to make sure that clients calls are thread-safe. Here is the class definition: [Synchronization(true)] public class Service : MarshalByRefObject, IService My question to you is if the Synchronization attribute is a good thing or should I use locks inside every Method of the Service class.

    http://stefanprodan.wordpress.com

    .NET (Core and Framework) php com hosting question

  • problem in implementing sql server connection in windows service
    S Stefan Prodan

    In VS.NET go to Debugger menu and select the 'Attach process', you'll be able to debug the service.

    http://stefanprodan.wordpress.com

    .NET (Core and Framework) database help sql-server sysadmin debugging

  • image to string and backwords..
    S Stefan Prodan

    Here is my code, I've test it with BMP but I think it will work with any image format. using System.IO; using System.Drawing; using System.Runtime.Serialization.Formatters.Soap; Image image = Image.FromFile(file); // load some image SoapFormatter formater = new SoapFormatter(); byte[] obj; using (MemoryStream ms = new MemoryStream()) { formater.Serialize(ms, image); obj = ms.ToArray(); } string str = Convert.ToBase64String(obj); // convert byte[] to string byte[] bytes = Convert.FromBase64String(str);// convert string to byte[] Image newImage; using (MemoryStream ms = new MemoryStream(bytes)) { newImage = (Image)formater.Deserialize(ms); } newImage.Save(file + ".bmp");

    http://stefanprodan.wordpress.com

    C# graphics data-structures help

  • help me about speed of loading data ...
    S Stefan Prodan

    Did you write code to load the data or you've drag/drooped in VS.NET a connection/dataset and so on?

    http://stefanprodan.wordpress.com

    C# csharp database visual-studio performance help

  • Get Application directory from console program
    S Stefan Prodan

    That's easy, just use AppDomain.CurrentDomain.BaseDirectory to get the running directory and add to it your console application name and you have a path just like Application.ExecutablePath.

    http://stefanprodan.wordpress.com

    C# csharp question

  • image to string and backwords..
    S Stefan Prodan

    Look at the BitConverter class, BitConverter.ToString Method (Byte[]).

    http://stefanprodan.wordpress.com

    C# graphics data-structures help

  • Bad Request!
    S Stefan Prodan

    Get ProcessExplorer or a similar tool and monitor the asp.net process that is running your webservice, I think that IIS is restarting the process due to large amount of RAM usage. I got the same error uploading large files by calling a webservice, chunk by chunk. A solution is to use free the memory from time to time by calling the Garbage Collector.

    http://stefanprodan.wordpress.com

    C# database sysadmin data-structures help

  • Concept of Thread.BeginCriticalRegion()
    S Stefan Prodan

    Thread.BeginCriticalRegion does not block the abort command, and by the way the first rule that I've learned about multi-threading is to never use Abort, there are tones of other ways to stop a thread gracefully. Here it is an alternative to Thread.Abort: http://stefanprodan.wordpress.com/2007/03/22/stop-threads-gracefuly[^]

    C# help question

  • Button.Text has no effect?
    S Stefan Prodan

    This is not a strange behavior, your should start a new thread to do the time consuming work and on the finish event of the tread set the btnGo.Text = "Start".

    http://stefanprodan.wordpress.com

    C# help question

  • Passing Parameters to a running thread
    S Stefan Prodan

    You can make a static class that exposes properties that you can set/get from different threads. So when your activated event fires the thread will get the value of the property. Because you are using a multi-threading application the static properties should use lock {...} inside the get/set.

    http://stefanprodan.wordpress.com

    C# question

  • Suggestion for C# compatible language
    S Stefan Prodan

    heavy load of optimization = ANSI C :)

    http://stefanprodan.wordpress.com

    C# csharp c++ algorithms performance question

  • how to encode string in serialization
    S Stefan Prodan

    Well here it is a function that i use to encode strings in XML files: /// /// Convert To Base64 /// /// clean text /// 1(Unicode) 2(ASCII) 3(UTF7) 4(UTF8) /// Base64 string public static string ToB64(string text, Int16 type) { string rez = null; switch (type) { case 1: //Unicode rez = Convert.ToBase64String(Encoding.Unicode.GetBytes(text)); break; case 2: //ASCII rez = Convert.ToBase64String(Encoding.ASCII.GetBytes(text)); break; ase 3: //UTF7 rez = Convert.ToBase64String(Encoding.UTF7.GetBytes(text)); break; case 4: //UTF8 rez = Convert.ToBase64String(Encoding.UTF8.GetBytes(text)); break; } eturn rez; } and to decode: /// /// Convert From Base64 /// /// encrypted text /// 1(Unicode) 2(ASCII) 3(UTF7) 4(UTF8) /// clean text public static string FromB64(string text, Int16 type) { string rez = null; switch (type) { case 1: //Unicode rez = Encoding.Unicode.GetString(Convert.FromBase64String(text)); break; case 2: //ASCII rez = Encoding.ASCII.GetString(Convert.FromBase64String(text)); break; case 3: //UTF7 rez = Encoding.UTF7.GetString(Convert.FromBase64String(text)); break; case 4: //UTF8 rez = Encoding.UTF8.GetString(Convert.FromBase64String(text)); break; } return rez; }

    C# json tutorial question

  • C# to extract
    S Stefan Prodan

    I gues you need a Zip like utility. There is a free zip lib made in C# here icsharpcode.net

    C# csharp help question

  • HTTP Listener
    S Stefan Prodan

    You can do it in .NET really easy. All you need to do is a Web Service, the site will call a method on that web service and pass the data, and then the web service will insert into Oracle.

    C# database oracle sysadmin xml question

  • How to change MAC address?
    S Stefan Prodan

    I need this feature for a LAN application, I can provide to the user an interface with IP, Mask, Gateway and DNS configuration but not the MAC, so if anyone tryed this in C# please let me know.

    C# csharp sysadmin tutorial question

  • How to change MAC address?
    S Stefan Prodan

    Anyone knows how to change the MAC of the first Network adapter using C#? Thanks

    C# csharp sysadmin tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups