Vail Preview SDK - Provider Chat Example

by Christof 25. June 2010 21:11

Maybe you want to get to know the new Windows Server Code Name “Vail” Preview SDK a little better.
There are a lot of good examples in the API Reference.
Here are some "Chat" example directions for the Provider Framework.

  • The template-file ProviderObjectModel.zip is zipped in the wrong way and will not be 
    recognized by Visual Studio. The Folder structure ProviderObjectModel.zip should be the 
    same as in other template-files.
  • Do not forget to change the ProviderID in the ObjectModelImplementation File:
    m_connector = ConnectorFactory.GetConnector<IProvider>("chat",this);

 You can also Download these two Visual Studio Solutions for better understanding

ChatObjectModel.zip (482,21 kb)
ChatClient.zip (285,64 kb)

Tags: ,

.net | Windows Home Server

Thread and ThreadPool in .Net

by Christof 25. November 2009 22:52

If you deal with multithreaded programming in .net , you have the choice between ThreadPool and Thread. But what exactly is the difference between them?

ThreadPool

Server Applications (like the Windows Home Server) often use ThreadPools.
The Threadpool is suitable for short running work items and has a Thread limitation of 25 Threads per Application.
There is only one pool per process. You can't create a new one and you can't cancel the work items in the ThreadPool.

Threads

A Thread is the entity within a process that can be scheduled for execution. In comparison with ThreadPools, there is no managing of the remaining divided CPU time. You can start as many Threads as you like. A Thread has many functions/methods to start/stop and manage the Threads.

If you need a lot of Threads use a ThreadPool, otherwise you can take the easy way with a simple Thread.

Tags: ,

.net

Cookies, WebRequests and uploaded.to

by Christof 8. November 2009 13:23

 
Webrequest to an uploaded.to account!?
Seems easy? It is easy, if you know how to handle the CookieContainer.
If you want to download a file with the .Net Framework, you'll have to take care of this:
You need to send 3 Webrequests!

  1. Webrequest with your credentials
  2. Webrequest to get the right file URL
  3. Webrequest to download the file

Use the cookie that you get in the first webrequest on the other requests.
That´s all!
Or you download the file with the WHS Download Manager. Uploaded.to Premium Account will be supported
in the next release.

 

Tags: , , ,

.net

NET 3.5 Update on Windows Server2003 x64, the not so easy way

by Christof 3. November 2009 13:13

Did you try to install the .Net 3.5 Framework on your Virtual Server ?
Maybe the installation fails with the following Error:

XPSEPSC x64 Installer: [2] Error code 1603 for this component means "Fatal error during installation."
XPSEPSC x64 Installer: [2] Setup Failed on component XPSEPSC x64 Installer

Okay, what can we do?

  1. Rename the Edb.log file ( Click Start,Run and type cmd in the box)
     --> ren %systemroot%\system32\catroot2\Edb.log *.tst
  2. Download the complete redistributable Package of .Net 3.5
  3. The Printer Spooler Service must be active! Why, see here
  4. Start the Setup again ( The Full Package)

Good luck!

Tags: ,

.net

Scrolling For ListView.SelectedItem

by Christof 2. November 2009 23:12

If you selected an item in ListView control within your code, Not always the item will be visible to the user.
This sample code will show you, how it works:

Dim index as integer ' the scrollindex in the Listview

listView1.Items(index).Selected = true
listView1.Items(index).Focused = true
listView.TopItem = listView1.Items(index)

It works also with the Fancylistview from the Windows Home Server

Tags:

.net

Powered by BlogEngine.NET 1.6.1.0
Theme by Andy Brosius

New Filehoster

What is your favorite Filehoster for Release 3.2.5




Show Results

Tag Cloud

This will be shown to users with no Flash or Javascript.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar