Howto:Auto hide windows task bar
hi,
can any one provide a sample code to auto hide windows task bar using a
.NET
program
Thanx in advance Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59255
Strong named assemblies - Tamper Proof ?
Dear Fellows,
i have been playing around with strong-naming my assemblies for the past
couple of days and I must say I found out something that is rather
disturbing.
Here are my questions :-
1) I want my assemblies to be called and referenced by my client apps only.
What is the proper way to do it ?
2) After I signed off my assembly with a strong name...I actually can
reverse-engineer the IL code out from the assembly with ILDASM, then what i
did was changed some IL code within the assembly and then take out the
public key token from the IL File
.publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 ....) // Delete
this value
Once i do that, i re-assemble it with ILASM Command and then deploy it. The
calling client app can then reference the tampered-with assembly as if
nothing has happened. Of couse, if i do not delete the .publickey string
value as shown above, an exception will occur during loading...
So, what is the proper way to tamper-proof the assembly ? Or this is by
design and the only way is to obfuscate the code ?
Any advice is appreciated. Thank you.
--
Thank you very much
Warmest Regards,
Softwaremaker (WilliamT)
Software Architect
+++++++++++++++++++ Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59242
Can't get duplex printing working
Hi,
I've been trying for quite some time to get duplex
printing working with .Net Framework 1.0 (I haven't tested
with 1.1 yet). As far as I can tell, I'm correctly
setting the PrinterSettings of the PrintDocument. I've
also tried setting the
PrintDocument.DefaultPageSettings.PrinterSettings.
The network printer I'm using supports duplexing, and I've
successfully constructed a simple MFC app that duplexes
correctly.
Does anyone have any ideas, or know of any issues I should
be aware of?
Thanks,
Anthony Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59234
Debuging a page thats in a virtual directoty thats not an app
So lets see what I've tried so far:
- ran aspnet_regiis -i
- reinstalled the .Net framework (1.1)
- modified machine.config to use the SYSTEM account
- ran iisreset
- installed IIS prior to installing Visual Studio
- checked that my user account is a member of local admins and Debugger
Users
This is the simplified structure of my website in IIS :
c:\Website
-------> Home (normal directory)
-------> Engine (*virtual directory* but not an application!)
I made the Engine (which contains code I use in many sites and thus is
centralised) not an application because I use application variables within
this directory.
This is how I set it up in Visual Studio.net 2003 :
Solution "Website"
-------> Project "Website" (points to c:\website)
-------> Project "Engine" (points to c:\Engine)
I have to add the project "Engine" because VS doesnt add the virtual
directory automaticaly.
(I added it with "add existing project from the web")
I set my start page to c:\website\default.aspx and started debuging.
Once I get into a page thats located into the virtual directory where I set
a breakpoint VS tells me that the source isnt available so I dont get to the
breakpoint.
IMPORTANT :
Once I make the virtual directory an application the problem goes away but I
dont want to do this.
How can I get the full power of debuging without making the virtual
directory an application?
I think I am lacking some fundamental understaning about asp.net and
processes. Can you point me in the right direction please? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59230
Crash dumps
Is it possible to code something in C# that would behave like Watson does
and catch my application crashing and give me crash information and send it
remotely to me for debugging? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59222
IDE Start Page; Wrong Modified Date
Anyone had this problem? An app that I've been working on every day for
weeks has a "last modified" date in September. It's not a biggie, but it's
annoying.
(yes my system date is right)
Eric Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59214
XML: & --> &
Hi,
I believe there is in the .NET Library a method to convert a given string
containing not allowed characters (such as & or <) in XML files to
corresponding domains (& etc).
Where can I find such a utility methods?
Thanks,
Leszek Taratuta Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59212
Best way to install a .NET app
Hello,
I have an application that I created and I was wondering
what was the best to provide a install program. I have
been searching the newsgroups and I've read something
about the "Windows Install SDK". Is this the best route
to go?
I am looking to do something "homegrown" rather than go
out and spend money on some installation program.
Thanks,
Deane Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59211
Socket.BeginReceive Question
In all the examples that come with VS, the callback method passed to
BeginReceive look something like:
Dim read As Integer = s.EndReceive(ar)
If read > 0 Then
so.sb.Append(Encoding.ASCII.GetString(so.buffer, 0, read))
s.BeginReceive(so.buffer, 0, StateObject.BUFFER_SIZE, 0, New
AsyncCallback(AddressOf Async_Send_Receive.Read_Callback), so)
Else
' All the data has been read.
So some data comes over, you grab it, then do BeginReceive again in case
there's more data in the buffer (at least in my understanding). But the
documentation says that EndReceive will block until some data is there or
there is a Socket Exception.
Are all these examples incorrect in coding that if the bytes read = 0 then
all the data has been read? The only time my code gets there is when there
is an error.
Just hoping for some clarification,
Mike Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59204
how to obtain the IP Address of DNS Server through the framework
Does anyone know how to obtain the IP Address of my local machine's DNS
Service's IP Address through the framework?
I am writing a DNS query that can resolve an email address to its
corresponding mail server IP. Instead of hardcoding the DNS Server's IP
Address, is there a way to obtain the IP programmatically through the
framework? If not, is there a way to resolve an email address
(System.Net.Dns can only resolve hostnames)?
Brian Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59200
SqlClient connection pooling defect:
When connection pooling is enabled with maximum 5 and
minimum 0 connections, the first time I make a
connection, 2 connections are created in the pool instead
of a single connection. This looks like a defect to me.
New connection should only be created when required. Is
there a way I can limit it to a single connection when
the pool is created.
Thanks,
Koova Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59197
Methods missed
Hi,
I'm implementing a IHttpModule.
I get the Context object like this:
HttpContext m_HttpContext = (HttpContext)((HttpApplication)
sender).Context);
this is done on the BeginRequest event of the Custom
module when I try to access the following statemen:
m_HttpContext.Request.Path.EndsWith("Login.aspx");
I did not receive any error at the compile or run time but
if I debug and watch this sentence I see this text into
the value field of the watcher.
error: 'm_HttpContext.Request.Path.EndsWith' does not exist
Looks that the EndsWith method is not recongnized for the
Path string object contained into the Request object.
Does any know what is going on?
Regards...
. Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59196
PPC2002 eVC++ ActiveSync Provider setting COM object property (x-posted)
Hi All,
I'd REALLY appreciate your help on a small problem - actually I suppose
its not really a problem but a lack of understanding; my C++ skills are
terribly jaded due to lack of use.
Here is some code I've got within an ActiveSync provider I've written
(thanks to the Template with the SDK). All I want to do is initialise a
COM object (written in C#.Net, incidentally) and set one of its
properties.
So I have tried this (the classid of the object is HeyJim...you may have
guessed its only a test object):
CoInitializeEx(NULL, COINIT_MULTITHREADED);
GUID heyjimguid = __uuidof('HeyJim');
CoCreateInstance(heyjimguid, NULL, CLSCTX_INPROC_SERVER, 'HeyJim',
NULL);
I'm sure with the experience on this ng you'll spot the problem straight
away. When i attempt to compile this however in eVC++3 I get 'too many
chars in constant' for the 'GUID heyjimguid' line and 'cannot convert
parameter 4 from const int to const _GUID @'.
And besides, my understanding of __uuidof is that it gets the GUID at
compiletime...thats no good surely, since the GUID will be on PPC2002 not
on my development machine; so how do I ensure that the CoCreateInstance
i'm doing will instantiate the object on the PDA? Won't it have a
different GUID?
I hope you can help, I'd love to offer something in return but I guess I
just can't.
Please Help
Jim Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59190
ANN: Compact Framework Online chat in 10 minutes!
Just a note that there will be an online chat starting in about 10 minutes!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Title: .NET Compact Framework and Smart Device Programming
Date: October 9th
10:00-11:00am (Pacific)
1:00-2:00PM (Eastern)
17:00-18:00 GMT
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 .NETCF
To join this chat go to http://msdn.microsoft.com/chats
--
Thanks!
Michael Fosmire
Community PM/MVP Lead, Windows Embedded
This posting is provided AS IS with no warranties, and confers no rights. Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59187
Avoiding IO Exception
I'm writing a service application (VB.NET) that, for debugging, writes to a
log file.
Sometimes, but not always, when I start the service, it stops because of an
unhandled exception. The event log shows:
Service cannot be started. System.IO.IOException: The process cannot access
the file <my file name> because it is being used by another process.
I *thought* I took care of this by making the logging methods shared, but I
guess it doesn't work:
Public Class Logger
Public Shared Sub LogText(ByVal message As String)
Dim fs As FileStream = New FileStream(Application.StartupPath & "\Sleuth
NCIC Server.log", FileMode.Append)
AddText(fs, message)
fs.Close()
End Sub
Private Shared Sub AddText(ByVal fs As FileStream, ByVal value As String)
Dim info As Byte() = New UTF8Encoding(True).GetBytes(Now & " - " & value &
vbCrLf)
fs.Write(info, 0, info.Length)
End Sub
End Class
Any ideas on what I can do? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59185
How to: Launch application AND open the "triggering" file
Hi, I need some help. Hopefully this is trivial!
I have created a special file type for my application. I can easily
associate the app with the file type manually and I have even seen som code
to do this as well. (MSDN - 185453)
However, once the app is launched after double-clicking on the file,
how can I identify which file was selected, i.e. triggered the launch.
Pls point me to the right direction for search!
Thanks,
Bob Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59179
Logins and User groups
Is there any way I can create a Group from .Net code? Obviously assuming the
user is an administrator.
Cheers
Sparky Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59178
Licensing, trials etc
Is there a class library that allows me to implement licensing into an
appliation, and disable it after a set period etc? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59176
creating an exe that starts without framework
is there a way to create *.exe files which have been coded in C# and
run without an installed .net Framework?
Sebastian Erler Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59175
ComboBox.DataSource .Net v1.1.4322: Problem to assign new datasource
Hello,
I have set the datasource property of a combobox control to an own
type which iherits from CollectionBase.
The first time the assignment works fine but when I try to reassign an
updated version my Collection to the datasource, the datasource
remains unassigned.
With the former framework version it worked fine but with 1.1.4322 the
reassignment is not working.
Does anybody know what the reason for this behavior is?
Thanks for your help in advance,
best wishes,
Stephan
Code Excerpt:
BatchEntries batchEntries = mQueue.Entries;
this.cmbEntries.DataSource=null;
if (batchEntries.Count>0)
{
this.cmbEntries.DataSource=batchEntries;
this.cmbEntries.DisplayMember="DisplayName";
} Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59173
Exchange server and dev
Hi
From within ASP.NET is one able to access exchange server? more specifically
we need the address books/distribution lists, must also be able to maintain,
add, delete, update, etc to that addresss book.
Is this possible? if so where do i start looking to dev such an app?
Thanks
Jason Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59172
Finding the current executing directory
This may sound pretty trivial but it's been driving me nuts; how does one
get the full directory path of the executing application. Using
Environment.CurrentDirectory returns c:\WINNT\System32 - the obviously wrong
path :-(.
This is a Windows development issue so HttpRequest.PhysicalApplicationPath
does not apply. Any suggestions will be appreciated.
Regards, Raphael. Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59165
GAC question
Hi,
Case of two applications adding the same strong name assembly to the GAC,
and one application removes the assembly from the GAC while uninstalling,
will the other application still have the assembly in the GAC?
Thanks, Hagay. Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59158
p2p
I have to write something VERY similar to Kazaa.
Is there something I could use to do some estimation of development time? Is
there anything done on the subject in c#? I couldn't find anything handy in
google for c#.
any pointers?
thanks,
Matias Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59150
Is there .NET Framework for 64-bit platform?
Hi:
Any one knows if there is .NET Framework for Windows Server 2003 (64-bit) ?
Thanks Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59138
DataGrid -- when do selected rows end up on clipboard?
Hi,
I would like to understand when a selected cell, selected row or
selected rows in the DataGrid control ends up on the clipboard. All I
know is that the selection ends up on the clipboard, because when I
issue a copy command then paste to an editor, the selected datagrid
cell(s) end up on the editor.
Maybe a better way of stating my question is during what event (e.g.
MouseUp) do the selected cells end up on the clipboard (I assume via
the Clipboard.SetDataObject() method call.)
Thanks in advance.
Maggie Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59134
Read content from an Excel file via a .NET application
I am looking for good documentation and preferably C#
sample code to show how to read content from an Excel
file via a .NET (Windows Form or ASP.NET) application.
I want to access the file via the Excel object model (for
Excel 2003) from my application. My .NET application
will provide a filename and location, open the excel
file, read content from specific locations within the
spreadsheet, then close the file.
I have searched MSDN and GotDotNet and seen documentation
for the Excel object model and several code samples. But
the paradigm seems to be different in most of these
examples, in that they are tuned for responding to events
when a user opens an Excel file, rather than the paradigm
being that my .NET application will proactively open an
Excel file.
I'm relatively new to C# and to .NET, so forgive me if my
question is not phrased in correct terminology.
Thanks for any help,
Cheers,
Bruce Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59132
Blocking with TCP Sockets
I have a C# program that uses blocking sockets and want to allow the user to
stop the server. The problem I am having is the socket blocks on
--------------------------------------------------------------
listener = new System.Net.Sockets.TcpListener(6254);
listener.Start();
//skt is a socket
skt =listener.AcceptSocket(); <--- this line blocks
--------------------------------------------------------------
I attempt to stop the thread as follows
--------------------------------------------------------------
if (thListener.ThreadState != System.Threading.ThreadState.Stopped)
//thListener is the offending thread
{
try{listener.Stop();} //this always works
catch{System.Diagnostics.Trace.WriteLine("issue");}
thListener.Abort();
thListener.Join(2000);
}
--------------------------------------------------------------
I get the following error
--------------------------------------------------------------
System.Net.Sockets.SocketExchange: A blocking operation was interrupted by a
call to WSACancelBlockingCall
at System.Net.Sockets.Socker.Accept()
at System.Net.Sockets.TcpListener.AcceptSocket()
--------------------------------------------------------------
this error is in an OK-only popup box with no title and appears to be coming
out of the "listener" thread
I have not been able to find any information onWSACancelBlockingCall and was
hoping someone else has an idea how to prevent that popup.
Thanks in advance,
~Logan Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59131
Public encryption
Hi
I'm currently developing two applications (in VB.NET)
that shall communicate in a secure way. As a matter of
fact, I wanted to use the RSA public key infrastructure
for this. One application creates a public and a private
key and sends the public key to the other application (I
only need one-way-communication), so that this one is
able to send encrypted messages to the first application.
Now, I've read about the RSA Cryptographic Provider in
the documentation, but I still don't get how to extract
the public key out of such an instance so that I can send
it. How can I create a public and a private key
correctly? Can anyone help me with this?
Thanks
Sam Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59124
sockets question
Hi,
I'm building an proxy server app, and I have a question. I
want to provide a bandwidth limit function, and I wonder
if the way I'm doing it is right. If I want to limit the
download bandwidth of a socket to, let's say, 100
bytes/sec, when that socket receives some data, I read it
all (let's say 500 bytes) and then I wait 5 seconds until
I read again from the socket. I wonder if it would be
better to just read at most 100 bytes every second... (if
yes, how do i do this?). The communication is TCP, so I
wonder when does the socket tell the remote peer that
packets have arrived, exactly when they arrive, or when my
app reads data from the socket?
Thanks a lot,
Andrei Matei
andreimatei@home.ro Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59121
.NET redistributable and Languages
Can the .NET language packs be applied to non-English
versions of the .NET Runtime. FOr example, if the German
version of the .NET framework is installed, can a
French .NET language pack be applied? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59120
shortcut files
How do you programmatically create a shortcut file to an
existing executable? I am using C# and .NET
Thanks Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59119
installutil.exe fails due to license.dll not found
I either dont know where to look, or havent found
anything on being unable to run installutil.exe
I have a plain vanilla Windows XP machine with VS .Net C#
7.0.
When i run installutil.exe (with params or not), i get an
error message:
"The application failed to start because license.dll was
not found. re-installing the applicaiton may fix this
problem
Has anyone seen this? what's the problem, and what's the
solution?
Thanks! Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59118
Moving from visual studio6 to .net
Hi everybody,
Currently we have .asp(on IIS4) app, back end is SQL
server, plus we have several desktop applications written
in VB6(I have Visual Studio6 on my machine).
We would like gradually to move everything to .NET.
First I would like to move .asp pages to .NET (test server
is Windows2003,IIS6).
As I understand I have to install .NET framework on my
machine. I am wondering if is safe to do it since I still
do development and fixes for .ASP and vb apps. I am
wondering if .net framework will not brake VB6 on my
machine?
Thank you very much
Diana M Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59115
Form to JPG / Capture Screen with .NetFramwork
Hi all,
I need to know If I can convert to JPG or If I can capture the Form and
store it in .jpg o .bmp .
I want to "capture" the view status of Form of my application and store it
in .jpg file
Can anyone help me ?
I haven't found information about ...
nullman Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59114
HELP! Can't get the column that has error on dataset.update
I have the sample code from the microsoft site and it
doesn't work. I am updating a database using a sql
dataadapter. I add a new row and call the update which
causes an error of 'String or Binary Data Would Be
Truncated' err# 8152. OK- so I use the following code:
' String or binary data woould be truncated
If sqlex.Number = 8152 Then
Dim Row As DataRow
' Loop through the rows to find the error
For Each Row In ds.Tables(0).Rows
' If the row has errors the get the columns
If Row.HasErrors Then
Dim ColArray() As DataColumn
Dim ColCount As Integer
' Get the columns that are in error
ColArray = Row.GetColumnsInError()
' Loop through the columns with errors and produce
the column names and rowerror
For ColCount = 0 To ColArray.GetUpperBound(0)
Msg += " Row=" + Row.ToString + " :
ColumnName=" + ColArray(ColCount).ColumnName + " :
MaxLen=" + _
ColArray(ColCount).MaxLength + " :
RowDataLen=" + Len(Row.Item(ColArray
(ColCount).ColumnName)) + _
" : RowError=" + Row.RowError
Next
End If
Next
End If
PROBLEM ColArray.GetUpperBound(0) = -1 ???????
there is no data in the ColArray ??????????
HELP! thanks in advance Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59105
Inheritance trees
Does anyone know where I could find documentation on inheritance tress for
objects in the framework..
Example;
ServicedComponent inherits from ContextBoundObject which inherits from
MarshalByRefObject...
I don't know if that the exact flow or not but I'm sure you get the
picture....
TIA
Dan Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59104
Windows 98 debugging
What are my options to debug a Windows-98-specific bug in
my C# app? I have Visual C++ 6.0 and the .NET SDK (not
Visual Studio .NET), and a standalone Windows 98 test
computer (not near my development computer).
The .NET SDK (with its debuggers) won't install on Windows
98. Is there any way to run the CLR (GUI) debugger
(DbgCLR.exe) on the Windows 98 test machine? I tried
copying DbgCLR.exe to the test machine but it won't run
standalone that way. Can the command-line debugger
(Cordbg.exe) run on Windows 98? Or must I use remote
debugging?
Does the standalone Visual C# product contain the remote
debugger or must I buy the full Visual Studio .NET? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59103
ASP.NET HotFix Rollup download
article 821156 discusses the download for the Hotfix
Rollup. Where is the download? I need it to help meet
Section 508 Accessibility guidelines
thanks Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59102
VB NET Exam PLEASE HELP
Hi. I am an amateur VB.net enthusiast. I currently work as a carpenter
and I moonlight on the weekends as a photographer. I'm trying to
transition a career change.
Is there an exam that leads to certification in VB.net like there is with Java?
How much of the exam will rely on memorization? How much will be from
programming skill? How do they measure my programming ability from one
exam? Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59098
exchange server 2003
The ability to use the calender function in exchange server 2003 is it
possible to access the same functionality from asp.net? If that
function works I guess the rest of them will too. I am wondering if we
can access it from our intranet or mobiledevices...
If its possible, how does one access the exchange srv. with different
user etc.
Thanks up front - I will sleep better when I know if the works or not
:0) Tag: URGENT .net ver 1.0 to .net ver 1.1 Tag: 59092