WMI Getting Remote Computer Harddisk Info
Good day fellows,
my problem is, using wmi we can only get the hard disk info of machine
running the asp.net application, now my question is can we get the
client (Remote Machine) Harddisk info through the same WMI or do we
need to use some other object in order to get remote machine harddisk
info. reply is something i need on urgent basis. i want to get Client
(Remote Computer) Hard disk info on my ASP.NET Page
Dim wmiquery As WqlObjectQuery = New WqlObjectQuery("SELECT * FROM
Win32_LogicalDisk")
Dim wmifind As ManagementObjectSearcher = New
ManagementObjectSearcher(wmiquery)
Dim mobj As ManagementObject
For Each mobj In wmifind.Get()
Response.Write("Device ID: " + mobj("DeviceID") & "<br>")
Response.Write("Description: " + mobj("Description") &
"<br>")
Response.Write("Drive's free space is: ")
Response.Write(mobj("FreeSpace"))
Response.Write("<br>")
Response.Write("Drive's Capacity space is: ")
Response.Write(mobj("Size"))
Response.Write("<br>")
Try
Response.Write("Volume Name: " +
mobj("VolumeName").ToString & "<br>")
Response.Write("Volume Serial Number: " +
mobj("VolumeSerialNumber") + "<br>")
' Response.Write("Volume Serial Number: " +
mobj("VolumeSerialNumber") & "<br>")
Catch ex As SystemException
End Try
Next
with this code i am getting info of my own machine, when i run from
another remote computer it still shows my hard disk info instead of
that machines hard disk info. Thanks Tag: From microphone to sound card Tag: 120905
Deploying native Windows DLL used by .NET applications
We have a native Windows DLL (let's call it native.dll) we developed a .NET
interface for (let's say managed.dll). When a .NET application now uses the
.NET interface to talk to the Windows DLL we always thought that managed.dll
must be copied to the application directory (where the .NET application
runs) and that native.dll can be anywhere as long it is in PATH or is
somehow else found by Windows.
The problem is however that the .NET application hangs on some computers
unless native.dll is copied to the application directory. The problem is
reproducable but exists only on some computers. On one computer native.dll
can be copied to the Windows directory and everything works fine. On the
other computer native.dll must be in the applicaton directory as otherwise
the .NET application hangs when it tries to access native.dll.
I used Dependency Walker (from http://www.dependencywalker.com/) to make
sure that in every scenario all DLLs can be found. Thus I wonder why on some
computer native.dll must be copied to the application directory for the .NET
application not to hang. Is there a deployment recommendation like this? Or
is this a bug in the .NET framework or CLR which doesn't locate DLLs
correctly sometimes?
Boris Tag: From microphone to sound card Tag: 120895
creating dynamic Excel forms, w/ validation -- possible?
hello,
i am on an interesting project. in this project, i have to create
dynamic data-entry forms for offline-users to fill out, save locally,
and eventually postback to our app (when back online). data validation
is required on the form.
i had looked at using PDF-forms for this.. Adobe's "LifeCyle Forms"
would work perfectly. with it one can pass in xml to their webservice &
get back PDF-form binaries. however, Adobe's pricing is simply
unrealistic for any but super-large budgets (got an extra 50k + 20%
annual maintainence for your project? talk to adobe).
so now im back to something low-tech. sure, i could do it w/ .HTML
forms w/ javascript validation, and use javascript to save the
data-entry into a .xml file. however, a two-file solution is not viable
for us.
my next idea is probably better from a user standpoint anyway -- Excel
forms. the user could input into the excel doc, save it, and later
return it to us.
two key questions:
1) can i build dynamic Excel forms w/ .NET?
2) if so, can i build them w/ any kind of data validation?
any help would be greatly appreciated!
thanks,
matt Tag: From microphone to sound card Tag: 120892
Immutable Classes
I've got some classes that I've built that currently require far too many
locks when they're running in a multi-threaded environment. To get around
this, I'm looking to make these classes immutable. I'm also trying to be (as
any good programmer) as lazy as possible about the approach tha tI take.
I have a class (XmppId) that has roughly the same properties on it you would
expect of an email address.
I would like to be able to say,
"public class ImmutableXmppID : Immutable<XmppId>{}"
I would also like to take the same approach as strings, with a global Intern
list and precalculated hashes in order to help with performance.
The issue so far is that this seems to be well beyond the scope of what
Generics can do. The only option for doing this that I can see is to build a
CodeSmith template, or even a custom piece of Code Generation for the
CodeDOM, and then do it.
Anyone done any signifigant work with immutable classes, and have any gems
of wisdom they're willing to pass along?
--
Chris Mullins MCSD.Net, MCPD Enterprise
http://www.coversant.net/blogs/cmullins Tag: From microphone to sound card Tag: 120886
CreateChildView() vs DataTable.Select() on entire table
Can anyone shed some light on why DataRowView.CreateChildView() would
significantly slower than DataTable.Select()?
my DataSet looks like this
DataSet ds; //ds assignment code left out for simplicity
ds.Tables["IDs"].PrimaryKey = new DataColumn[]{
ds.Tables["IDs"].Columns["ID"] };
ds.Tables[0].PrimaryKey = new DataColumn[]{ ds.Tables[0].Columns["ID"],
ds.Tables[0].Columns["STID"] };
ds.Relations.Add("myRelation", ds.Tables["IDs"].PrimaryKey, new
DataColumn[] {ds.Table[0].Columns["ID"]});
ds.Tables["IDs"] was created from Unique ID's in ds.Tables[0]..
then when looping ds.Tables["IDs"].DefaultView...
DataView dv = myDataRowView.CreateChildView("myRelation");
is slower than...
DataRow[] drs =
myDataRowView.DataView.Table.DataSet.Table[0].Select(string.format("ID
= '{0}'"), myDataRowView["ID"});
with 3000 rows in Table[0], i have a piece of code that takes 10-11
secs to run using CreateChildView() vs .05 secs using Select().
i would just use the Select() method, but i lose the ability to use
BoundFields in a GridView (and also Eval in the TemplateFields. i have
to cast the DataItem each time i want to access a field in the DataRow)
any advise would be greatly appreciated.
thanks,
bk Tag: From microphone to sound card Tag: 120885
Compact framework
Hi All,
Is there a possiblity of displaying the picture of the caller
assoicated with him during an incoming call ? and is it possible to
record particular calls automatically ?
Where can I get good examples for these ?
regards,raja Tag: From microphone to sound card Tag: 120882
Asynchronous Design Pattern
I'm thinking about using the design pattern described at the link below
to solve a problem:
http://msdn2.microsoft.com/en-us/library/ms228963.aspx
I have a question, though, and would appreciate any help.
The pattern describes using BeginOperationName and EndOperationName
methods for asynchronous operations, where "OperationName" represents
the name of the operation to be invoked asynchronously. For example, say
you want to read from a Stream asynchronously. You would call BeginRead,
passing it an AsyncCallback delegate and possibly an object representing
state information. At some point, the stream invokes your callback. In
your callback, you call EndRead, passing it the IAsyncResult object
given to you to get the result of the read operation.
Ok, say we are writing a class to implement this pattern. Instread of
reading bytes, we're reading an object of some type. Let's call the
class ObjectReader. We have the methods BeginReadObject and
EndReadObject. Like the Stream class, this class has a Close method that
disposes of the object.
Where it gets fuzzy for me is trying to figure out what should happen
when the BeginReadObject method is called and the ObjectReader's Close
method is called before the specified callback is invoked.
My thought is that in response to being closed, the ObjectReader should
invoke any awaiting callbacks. When the callback calls EndObjectRead, it
returns null indicating that no more objects are available to be read.
Once all awaiting callbacks have been invoked, the ObjectReader finishes
closing down. At this point, it is officially closed; any attempt to
read from the ObjectReader will throw an ObjectDisposedException.
For BeginReadObject operations that were invoked without a callback,
i.e. null was passed instead of a delegate for the callback parameter,
the wait handles of any remaining IAsyncResult objects are set when the
ObjectReader is closed. Calls to EndReadObject behave just as they would
inside the callback.
Any thoughts? Tag: From microphone to sound card Tag: 120880
How to force the security alert dialog to appear
I would like the user to be able to choose "Unblock" on the security alert
dialog when my application attempts to send a UDP packet for the first time.
However, the securlty alert dialog does not appear. I have to tell the user
(when running the app for the first time) to manually add my app to the
exceptions list in the firewall. Why isn't windows prompting the user with
the security alert dialog? I have the "Display notification..." check box
checked, and it still doesn't appear. Is there something I should do before
sending the packet?
Doesn't the security alert work with UDP packets?
Thanks Tag: From microphone to sound card Tag: 120878
How to
Hi All,
I am Ilayaraja. I have a interesting (might be beginners) doubt in
Dot Net framework.
I have an Solution Named X, I have to two projects A and B. A is an
windows Applicaiton developed in VB.Net 2005 and B is an Class
Application developed in C# 2005.
B has an class similar to this..
public class Class1
{
public static string Upper(string a)
{
string s;
s = a.ToUpper();
}
}
I want to refer this class in VB form in the button click event.
How to do that..
One solution I have got is that creating a DLL file for the class and
give it an reference in the VB project and remove the Class application
from the solution file.
Do we have any other solution for this doubt?
Please help me on this. Tag: From microphone to sound card Tag: 120873
Designer Error when Inheriting from a Custom Base Control
I have a project named CuiNetCF.Windows.Forms, where I have created a
TextBoxBase class that is inherited from System.Windows.Forms.TextBox.
I then try to create a TextBoxInherited that is inherited from my new
TextBoxBase.
The project compile and run fine BUT when viewing the TextBoxInherited
in the designer I receive the following message:
ERROR: The designer could not be shown for this file because
none of the classes within it can be designed. The designer
inspected the following classes in the file: TextBoxInherited
--- The base class 'CuiNetCF.Windows.Forms.TextBoxBase'
could not be loaded. Ensure the assembly has been referenced
and that all projects have been built.
This message goes away if I include a reference the project, but it
doesn't seem right that I would need to add a reference to the same
project! What am I missing???
[TextBoxBase.cs]
namespace CuiNetCF.Windows.Forms
{
public partial class TextBoxBase : System.Windows.Forms.TextBox
{
public TextBoxBase()
{
//Maintained by the designer
InitializeComponent();
}
}
}
[TextBoxInherited.cs]
namespace CuiNetCF.Windows.Forms
{
public partial class TextBoxInherited : TextBoxBase
{
public TextBoxInherited()
{
//Maintained by the designer
InitializeComponent();
}
}
}
Here are the steps that I do to create this problem:
1.) Create a new windows project.
2.) Add a new Custom Control called TextBoxBase.cs.
3.) Change the TextBoxBase class to inherit from TextBox.
4.) Add a new Custom Control called TextBoxInherited.cs.
5.) Change the TextBoxInherited class to inherfit from TextBoxBase.
6.) Try to view the TextBoxInherited class in the designer.
Does this error out for anybody else??? Tag: From microphone to sound card Tag: 120871
.NET 2.0 embaressment
Hi everyone.
I have a .NET 2.0 application that has been released using clickonce
installation both online and from CD. I have no control over the end user
systems and I am being flooded with complaints that the application fails to
install on XP SP1 machines and NT4 systems.
I understand that these two operating systems are not on the .NET framework
2.0 compatbility list. However the application will install and run on XP
SP1 if I remove the MDAC 2.8 dependancy. However removing the MDAC 2.8
dependency means that windows 98 and ME systems will fail if MDAC has not
been installed.
The application was been very well received but the installation issues have
left me red faced.
I would like to redistribute the application but this time I do not want the
installation to fail if the OS is not supported. I am OK about not
supporting NT4, but I would like conditional support for XP SP1 installs
using MDAC 2.7.
Steve Tag: From microphone to sound card Tag: 120864
Click once and exe.config file
I'm about to release a application to a customer. This app uses a
config file to store connection settings. I'd like to be able to create
a "Click Once" installer, as this will remove lots of dependency issues
that are likely to arise with this app. However, my understanding of
click once is that the application is installed to a obscure location,
thus making it difficult for the customer to locate the config file in
order to edit the settings.
Is there an easy way around this, or given the requirements, would I be
best advised to create a traditional installer package?
I'd be grateful for any comments, as its vital I get this working
correctly!
Greg. Tag: From microphone to sound card Tag: 120861
Adding a Section In Configuration File
I know that we can add a single name value entry in app.config or
web.config in the configuration/configSettings/appSettings section like
so:
<add key="key" value="value" />
Question: I want to add a dictionary of name-value pairs. In other
words, instead of a single name-value, I want to add a name-value
collection in there. I could do this:
<add key="key1" value="value1" />
<add key="key2" value="value2" />
<add key="key3" value="value3" />
but that would mix it up with other members that I do not intend to
have as a part of this collection. Is there a way I can add a
collection itself? How? And how would I then access it? Tag: From microphone to sound card Tag: 120860
Converting 1.1 webapp to v2
Hi,
We've finally got around to getting VS2005 for our development team and will
be slowly, but surely upgrading all our in house projects accross.
However -we have fallen at the first project!
when converting a V1.1 web app to V2 - when compiling we get the following
error:
Error 1 The type 'ProductDB.Global' is ambiguous: it could come from
assembly
'C:\Source\Systems\ProductDBAdmin\ProductDBAdmin_Mainline\src\AdminGui\bin\DRL.ProductDB.DLL'
or from assembly 'C:\Temp\admingui\5f2af3cc\f03cc022\App_Code.jgiqizcm.DLL'.
Please specify the assembly explicitly in the type name.
C:\Source\Systems\ProductDBAdmin\ProductDBAdmin_Mainline\src\AdminGui\Global.asax
1
I have searched the web and the only replies I can see are "Delete your bin
folder contents" or "Delete the temporary files folder"
none of which worked for me..
Is there a fix / workaround / article for this that I'm missing?
Regards
Phil Yardley Tag: From microphone to sound card Tag: 120859
User interface editor
I am able to add different dialogs to my deployment project using the User
Interface Editor in Visual Studio .NET 2003 but I am yet to find out how to
retrieve the values entered by the user during installation.
For example, if I add a new dialog which contains a TextBox and I ask the
user to enter their name, how do I retrieve that name?
I have scanned the web for a long time and yet I still haven't seen an
example of how to get the values entered by the user during installation.
Can anyone please point me to a suitable demonstration? Tag: From microphone to sound card Tag: 120858
AppSettings trough ConfigurationManager
I have a small test app with the code:
Configuration cf =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
cf.AppSettings.Settings.Add("EnNyNokkel", "EnNyVerdi");
cf.Save();
If i run my app from inside VisualStudio through debug my created
config file is created on startup of the program, but deleted when main
is finished!
If i however run the app from commandline or explorer, the
configuration file is not deleted when the application finishes.
Any good ideas why? Is this default debug settings? Tag: From microphone to sound card Tag: 120857
show big image
Hi all
I have this problem
I'm developing an application c# that interfaces with a digital camera
as soon as the image is shot I download it in the PC and show it
The problem is this one:
the image is very big : 16 megapix!
when I load it in a picturebox. If i try to pan or zoom (i modified the
picture box to do that) the app is stuck ( I suppose because the load of
panning and resizing such a big picture is very big too).
I noticed that the same image is managed in a very efficient way by some
freeware application such as for example irfan view
My question is:
there is a way in c# (maybe by a freeware library or component) to show, pan
and zoom such a big image?
Thanks Tag: From microphone to sound card Tag: 120856
How to configure Access database using Enterprise Library Data block
Hi
I want to know how to configure Access database using Enterprise
Library Data block. I want to be able to spacify local path to mdb file
in configuration file. I do not want users to creat DSNs, they should
be able to connect any mdb file to application by updating
configuration file.
Best Regards
Burki Tag: From microphone to sound card Tag: 120855
Dealing with Timezones
In .Net 2.0, I can get the standard name of the current timezone by:
System.TimeZone.CurrentTimeZone.StandardName
The problem I'm having is that I have datetimes that are serialized as a UTC
time, with a named timezone. I keep looking for a way to say:
System.TimeZone tz = new TimeZone("PST");
tz.ConvertToLocalTime(utcTime);
Problem is there doesn't seem to way to do this. Anyone got any suggesting
for dealing with TimeZones?
--
Chris Mullins MCSD.Net, MCPD Enterprise
http://www.coversant.net/blogs/cmullins Tag: From microphone to sound card Tag: 120849
Windows Defender
I got A virus and the Defender was doing its job..but when all these windows
started popping up I clicked on some "Ignore" buttons by accident..It finally
cleaned the puter but when it runs the scheduled scan I wind up having to
reboot to clean the puter. I realize there is still a problem, but when I go
to the "Allowed Items" to delete the problems there is nothing there. I want
this to go away! Can someone plz advise on what is the best solution.
Thanks Tag: From microphone to sound card Tag: 120847
ANN: ZipForge.NET 1.00 is released
ZipForge.NET lets a .NET application create and manipulate Zip files and
perform a
wide variety of data compression operations. This includes an ability to
add, move,
extract, delete, update, test, refresh a group of files or folders by a single
operation; save or load zipped data from stream; add compressed data from
stream.
What's more, ZipForge.NET allows compressing files, buffers, streams,
strings and
repairing corrupted archives. Users will also benefit from its unique
Transaction
System. This technology delivers a very fast and easy way to update archive
files,
while providing data integrity like a reliable database system.
ZipForge.NET is written entirely in 100%-managed native C# code and takes
advantage
of all the safety and reliability benefits of the .NET framework. There is a
well-designed component interface, plenty of code samples and demos for C#,
VB.NET
and Delphi.NET. Thanks to all this, the component is easy to incorporate
into an
application. At any stage of using the component, customers can rely on a
quick and
knowledgeable response from the technical support team that will help to
resolve any
problem in less than a few hours.
Read the detailed information at
www.componentace.com/.NET_zip_component_zipforge.htm Tag: From microphone to sound card Tag: 120846
Get day name given year, month and day number
Hmm.
Is there a way to get the day name (ie Monday) given a year, month and
day number?
Thanks,
Chris Tag: From microphone to sound card Tag: 120842
The security alert dialog does not appear when my program sends UD
I would like the user to be able to choose "Unblock" on the security alert
dialog when my application attempts to send a UDP packet for the first time.
However, the securlty alert dialog does not appear. I have to tell the user
(when running the app for the first time) to manually add my app to the
exceptions list in the firewall. Why isn't windows prompting the user with
the security alert dialog? I have the "Display notification..." check box
checked, and it still doesn't appear. Is there something I should do before
sending the packet?
Doesn't the security alert work with UDP packets?
Thanks Tag: From microphone to sound card Tag: 120841
Saving a locally created Bitmap
Seems like this ought to be an easy one. Essentially, using managed
C++, I'd like to be able to create a Bitmap locally, set the pixels to
particular colors, and save the result. Everything seems to work fine
except that upon calling the Bitmap's Save function I always get a
status of "FileNotFound" and it creates a file with 0 size.
The Code:
void CChildView::Test()
{
Gdiplus::Status stat;
Bitmap bmp(2048,2048,PixelFormat24bppRGB);
Color red,grn;
red.SetFromCOLORREF(RGB(255,0,0));
grn.SetFromCOLORREF(RGB(0,255,0));
int i,j;
for(i=0;i<2048;++i)
{
for(j=0;j<2048;++j)
{
if(i==j)
stat=bmp.SetPixel(i,j,grn);
else
stat=bmp.SetPixel(i,j,red);
}
}
CString sPath("c:\\test.png");
WCHAR wszPath[256];
MultiByteToWideChar( CP_ACP, 0, sPath,
sPath.GetLength()+1, wszPath,
sizeof(wszPath)/sizeof(wszPath[0]) );
stat=bmp.Save(wszPath,&ImageFormatPNG);
}
I should mention that yes, Gdiplus is initialized prior to entering
this function. Status (stat) remains "OK" until the Save operation,
where it changes to "FileNotFound". What am I missing here? I've had
the same problem with different file types (BMP rather than PNG, for
instance). Tag: From microphone to sound card Tag: 120839
Select Data Source Dialog - Odbc
Hi,
I am creating my own customize ODBC dialog box (in Vb.NET) just like as we
have when we run MSDASC-> DataLinks -> Prompt New(). To acheive this I am
using Odbc32.dll and Odbccp32.dll by this I can create DSN by using
SQLCreateDataSource and can fetch the name of the available DSNâ??s but I am
facing problem in case of Build Connection Stringâ?¦ In the standard DataLink
window when we click on the Build button it will open a dialog from where
user can choose there DSNâ??s or can create a new oneâ?¦ and after the completion
of this operation it returns a connection string thatâ??s became visible in
connection string text box of the Datalink window... the same functionality I
want from my code.
If any one knows which API method should I need to call here or what will be
the process for getting the same. It will be very very helpful to me.
Thanks Tag: From microphone to sound card Tag: 120834
Unable to install DotNet 2.0 Framework on W2k3 Standard Server
After initial page of installer comes up, it shifts to the following
message:
The following error occurred during setup:
The installation package or a needed file could not be opened. Verify that
the package
exists and that you can access it.
I have used this particular installer (dotnetfx.exe) on several different
servers successfully.
Does anyone have a clue as to what is missing?
How can I determine what is missing?
Thanks,
Bill Tag: From microphone to sound card Tag: 120833
ILASM for Compact Framework 2
I already asked in CF group, but nobody was able to help me - I hope
someone here would know the answer...
I need to compile some IL code to CF2 class library (.dll). I just
tried it, got the dll using something like
"c:\WINNT\Microsoft.NET\Framework\v2.0.50727\ilasm.exe /DLL mycode.il".
The DLL looks ok on first sight (I can see all the classes using
reflector), but if I add the assembly to my SmartDevice CF2 project in
VS2k5, I'm not able to use the classes. The reference is added without
any error messages, but the compiler doesn't recognize names of the
classes in the assembly if I try to use them...
If I try to use the assembly from WinForms project, everything works
ok. So it looks like the ilasm generates just full-framework compatible
assembly.
Is there any special ilasm.exe tool for compact framework? Tag: From microphone to sound card Tag: 120830
Auto mail from SQL
Hi
can any one tell me that how i can send email to my registered clients
from sql store procedure if they meet some specific critaria. and this
store procedure will automaticelly execuate after every 10 minutes and
check the database. if any client meet the critari specified a mail
will be send to that client.
thanx Tag: From microphone to sound card Tag: 120825
How to improve performance of Queue accessing between 2 threads?
Dear Guys,
I write program that sharing Queue between 2 threads which 1 thread add data
to Queue. And another thread get data from Queue to process. My situation
is if there are alot of data to add (like loop to add). The 2nd thread which
try to get data from Queue cannot access or rarely to access that Queue which
make the program has low performance.
How can I do to improve this situation? I want 2nd thread can access as
fast as possible once Queue is not empty.
Here is some snippet code:-
Thread#1
For i as Integer = 1 To 1000
SyncLock _queue.SyncRoot
_queue.Enqueue(i)
_newItemEvent.Set()
End SyncRoot
Next
Thread#2
Dim item As Integer
While _queue.Count <= 0
Thread.SpinWait(0)
End While
While _queue.Count > 0
SyncLock _queue.SyncRoot
item = DirectCast(_queue.Dequeue(), Integer)
....
End SyncLock
End While
Thanks,
Thana N. Tag: From microphone to sound card Tag: 120824
.NET Snippets
Hello,
I would like to show you my new web page. On this site you can publish
and download .NET code - snippets for free.
Please tell me your opinion, and have much fun to publish new snippets.
This is the Link: http://www.dotnet-snippets.de/dns_en/Default.aspx
Jan Tag: From microphone to sound card Tag: 120822
.NET Codesnippets
Hello,
I would like to present my new web page to you. On this site you can
publish and download .NET code - snippets.
Please tell me your opinion, and have fun to publish new snippets.
This is the Link.
Jan Tag: From microphone to sound card Tag: 120821
Dirty property value persist problem in asp.net custom control
Hi,
I created a custom control, and encountered a dirty property value
persistence problem.
I created a property with a custom class type, call SQLSettings which
holds the SQL connection parameters, the class as follows:
public sealed class SQLSettings
{
private string serverName;
.......
public SQLSettings()
{
this.serverName = string.Empty;
......
}
[NotifyParentProperty(true)]
public string ServerName
{
get
{
return this.serverName;
}
set
{
this.serverName = value;
}
}
..................
And, I also created an mapping TypeConverter and UITypeEditor classes
to handle the design-time founctinality. The property I created in my
conbtrol as follows:
[BrowsableAttribute(true)]
[CategoryAttribute("Behavior")]
[BindableAttribute(true)]
[NotifyParentProperty(true)]
[EditorAttribute(typeof(SQLSettingsUITypeEditor),
typeof(UITypeEditor))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[TypeConverter((Type)typeof(SQLSettingsTypeConverter))]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public SQLSettings SQLSettingsData
{
get
{
return this._sqlSettings;
}
set
{
this._sqlSettings = value;
}
}
They all works fine when first set value to this property, I can see
the persisted data showed in .aspx file. When I go back to design view
and update the property value via my UITypeEditor, I can see the value
already updated in VS.NET properties browser. But when I turn to see
.aspx file in code view, I didn't see the dirty property value updated
in .aspx file. When I turn to design view, the updated property value
is lost, it remain keep the first persisted value.
How about to solve this problem? Any idea?
Thank you for your kindly help. Tag: From microphone to sound card Tag: 120820
WebRequest Exception: "The attempted operation is not supported for the type of object referenced"
We have written an asynchronous download class that uses the WebRequest
to perform downloads. Things are working fine in-house, and it's fine
for the vast majority of our users, but there is an increasingly large
of people who are getting the following exception:
Exception Type: System.Net.Sockets.SocketException
ErrorCode: 10045
SocketErrorCode: OperationNotSupported
NativeErrorCode: 10045
Message: The attempted operation is not supported for the type of
object referenced
Doing a search on that phrase ("The attempted operation is not
supported for the type of object referenced") almost immediately led me
to this page: "How to determine and recover from Winsock2 corruption"
http://support.microsoft.com/kb/811259
Using the instructions on that page has worked for 100% of the users
with the problem! At first I though, "Great!" But now we're seeing a
lot of these, and I'm starting to think that since it's not that
isolated, it might not really be a true "problem" on their machines.
It might be a firewall program or some other incomptaibility. Have
other people seen this before? Do you know of something "innocuous"
that could be causing the SocketException?
Any hints, guesses, or shots in the dark would be greatly appreciated.
Many thanks,
Taylor Tag: From microphone to sound card Tag: 120817
'System.InvalidOperationException'
An unhandled exception of type 'System.InvalidOperationException' occurred
I am getting this error when running the built executable directly from the
bin folder -- however, it doesn't give me the error when I run from within
the IDE
(DEBUG or RELEASE).
It does seem to run fine on another computer.
System.InvalidOperationException was unhandled Message="An error occurred
creating the form. See Exception.InnerException for details. The error is:
The type initializer for 'Falcon.PrintConsole.modGlobal' threw an
exception."
Source="Falcon.PrintConsole"
StackTrace:
at Falcon.PrintConsole.My.MyProject.MyForms.Create__Instance__[T](T
Instance)
at Falcon.PrintConsole.frmMain.Main()
Help? Tag: From microphone to sound card Tag: 120816
Cannot create ActiveX object (on Windows 2000)
I have made a small interop function that uses Acrobat Distiller.
It works smothly on all the XP machines, but when I try to run it on a
Windows 2000,I get this error:
System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String
ServerName)
at MediaBuilder.Utils.PDFCreator.PDFCreator.Main(String[] args) in C:
\Visual Studio Projects\Utilities\PDFCreator\Main.cs:line 31
And line 31 looks like this:
objDist = (ACRODISTXLib.PdfDistiller)
Microsoft.VisualBasic.Interaction.CreateObject
("PdfDistiller.PdfDistiller","");
What is the difference between running this under XP and 2000?
The odd thing is, that I can compile it with out errors on the 2000, it is
just when I run it, I get this error.
Could it be because of the call/use of
Microsoft.VisualBasic.Interaction.CreateObject, that should work W2KSP4.
I have also tried DCOM configuration
(http://support.microsoft.com/kb/q183607), but even with even with this, I
still get the error. Tag: From microphone to sound card Tag: 120814
Problem with ColorDialog and MenuStrip
Hi,
problem #1 : I have a MenuStrip on my Windows form and it doesn't get
painted (is transparent) unless I move the form... Anyone ever encountered
this? Anyone knows what could cause it?
problem #2 : I want to make a ColorDialog appear, but everytime I want to
show it, it appears behind my form so I have to go to another application
and go back to my application to see it. Is it a bug? Here's the code
(can't be simpler)
ColorDialog cd = new ColorDialog();
cd.ShowDialog();
Can anyone help please?!? These are the last two known bugs in my
application.
Thanks
ThunderMusic Tag: From microphone to sound card Tag: 120813
MSIL Inquiry involving boxing
Hi,
I'm following a tutorial and they translate this C#:
object[] a = {1, "Hello", 123};
to this IL:
.entrypoint
.locals (class System.Object[] V_0,class System.Object V_1,class
System.Object[] V_2,int32 V_3)
ldc.i4.3
newarr [mscorlib]System.Object
stloc.2
ldloc.2
ldc.i4.0
ldc.i4.1
stloc.3
ldloca.s V_3
box [mscorlib]System.Int32
stelem.ref
ldloc.2
ldc.i4.1
ldstr "Hello"
stelem.ref
ldloc.2
ldc.i4.2
ldc.i4.s 123
stloc.3
ldloca.s V_3
box [mscorlib]System.Int32
stelem.ref
But when I compile similar code, I get a big difference. Instead of putting
the integers in a local variable, they are stored directly and boxed via:
IL_0006: stloc.2
IL_0007: ldloc.2
IL_0008: ldc.i4.0
IL_0009: ldc.i4.1
IL_000a: box [mscorlib]System.Int32
IL_000f: stelem.ref
IL_0010: ldloc.2
IL_0011: ldc.i4.1
IL_0012: ldstr "Hello"
IL_0017: stelem.ref
IL_0018: ldloc.2
IL_0019: ldc.i4.2
IL_001a: ldc.i4.s 123
IL_001c: box [mscorlib]System.Int32
IL_0021: stelem.ref
The big difference is that the number is pushed directly on the stack and
boxed, rather than the number going into a local variable and the address
being pushed and then boxed.
So 2 questions:
1) Why would there be a difference? I tried both 1.1 and 2.0 compilers, but
can't seem to get the ldloca.s version?
2) The more interesting question is how does the box instruction work on a
"transient pointer?" Here's the interesting segment:
ldloc.2 <- push address of array
ldc.i4.0 <- push index 0
ldc.i4.1
stloc.3 <- store number one in local integer variable V_3
ldloca.s V_3 <- Put address of local variable on stack
box [mscorlib]System.Int32 <- I guess Box will be able to work with
the address??? and make a box based on the dereferenced address?
stelem.ref
For those curious, the tutorial I'm following is:
http://www.vijaymukhi.com/documents/books/ilbook/chap12.htm
And do a search for the text "It is in stelem.ref and we are not privy to
this code". (It's the following example, after this text)
Thanks all...
-Ben Tag: From microphone to sound card Tag: 120812
HttpModule not working with GAC
Hi All,
I am facing this strange problem here.
I have created a custom HttpModule to filter the response. It worked
fine when i tested it as a part of my existing project. But when I
created a new project and got a dll after strong naming it and putting
into GAC, it wouldn't work any more. I have added a new entry in
machine.config under <httpModules> tag to make it filter each asp.net
response.
But I have no clue why its not workig now.
Any help would be highly appreciated.
Thanks.
VD Tag: From microphone to sound card Tag: 120810
Framework Install Error
Hi Folks,
I've hit the dreaded Error 25015 installing Framework 2.0 on WinXP :
---------------------------
Microsoft .NET Framework 2.0 Setup
---------------------------
Error 25015.Failed to install assembly
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.Vsa.dll'
because of system error: The process cannot access the file because it
is being used by another process.
I've tried the tips online - virus checker, permissions, cleanup tool
etc. No luck. Only process accessing the file is the installer itself.
Any suggestions?
Thanks,
Davy Mitchell Tag: From microphone to sound card Tag: 120805
'System.InvalidOperationException'
An unhandled exception of type 'System.InvalidOperationException' occurred
I am getting this error when running the built executable directly from the
bin folder -- however, it doesn't show when I run from within the IDE
(Debug).
I've not tried it using Release - as I'm not wanting to "fix" the problem
inadvertantly simply by switching modes (if that makes sense).
I'm seeing lots of posts regarding this, but all seem general - and none of
them, that I found, relate to running under the IDE vs the EXE.
I sent the EXE to a collegue who seems to be able to run it just fine. I'd
like to find out what it will take to get it working on my dev box, as I'm
sure the first customer we install this on will have the same problem (don't
ask me how I know, I just do -grin )
Help? Tag: From microphone to sound card Tag: 120803
unrecognized attribute xmlns
I get this error accessing a 2.0 site on a web server previously running .net
v1.1.
I've installed v2.0. I've run aspnet_regiis -i. I've changed the ASP.NET
version on the ASP.NET tab in IIS. But it still uses the v1.1 framework.
Any suggestions? Tag: From microphone to sound card Tag: 120793
Diagnosing System.IO.IOException
I have an application that generates and moves 1000s of small text files.
Every so often for some unknow reason I start to get the following 2
exceptions:
System.IO.IOException: Not enough quota is available to process this
command. at System.IO.Directory.GetFiles(String path, String searchPattern)
and (if the first exception does not happen we get a bit further and try to
move the files we found)
System.IO.IOException: Insufficient system resources exist to complete the
requested service. at System.IO.File.Move(String sourceFileName, String
destFileName)
I can see no problems with available memory, the app does not use huge
chunks of resources as far as I can tell from taskman and process explorer,
restarting the application clears the problem. Load on the app does not seem
to cause it as I can hit it VERY hard and it does not fail.. this leads me to
think it is down to another application or the OS.
Has anyone else seen this or got any good ideas on how to track the cause? Tag: From microphone to sound card Tag: 120789
DataTable.Select Aggreate function
Hi Newsgroup
I've the following problem:
i have a statement on a DataTable thats looks like:
BKD.Select(string.Format("{0} = MIN({0}) AND {1} = {2} AND {3} = {4}",
BKD.PeriodeVon.ColumnName,
BKD.HerkunftsRefNr.ColumnName, rowBKD.HerkunftsRefNr,
tmBKD.BKD.StatusCd.ColumnName, BKDStatusCd.Differenziert)
I always get an Array back with length zero but the Data i'm looking for are
in the DataSet.
Is it not possible to do an aggregate function and other filtering in the
same statement?
Thanks in advance
Stefan Tag: From microphone to sound card Tag: 120782
Not able to run Quick start application in Enterprise library 2.0
Hi,
I just read the article about Enterprise Library 2.0 , well its
intresting and am new to it ... and happen to see the examples that was
given in quick startapplicaion about
Caching Application Block.
Cryptography Application Block.
Data Access Application Block.
and others too..
but when i run the application like (Open-> website->CS (caching
program) , and i re-built it
and when i run it the page displays:
[CODE]
Directory Listing -- /CS/
--------------------------------------------------------------------------------
Monday, August 14, 2006 02:37 PM <dir> CryptographyQuickStart
Thursday, January 05, 2006 09:58 AM 3,600
CryptographyQuickStart.sln
Tuesday, August 22, 2006 07:24 PM 1,585 Web.Config
--------------------------------------------------------------------------------
Version Information: ASP.NET Development Server 8.0.0.0
[/CODE]
why is that ..? this happens for all the quick start samples...
waiting for ur reply ... Tag: From microphone to sound card Tag: 120780
system.badimageformatexception returned from custom installer
I have a web project that I have converted from VS 2003 to VS 2005. The
installer is configured to use detect a newer version and if found to
uninstall the old version before installing the new version.
The installer in the new version VS 2005 contains custom actions that are
compiled with VS 2005. For launch conditions, I have configured the .NET
Framework to be at 2.0.50727 and Allow Later Version si set to True.
When I run the installer I receive the system.badimageformatexception which
references the dll that contains the custom installer code.
If I uninstall the 2003 version of the software and then do an install of
the 2005 version everything works fine. But if I have the 2003 version
installed and then run the installer for the 2005 version I receive the error
about the bad image.
Is this a bug? Am I doing something wrong? Are there workarounds? Will my
customers have to uninstall the old version manually before installing the
new version?
Thanks,
Leslie Tag: From microphone to sound card Tag: 120777
Credientials to an HTTP POST request.
I am trying to post an HTTP request to a site that requires a user name and
password. I am trying the following:
objRequest =
DirectCast(System.Net.HttpWebRequest.Create(urlString),
System.Net.HttpWebRequest)
Dim credentials As New CredentialCache()
credentials.Add(New Uri(urlString), "Basic", New
NetworkCredential("user", "password"))
'Dim credentials As NetworkCredential = New NetworkCredential()
objRequest.Credentials = credentials
But using Fiddler I don't see any of the security authorization header
information so I am wondering if the user name and password is getting
passed. First does the above look correct?
Thank you.
Kevin Tag: From microphone to sound card Tag: 120776
Hi,
How to output the sound from microphone direct to sound card?