iso-8859-1 in webservice-responses
Hi,
I have a webservice in c#.net.
I want to send all the responses of the webservice encoded in "iso-8859-1", so that german special characters will be displayed correctly.
I put this line in both files, machine.config and web.config:
<globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1"/>
Still every response starts like that:
<?xml version="1.0" encoding="utf-8"?>
UTF-8 (!!) and all the special characters are questionmarks ???
any help would be great
thanks
bernie
--------------------------------
From: bernhard gruber
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>LkQrcF/p10qwNVQsb9Yp9g==</Id> Tag: how can a thread wait on 2 events? Tag: 85007
sn.exe not found on my pc ?
I am looking for the strong name utility tool sn.exe on my pc and I am
surprised that it is not there !
I have installed visual studio professional 1.1. on my system.
Where to find it ?
greetings Tag: how can a thread wait on 2 events? Tag: 85005
Question about my start page in VB.net, framework?
Excuse me if this is not the ploace for this question.
Whemn I start my VB.net program, the IDE start page lists my most recent
projects. There is a modified column that I would expect to change when I
updated or changed the project. Mine does not change. Any help as to why
not, and what is this coloumn for?
Thanks
Hamil Tag: how can a thread wait on 2 events? Tag: 84997
XML: Why can't I create a parent node for my document?
I'm trying to write an XML file. The first thing I want to do is create the
parent node for the document:
eleMenuItems = xmldoc.CreateElement("menuItems")
xmldoc.DocumentElement.PrependChild(eleMenuItems)
The second line above causes by try statement to exit and catches this
generic error:
'Object reference not set to an instance of an object'
I'm not sure where to do now to figure out the problem. Is there something I
am missing concept wise when creating the parent node?
-Darrel Tag: how can a thread wait on 2 events? Tag: 84993
BUG: memory retention (leak) in GridTableStyleCollection class
There's memory retention (leak) in the GridTableStyleCollection class.
This leak only becomes apparent if one creates table styles dynamically.
Every time the GridTableStyleCollection.Clear() method gets called it
simply doesn¢t clean up the necessary objects and delegates.
It¢s not a very serious leak because not many people create table styles
dynamically.
More can be read at http://blog.vandenhof.org/archive/2004/10/12/150.aspx
A program that can reproduce this problem is available for download at
http://vandenhof.org/downloads/datagridleak.zip
Just run a profiler and have a look at the continued growth of
EventHandlerList, PropertyStore, DataGridTextBox objects.
The only way to get around this leak is to dispose of the datagrid
everytime you switch (newly created) table style objects.
I stress, if you use a fixed amount of table style objects this leak won¢t
pose a problem.
Regards,
Marcel van den Hof Tag: how can a thread wait on 2 events? Tag: 84990
How to debug a file not being written? (XML)
I'm creating a recursive function that goes into a database and pulls
everything out as an XML file. I then want to save thisXML file on the
server.
I have this:
xmldoc.Save(Server.MapPath("siteMenu.xml"))
My SUB seems to execute fine. No errors. But I don't end up with a file,
either. How do I go about debugging this? Tag: how can a thread wait on 2 events? Tag: 84987
Beta Readers Wanted - Whidbey C# - (O'Reilly Author)
This is a one time request for beta-readers for a new book I'm working on.
*************
I'm writing a new book on Visual C# 2.0 - target audience is C# 1.x
programmers looking to move up to 2.0 (code-name Whidbey).
The ideal candidates have been programming in Visual C# 1.x for a while, are
familiar with and comfortable with all the language fundamentals, delegates,
creating windows and web applications and so forth and are ready to learn
what is new in Visual Studio and C# 2.0, as well as highlights of what is
new in creating Windows and Web Applications.
I will post the chapters after I've written them but before they've been
edited or tech-reviewed. Your job will be to provide guidance and advice as
to how helpful the chapter is, what is missing, what could be clearer, etc.
You can expect to read (and respond to) about 40-50 pages per week through
Thanksgiving; starting next week. Ideally, you'll have the Visual Studio
2.0 Beta installed on a computer and will be able to try the exercises,
though this is not strictly required.
There is no financial compensation (though active participants will receive
a copy of the book when it is published, and an acknowledgement in the book
itself). You will need to sign a Non-disclosure agreement and you'll need to
join a forum on Delphi (membership is free).
If you are interested, please send me email (jliberty@LibertyAssociates.com)
with your name, email, C# experience, etc.
Thank you.
Jesse Liberty
Author:
Programming C#
Programming Visual Basic .NET
Programming ASP .NET
Programming Windows .NET Applications
Numerous other books
http://www.LibertyAssociates.com Tag: how can a thread wait on 2 events? Tag: 84985
creating a hierarchical dataprovider
I have an existing object which can't be changed (generated from a
webservice)
I'd like to create a descendant class that would implement the necessary
interfaces to make it usable as a hierarchical data provider
the classes look smtn like:
class TMessage
{
public string MsgID;
public string InReplyTo;
public string Subject;
public TMessage[] Replies;
}
the relation is based on MsgID-InReplyTo
tnx Tag: how can a thread wait on 2 events? Tag: 84984
Framework 1.1. Service Pack1 - Windows 2003
Hi,
We're using Windows 2003 server with .NET framework 1.1.
Recently installed Service Pack 1. After that our ASP.NET pages don't post
back when required field validators have been used.
We tried copying old WebUIValidation.js. We tried aspnet_regiis -c and
iisreset. Nothing seems to solve the problem.
We could not uninstall the Service pack 1 also as some other dependencies
are there.
Can anyone help?
Regards
Sathish Kumar Tag: how can a thread wait on 2 events? Tag: 84979
DataSets
Is there a way to use SQL like terminology but instead of accessing a
database use DataSets?
I ask because in the current project I am doing there is need to create
tables dynamically as results of queries. These tables are then used
proceed to the next step.
In a server environement I can see where if several people were doing the
same task and creating the same table there would be conflicts. So I
thought, what if I could generate DataSets and then manipulate them in
memory without creating temporary tables in the database to do the work.
However, outside of setting up simple parent-child relationships(joins) for
DataSets I don't see many options in manipulating relations between
datasets.
For instance, I would need to create joins between DataSet and tables in a
database. I also need to create Cross Joins between datasets.
Thank you in advance,
Eric Tag: how can a thread wait on 2 events? Tag: 84976
MenuItem popup event
Hey,
I have a context menu which is being built dynamically.
The menu has regular items and group items which contain sub menu
items.
I didn't want to create the menu all at once, so I decided I will
create the sub menus on the popup event of the parent menu item.
The trouble is that the event handler that I registered on popup is
never called (I did add a dummy menu item, so the popup SHOULD fire).
I tried registering the select event and that 1 works.
Any1 has a clue?!
MenuItem GroupMenuItem = new MenuItem(FolderName); //create group menu
for folder
GroupMenuItem.MenuItems.Add(""); //add dummy menu item so it will
display as a group and raise the Popup event
GroupMenuItem.Popup += new EventHandler(GroupMenuItem_Popup); //assign
popup event handler
DynamicMenu.MenuItems.Add(GroupMenuItem); //add new group menu
when i select the groupmenuitem, the function GroupMenuItem_Popup is
never called, altough i checked in debug and onPopup has this
function... Tag: how can a thread wait on 2 events? Tag: 84975
How concern that user on workstation run the Latest ver of my app?
I have 10 users that run on them station my application.
I looking after good solution, for Version Manager.
I can build a little program that check the version of
Local file App, and if it old, I do Copy from server.
But if have a know product or solution for this, I want
know about it? Tag: how can a thread wait on 2 events? Tag: 84973
Resolving DNS
Hi william,
Sorry for not giving you more information.
I have a machine within a LAN, assume that the machine is not secure. I want
to make it secure before its on the internet.
So when the machine (assume someone else) tries to browse the net, for e.g:
www.google.com
I want it to be redirected to a server within the LAN, where theres some
info.
basically I am trying to redirect the computer to another site.
I have no idea how to do this.
Please Advice,
Stephen. Tag: how can a thread wait on 2 events? Tag: 84970
DNS Resolving
Hi all,
is there a way that I can create an application that can "Resolve" any given
address in the URL to be redirected to a default website. I guess that It
can be done by "Resolving DNS address"
Please Advice,
Stephen. Tag: how can a thread wait on 2 events? Tag: 84968
browse network shares
I would like to know how to specify a server and be able to programmatically
see all of the shares that the server offers. Specifically just the printers,
but that is not necessary.
-Thanks Tag: how can a thread wait on 2 events? Tag: 84966
Datagrid probem MS What happened to response within 2 days???
<b>This is my 2nd time posting this question without a response from
Microsoft</b>
I have a form that fills a datagrid on load and binds it to controls. If I
move the currency manager in code, the grid's selected row does not follow.
However, if I fill and bind the grid after load, then moving the currency
manager works correctly.
The application is loading from a url and is running with only internet
permissions. If the application is running in the intranet zone everything
works correctly.
If you need any addtional information please ask.
--
Thanks,
Greg Tag: how can a thread wait on 2 events? Tag: 84965
How many UI thread could a .NET Window Form application have?
Hello all,
This is a basic question about windows form. But it has puzzled me for a
long time. Normally, A windows application based on .net frame has only one
UI thread. And other threads are work threads as I know. Could I create a
second UI thread on a new Form. If I created a modeless form, is this form
still running on the same UI thread?
Thanks,
Max Tag: how can a thread wait on 2 events? Tag: 84960
Using MulticastInterface SocketOption
I was wondering if someone could give me an example of how to correctly use
the MulticastInterface with sock.SetSocketOption(). I found it listed in
the enums for the socket options
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpref/html/frlrfsystemnetsocketssocketoptionnameclasstopic.asp
and it sounded like what I needed. I have 2 nics and I want to multicast
only on the one connected to that specific network.
Thanks,
Tom Tag: how can a thread wait on 2 events? Tag: 84959
VB + SQL SERVER - Using binary data types
>I want to store a binary string in SqlServer from VB .NET through a
> stored procedure. I have been storing the binary data in a BitArray
> which I am not set on by any means. When I pass the BitArray into a
> stored procedure, which is looking for a variable of type binary, it
> throws the following: "Object must implement IConvertible." BitArray
> obviously does not implement IConvertable.
>
> If anyone has a good way of passing binary data into a stored
> procedure through a parameter array I'd appreciate it. Tag: how can a thread wait on 2 events? Tag: 84953
dotnet framework 2.0
If I download the 2005 beta express versions and install them, will the .NET
framework 2.0 (beta) replace the existing 1.1 (non-beta) that's on my
machine? What I mean is will I have two versions side by side - i.e. is the
beta marked as 'this version is not allowed to replace an existing one' but
a non-beta isn't marked with that, is what I'm trying to get at.
And if 1.1 is installed over the top of 1.0, then does it replace it, and if
so, does an application developed with 1.0 still run against 1.1? When 2.0
(non-beta) is out, will it then replace 1.1 and will 1.1 applications still
run against it?
Thanks Tag: how can a thread wait on 2 events? Tag: 84949
Find controls on a windows form
Hi,
I have a windows form with several controls on it. I need a function which
finds a specific control on this form. Is there any function for that already
built? If not, could you advice me how to tackle this problem?
Thanking you in advance,
Emilia Tag: how can a thread wait on 2 events? Tag: 84941
XP Styles with .NET 1.1
Hello Everyone!
I wonder, what is the best method to enable Windows XP Styles (or Themes..
:)) within .NET 1.1 application?
I found some article, where author has described post-build modyfication of
app.manifest from Win32 Resource of .exe file to bind against comctl32.dll
version 6. But this generates very weird behaviour of my app. e.g.. list
control items overlap and tab control with vertical tabs does not show text
on the tabs (and its borders are drawn incorrectly).
How to do this 100% efficiently and correctly?..
Thanks for any advice,
Paul Tag: how can a thread wait on 2 events? Tag: 84940
Error while installing library
I'm receiving an error message when trying to reference my dll I've just
built and installed on my development workstation. Where can I find the
proper procedures for developing and then conducting a user test of
installation of the dll on the same machine?
Do I have to unregister the com library first and then install or does the
setup installer take care of that for me?
--
thx
-jsh Tag: how can a thread wait on 2 events? Tag: 84935
Problem with loosely coupled events
I've been fighting with loosely coupled events for the last couple of days,
and currently have the following scenario:
Interface
namespace MyAssembly
{
public interface IMySink
{
void OnSyncEvent();
}
[EventClass]
public class MyEventClass : ServicedComponent,IMySink
{
public void OnSyncEvent ()
{
throw(new NotImplementedException(exception));
}
const string exception = @"You should not call an event class
directly. Register this assembly using RegSvcs /reconfig";
}
}
Message Class
public class MyMessage
{
public string Forename;
public string Surname;
}
Publisher
IMySink sink = new MyEventClass();
MyMessage myMessageObj = new MyMessage();
myMessageObj.Forename = "John";
myMessageObj.Surname = "Smith";
// Code for SerializeThis not included
string myMessageStr = SerializeThis(myMessageObj);
sink.OnSyncEvent(myMessageStr);
Subscriber
class SynchronisationSubscriberClass :ServicedComponent, IMySink
{
private MyWindowsFormClass formWindow;
public MyWindowsFormClass FormWindow
{
set {formWindow = value;}
}
public void OnSyncEvent (string message)
{
MyMessage myMessageObj = DeserializeThis(message);
formWindow.DoSomethingWithMessage(myMessageObj);
}
}
Problem
When the OnSyncEvent method is called in the subscriber the instance of
formWindow is null. I presume this is because the code is running in a COM+'
s memory space and not the memory space that the rest of the application
which instantiated the subscriber is running. If this is the case how do I
hook back into my main application? Hopefully somebody out there can help me
as Microsoft's help in this area is next to non-existent. Tag: how can a thread wait on 2 events? Tag: 84925
Permissions for dotnet framework CONFIG directory
Hi,
I'm running .net on a server under a domain user account (ie. the
domain user is specified in the processModel section of
machine.config).
Please can someone tell me what permissions the domain user account
needs on the c:\winnt\microsoft.net\framework\v1.1.4322\config
directory.
I'm guessing that it's Read and Execute, but I could be wrong.
Thanks,
Rich Tag: how can a thread wait on 2 events? Tag: 84911
Problem in deriving class from XmlNode
Hi All,
I want to make a custom class in c#, which extends System.Xml.XmlNode class
of BCL.
Now in custom class, I have implement abstract methods of XmlNode class
also. Now when I am trying to run the class it gives an error that
"System.Xml.XmlNode.XmlNode() is inaccessible due to its protection level".
This error comes because XmlNode has not any public constructor. I found
XmlNode has two constructor but both are private or friend (i dont know
exactly).
I also found one MSDN article where it says that "Never derive any class
directly from XmlNode" but its just recommendation.
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/ht
ml/cpconextendingdom.asp)
Though, Microsoft has derived some of BCL classes from base XmlNode, so why
we can not derive?
System.Object
System.Xml.XmlNode
System.Xml.XmlAttribute
System.Xml.XmlDocument
System.Xml.XmlDocumentFragment
System.Xml.XmlEntity
System.Xml.XmlLinkedNode
System.Xml.XmlNotation
So i think there must be some way out of this....
So what to do to create a derived class from XmlNode?
I heard that many experts are giving their service in news groups. So please
help me out of this.
I have already derived few of my classes from XmlDocument, XmlElement,
XmlAttribute etc. So i dont want to derive from them but i want to derive
the class from XmlNode it self. Please help me to get the answer...
Thanks in Advance.
Thanking you,
Mahesh Devjibhai Dhola
"Empower yourself...." Tag: how can a thread wait on 2 events? Tag: 84907
Dynamically add controls
Is there a way to dynamically controls like the Placeholder in ASP.Net in a
Window App? Tag: how can a thread wait on 2 events? Tag: 84900
Hashtable Curiosity
Can someone explain to me why The load method compiles but throws and error
when is called and why do I have write the code with a temp container like
the one in load2 method in order for it to work?
#region Using directives
using System;
using System.Collections;
using System.Text;
#endregion
namespace Testing_Cache
{
public class cls_test
{
private static Hashtable[] obj_Hashtable = new Hashtable[2];
public static void Load()
{
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 10; j++) {
obj_Hashtable[i].Add(j.ToString(), j);
}
}
}
public static void Load2()
{
Hashtable obj_Temp_Hashtable;
for (int i = 0; i < 2; i++)
{
obj_Temp_Hashtable = new Hashtable();
for (int j = 0; j < 10; j++)
{
obj_Temp_Hashtable.Add(j.ToString(), j);
}
obj_Hashtable[i] = obj_Temp_Hashtable;
}
}
}
}
Thoughts or documentation is appreciated.
Henry Tag: how can a thread wait on 2 events? Tag: 84892
Lunching dotnet application from batch file in windows 98
Does anyone know a way of executing a dotnet application from a windows
98/ME batch file?
At the moment I get 'Bad command or filename' everytime I try to run
something.
Also, I'd like the execution to wait until the application has finished
before moving onto the next batch instruction.
Thanks in advance,
Chris. Tag: how can a thread wait on 2 events? Tag: 84878
No Namespace Danger?
I have a single class in a single DLL. I want to use it as a
reference in many different Visual Studio projects (web, winform,
etc). Is there any danger in not using a namespace for this single
DLL? I thought it would save typing but am unsure if there is any
long-term development danger I am not thinking of. Tag: how can a thread wait on 2 events? Tag: 84874
Can I append to an encrypted text file?
I need to encrypt messages printed to an application event log. I've
copied the approach described in MS "307010 - How To Encrypt and
Decrypt a File by Using Visual C# .NET", but I want to append.
This MS example (and all other examples I've found) assumes one will
read an entire plain text file, encrypt it, then write the entire file
to disk. I only want to append individual lines of encrypted text to
an encrypted file, then read the thing.
Below is a complete console app that shows the code I am using. It
"works" if I only write one line to the file and then decrypt, but
subsequent lines get mangled. I'd appreciate any advice.
using System;
using System.IO;
using System.Security;
using System.Security.Cryptography;
using System.Text;
namespace CryptoSample
{
public class CryptoSample3
{
private const string Key = "1234abcd";
private const string LogFilePath="C:\\Log.log";
static void LogIt(string Msg)
{
//append encrypted string to the log
using(FileStream LogFile = new
FileStream(LogFilePath,FileMode.Append,FileAccess.Write))
{
DESCryptoServiceProvider DES = new DESCryptoServiceProvider();
DES.Key = ASCIIEncoding.ASCII.GetBytes(Key);
DES.IV = ASCIIEncoding.ASCII.GetBytes(Key);
ICryptoTransform desencrypt = DES.CreateEncryptor();
CryptoStream cryptostream = new
CryptoStream(LogFile,desencrypt,CryptoStreamMode.Write);
byte[] bytearrayinput = new byte[Msg.Length];
bytearrayinput=ASCIIEncoding.ASCII.GetBytes(Msg);
cryptostream.Write(bytearrayinput, 0, bytearrayinput.Length);
cryptostream.Close();
LogFile.Close();
}
}
static string ViewLog(string DecryptKey)
{
DESCryptoServiceProvider DES = new DESCryptoServiceProvider();
DES.Key = ASCIIEncoding.ASCII.GetBytes(DecryptKey);
DES.IV = ASCIIEncoding.ASCII.GetBytes(DecryptKey);
//read the encrypted file back.
using(FileStream LogFile = new
FileStream(LogFilePath,FileMode.Open,FileAccess.Read))
{
ICryptoTransform desdecrypt = DES.CreateDecryptor();
CryptoStream cryptostreamDecr = new
CryptoStream(LogFile,desdecrypt,CryptoStreamMode.Read);
return(new StreamReader(cryptostreamDecr).ReadToEnd());
}
}
static void Main()
{
LogIt("This is the Message ");
LogIt(" This is Message Two ");
LogIt(" This is Message Three ");
string s = ViewLog(Key);
Console.Write(s);
Console.WriteLine ("Press Enter to continue...");
Console.ReadLine();
}
}
} Tag: how can a thread wait on 2 events? Tag: 84873
converting double to string
I have some values in type of double such 0.00009 , 0.0000007, when I want
to show them in a text box and convert them to string they are changed to
scientific notation while I want to show them as they are.
I tried to use tostring("f") but it needs to have a precision number after
*f* which will cause always have fix number of characters (for example if
use f10 then 0.09 is converted to 0.09000000 while I need to show it as
0.09).
do you any suggestion of how I can convert such a numbers to string and show
them as they are not as scientific notation?
Thanks for any feedback Tag: how can a thread wait on 2 events? Tag: 84867
Datagrid Readonly Column
When a column in a bound datagrid is readonly and has focus, the column does
not refresh the data when the datasource is changed. If another column
gains focus, the original column that had the focus get filled with the
correct data. Does anyone have any suggestions?
--David Nash
The GSI Group, Inc. Tag: how can a thread wait on 2 events? Tag: 84866
Keept NATIVE code on HDD
When JIT compiles MSIL code to NATIVE code, this NATIVE code is not kept on
the hard disk? To use it at the restart of application?
If it so, why Microsoft will not make it, for increase of productivity?
P.S. Sorry of my english Tag: how can a thread wait on 2 events? Tag: 84863
getting computer name from asp-dot-net
i need to get the computer name from an aspx page.
i use System.Windows.Forms.SystemInformation.ComputerName()
and it's working fine,
but in second thought, it might not be recomended to use the
system.windows.forms.dll
inside an asp-dot-net code.
any information here will help.
TIA, z. Tag: how can a thread wait on 2 events? Tag: 84852
Bizarre ObjectDisposedException - Please help
Any help you can offer on this would be most welcome. Its making me pull
out what little hair I have left!
A strange exception is raised occasionally by the following code:
byte[] buffer = new ASCIIEncoding().GetBytes(toSend);
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(new
Uri(serviceUri));
httpWebRequest.ContentLength = toSend.Length;
httpWebRequest.ContentType = postType;
httpWebRequest.Method = "POST";
Stream requestStream = httpWebRequest.GetRequestStream();
requestStream.Write(buffer, 0, buffer.Length);
requestStream.Close();
StreamReader responseStream = new
StreamReader(httpWebRequest.GetResponse().GetResponseStream());
string received = responseStream.ReadToEnd();
responseStream.Close();
It only seems to happen the first time after the code has been rebuilt, or
has not been called for some time (a number of hours). If the code is
regularly called, then the exception is not raised.
The code is in a C# WebService. I am using .NET Framework 1.1 on a Windows
XP (SP2) machine.
The exception message is:
Exception:-
System.ObjectDisposedException: Cannot access a disposed object named
"System.Net.TlsStream".
Object name: "System.Net.TlsStream".
at System.Net.TlsStream.InnerWrite(Boolean async, Byte[] buffer, Int32
offset, Int32 size, AsyncCallback asyncCallback, Object asyncState)
at System.Net.TlsStream.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Connection.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32
size) Tag: how can a thread wait on 2 events? Tag: 84840
Crystal Reports for Visual Studio.Net
Hi friends!
I am using crstal report for Visutal Studio.Net. I designed some of the
reports in it. I have also set the page settings.
Preview of the report is fine during runtime but when I click
print button on the cystal report's viewer then page settings
are not those which I set during design time e.g., Page Orientation etc.
Note: It functions fine when I directly print to printer using
Crystal report's engine.
Please advise!
Also advise why following Public Instance Properties of
"CrystalReportViewer's"are not available:
ViewerToolBar
ViewerStatusBar
Regards
Imran Saroia Tag: how can a thread wait on 2 events? Tag: 84833
App.Path replacement
Hi,
in VB6 i use App.Path to determine the path my executable run from.
what is the VB.NET / framework replacement fot that?
TIA, z. Tag: how can a thread wait on 2 events? Tag: 84831
checking user in the domain
Hi,
i don't know whether i can post this query in this group or not.
How do i check whether the user exists in the domain while i am giving the
username,password and domain.
It can be done in one way by creating the DirectoryEntry (ActiveDirectory)
and DirectorySearcher.
But i doesn't want to create ActiveDirectory and after that i should check
whether that exists or not.
I would like to just check whether user with that pwd exists in the given
domain or not.
Please help me.
Regards,
Ramnadh Tag: how can a thread wait on 2 events? Tag: 84829
CLR Profiler Hotspots Tracker Sample
Dear All,
I am not able to compile CLR Profiler Hotspots Tracker Sample
dll...is there a link from where I can download the dll along with a
sample of how to use it...please help...
TALIA
Many Regards
Jack Tag: how can a thread wait on 2 events? Tag: 84827
System.OutOfMemory exception: error creating window handle
Hi,
Software:
.NET 1.1 (both non-SP and SP1)
Visual Studio .NET 2003
MS SQL Server 2000 SP3
Windows XP SP 2
Hardware:
Intel Celeron 1700, Pentium 4 2.4GHz, AMD Athlon 1100
RAM 256-512 DDR
I've run into a strange problem. There is an application which allows to:
1) connect to a certain device using a modem
2) manage different aspects (mostly, working with MS SQL Server)
Serial communication is done on a separate thread, one per each connection.
The maximum number of simultaneous connections is 20.
Note: what is written below applies only when running the application not
under the debugger.
The app starts and works correctly: accepts incoming calls, performs
different scenarios, dials out when necessary. When the comms thread needs to
modify the UI, it is correctly done using Control.BeginInvoke. However,
sometimes (on different computers) the following exception is thrown:
System.OutOfMemory exception: error creating window handle --->
System.NullReferenceException: Object reference not set to an instance of
object.
at System.Windows.Forms.ThreadContext.OnThreadException
at System.Windows.Forms.Control.WndProcException
at System.Windows.Forms.ControlNativeWindow.OnThreadException
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(int32, string,
string, int32, int32, int32, int32, int32, HandleRef, HandleRef, HandleRef,
object)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(int32, string,
string, int32, int32, int32, int32, int32, HandleRef, HandleRef, HandleRef,
object)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams)
-- End of inner exception stack trace --
at System.Windows.Forms.ThreadContext.OnThreadException
at System.Windows.Forms.Control.WndProcException
at System.Windows.Forms.ControlNativeWindow.OnThreadException
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef, int32)
at System.Windows.Forms.Control.SetVisibleCore
at System.Windows.Forms.Form.SetVisibleCore
at System.Windows.Forms.Control.set_Visible
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog
at <my form-my code to ShowDialog>
What could be the problem?
Let me stress that this does not happen under debuggers. When debugging, the
exception is not thrown. It was noted that this happens more often when
having an active connection.
--
Regards,
Serge (Logic Software) Tag: how can a thread wait on 2 events? Tag: 84822
Passing parameters to a thread
Hi,
I'm running into a thread problem. The context is a distributed application
constituted of a controller and several satellites performing a given job.
In the controller application, I have to send command requests over the
network to a list of satellites. In order to parallelize request sending, I'd
like to have each request (one per satellite) sent by a single Thread. The
problem is how would a given thread know which satellite he should be taking
care of since it seems like I can't pass parameters to a thread.
My threads can have access to the list (a Hashtable actually) of satellites,
but how would a given thread know exactly which one it should be taking care
of ? I would need, at least, to pass an index to each thread...
Any idea or comment is welcome.
Thanks in advance.
Arno Tag: how can a thread wait on 2 events? Tag: 84816
Compatibility Issues with .NET Framework
Hello: My Problem is simple.
I develop vb.net applications using VisualStudio 2003, and now there's a
strange problem. I wrote a backup application for a friend of mine, using
SharpZipLib to create ZIP-Files. Now I installed the latest dot-Net Framework
on his Win2K machine, and I got the following error Message:
"C:\WinNT\Microsoft.NET\v1.1.4332\mscorwks.dll could not be loaded".
I figured out that I always need to install the exact .NET Framework-Version
number on the computer the application should be running on, as I used to
develop Software, and now I'm afraid to install the latest .NET Service Pack,
since I suppose all software that is beeing re-built afterwards won't run on
the target computer unless the user also installs the latest service pack.
Why is this so, and how can I fix this ?
If I create an Installer-application using the Installer-Wizzard in Visual
Studio it won't even start, complaining that not the right version of the
.NET Framework is installed, and I can only find my exact version of the
framework on the Visual Studio DVD nowhere else !
Thanks a lot for your efforts ! Tag: how can a thread wait on 2 events? Tag: 84806
Is there a delcaration between Private and Friend
Is there a delcaration between Private and Friend
In one form I declared
private iParentID0 as integer
I couldn't access it from another form.
If I changed it to
friend iParentID0 as integer
Of course I could. However I'd like to expose this integer to only certain
other classes - in this case forms. Is there any easy way of doing this?
Another question is whether it's worth bothering implementing a workaround (
if one of you have one ) when vs 2005 might include an intermediate
declaration, or an easier workaround. Does anybody know if it does?
Dennis Tag: how can a thread wait on 2 events? Tag: 84804
Is there a delcaration between Private and Friend
Is there a delcaration between Private and Friend
In one form I declared
private iParentID0 as integer
I couldn't access it from another form.
If I changed it to
friend iParentID0 as integer
Of course I could. However I'd like to expose this integer to only certain
other classes - in this case forms. Is there any easy way of doing this?
Another question is whether it's worth bothering implementing a workaround (
if one of you have one ) when vs 2005 might include an intermediate
declaration, or an easier workaround. Does anybody know if it does?
Dennis Tag: how can a thread wait on 2 events? Tag: 84802
How do I handle the kill signal?
Hi,
I would like to know if there is a way in the .NET to
handle the kill signal if sent to my process.
I want my application to close properly even if the user
is using the task manager to kill the process.
Does anybody know how to do this?
Thanks,
Haim. Tag: how can a thread wait on 2 events? Tag: 84797
Installer Custom Actions - Missing InstallState on rollback
Hi,
When installing an MSI installation containing a number of custom actions,
if the installer fails on the first custom action, during rollback, the
installer will display an error dialog complaining that it cannot find the
InstallState files for each custom action. And no wonder, since it hadn't
even begun executing the rest of them. is there any way, other than
providing a custom external UI for the MSI and filtering them out, to prevent
these dialogs from being displayed?
Thanks! Tag: how can a thread wait on 2 events? Tag: 84789
Installer Custom Actions and MSI "Repair"
Hi,
When executing an MSI containing .NET Installer custom actions in "repair"
mode, what exactly happens?
- Does the Uninstall method get called, then the Install method?
- If the Install method then fails, and the "repair" has to rollback, does
the rollback method get called?
- Does this mean you have to backup any files removed while repairing in
case they have to be restored?
- How do you know if you are executing in repair mode? Tag: how can a thread wait on 2 events? Tag: 84788
Updating Net Framework Issue
Hi there,
The Windows update site recommends that I update 1) Microsoft .NET Framework
1.0 Service Pack 3, English Version and 2) Microsoft .NET Framework 1.1
Service Pack 1. Having selected them and tried to update, the download
works fine, but I get an error: "SL18D.tmp - Common Language Runtime
Debugging Services" Application has generated an exception that count not
be handled. Process id=0x708 (1800), Thread id=0x910 (2320)."
Any thoughts on what I can do to avoid this?
Thanks,
--------------
Daniel Gardner Tag: how can a thread wait on 2 events? Tag: 84778
hi all
in win32, we could call
WaitForMultipleObjects();
is there a parallel method in .NET?