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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing Tag: 84907
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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing 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: Testing Tag: 84778
AppDomain.CreateInstanceAndUnwrap of shared (GAC) assemblies
Hi everyone,
I am trying to load a shared assembly in it's own application domain. I
created a simple Windows Application with 1 button that executes the code
below. It is trying to load a very simple assembly 'ClassLibrary1' that is
located in the GAC.
The call to CreateInstanceAndUnwrap is unable to locate the assembly. I
have no clue as to why the application domain can't load a shared assembly,
any help is welcome.
// Prepare Setup
AppDomainSetup appDomainSetup = new AppDomainSetup();
appDomainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
appDomainSetup.ApplicationName = "MyAppDomainName";
// Create Application domain
AppDomain myAppDomain = AppDomain.CreateDomain("MyAppDomainName", null,
appDomainSetup);
try
{
// Load shared assembly
myAppDomain.CreateInstanceAndUnwrap("ClassLibrary1",
"ClassLibrary1.Class1");
}
catch(Exception ex)
{
// Crashes with message "File or assembly name ClassLibrary1, or one of
it's dependencices was not found."
MessageBox.Show(ex.Message);
} Tag: Testing Tag: 84777
Difference between System eventlog and those created by EventLog c
Hi,
My application write custom event log (i.e. NOT to the standard "system",
"application" or "Security" ones) using the EventLog class in .NET. The code
is essentially the same as those included in the MSDN library document for
EventLog.
using System;
using System.Diagnostics;
using System.Threading;
class MySample{
public static void Main(){
// Create the source, if it does not already exist.
if(!EventLog.SourceExists("MySource")){
EventLog.CreateEventSource("MySource", "MyNewLog");
Console.WriteLine("CreatingEventSource");
}
// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "MySource";
// Write an informational entry to the event log.
myLog.WriteEntry("Writing to event log.");
}
}
I found that these event logs I created using EventLog are ***different***
from those default event logs come with XP (again, those "System",
"Application" etc.)
For one, althogh I can see the event in EventViewer without problem, but
when I right click on my event log (for example, "MyNewLog", which is created
using the above sample), the properties for it is different from those for
the default system event log. The log name field is greyed out (empty) and
the Size, Created, Modified, and Accessed values are all empty (shown as "Not
avaiable".
The problem is that I tried to access my custom event log using the WMI.
With script such as this one:
Select * from Win32_NTEventlogFile
It only returns 3 objects, namely the default system event log ("system",
"application", and "security"). My custom event log file is NOT returned.
The static EventLog.GetEventLog (in .net) does returns me the correct
collections of event log files. But my application requires me to access
those files through WMI. I am stuck at here.
I have spend quit sometime trying to find out why. Any help will be
appreciated.
Thanks.
David Tag: Testing Tag: 84776
Avoiding security issue with URL?
I use one page as a template and include a header, footer, and allow the main
content area to change, based on a varible I supply via the URL. The
variable holds a reference to another page and pulls it into the main page.
Going from the main page to pageB will look like:
index.asp?p=page
Sometimes I append other URL parameters. These may be values, such as a
user ID, that goes into the database to set conditions on a stored procedure.
This is a security risk. Some one could manipulate this value and access
another user's information. What are some examples of good security for this
situation?
Thanks,
Brett Tag: Testing Tag: 84773
ANN: NetCF MVP Hosted Chat tomorrow
Just a reminder that we'll be hosting an online chat tomorrow concerning
Smart Device Programming with Visual Studio .NET 2003. We will be on hand
ready to answer your questions, so bring 'em on!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Title: Smart Device Programming with Visual Studio .NET 2003
Chat Date: October14th
10:00am - 11:00am Pacific Time
1:00pm - 2:00pm Eastern time
17:00 - 18:00 GMT/BST
Description: You know them from the newsgroups! You love them for their
immense knowledge! Please join these amazing Microsoft MVPs in this live
chat regarding the .NET Compact Framework and the Smart Device Programming
features of VS.NET. The .NET Compact Framework is a subset of the .NET
Framework designed to allow .NET developer to target smart devices. The
Smart Device Programming features of VS.NET allow embedded developers to
target devices running the Compact Framework.
To join this chat, please log on via the main MSDN chat page at:
http://msdn.microsoft.com/chats
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--
--
Thanks!
Michael Fosmire
MVP Lead, Windows Embedded/.NET Compact Framework
This posting is provided AS IS with no warranties, and confers no rights. Tag: Testing Tag: 84772
How to submit bug report?
How does one go about submitting a bug report to Microsoft for a defect in
the .NET framework v1.1.4322?
I was able to find a site for reporting bugs in the upcoming VisualStudio
2005 but nowhere could I find a way to submit bug reports for any other
product.
Is there a way to submit a bug report for v1.1 of the .NET framework or are
any idiosyncrasies to be treated as features ;)
Thanks Tag: Testing Tag: 84770
Reading CD Drive causes Message popup
Hi,
Windows displays a dialog box when I attempt to read files from a CD Drive
and there is not a CD loaded. Anyone know how to stop this dialog from being
displayed?
Following is code used to read drive. drivePath is equal to @"d:\" and d is
my CD rom drive.
Directory.GetFiles ( drivePath, searchPattern );
The dialog box has the following message
"There is no disk in the drive. Please insert a disk into drive D:."
There are three buttions: Cancel, Try Again, and Continue.
Pressing continue causes the following exception.
Source: mscorlib
Exception Type: System.IO.IOException
Message: The device is not ready. Tag: Testing Tag: 84769
Problem with security
I use the security tool mscorcfg.msc to configure a new policy level under
machine level
i set a condition type of URL with value file:///C:/testfolder/*
i create a new permission named myperm oly with UIpermission set to No
Windows
I assign this permission myperm to the level i created before
i move a simple windows form executable to c:/testfolder
It works normally, it should throw a security exception isn't it? or maybe i
forgot someting or misunderstood something?.
Can somebody help me to understand policy levels?
Thanks Tag: Testing Tag: 84767
threadpooling problem?
I am programming a asyncronous server with .NET using ThreadPool..
Basicly Client connected to server using TCP sockets
When I test the program until 25 client server can respond all clients.but
after 25. client connected server cant respond other clients!where is the
problem?
when a client connected i want to check socket if data avaible..
ThreadPool.QueueUserWorkItem(new WaitCallback(CheckSocket),_socket);
....
the CheckSocket callback:
private void CheckSocket(object state)
{
while(_connected)
{
if(_socket.Poll(-1, SelectMode.SelectRead))
{
if(_socket.Connected)
{
....
}
}
} Tag: Testing Tag: 84751