Late Bind GAC Assembly ?
I have an assembly that needs to poll the GAC for the existence of
another GAC'd assembly, and if version 1.4 exists, load 1.4, but use
1.5 if it is available.
Where is a good code example of how to make that happen?
Thanks. Tag: Panel control like background. Tag: 68578
Option to Do "Quick Fix"
Hi,
Recently I worked on a project where we brought in a Microsoft employee to
help us. He and I were trying to do a "quick fix" on a server that contained
an entire dotnet application, and he showed me an option that you could put
into a file (I can't remember if it was a .aspx file or a Web.config file)
that would allow us to test the change without re-compiling.
I can't find where I wrote down the option to use, could someone else tell
me what it is? I've searched the documentation, but apparently I'm not
looking in the right places. I have some vague memory of it having something
to do with this line:
<%@ Page language="c#" Codebehind="Console.aspx.cs" AutoEventWireup="false"
Inherits="BackupConsole.WebForm1" %>
Thanks,
Steve Tag: Panel control like background. Tag: 68575
System.ExecutionEngineException
I'm getting the System.ExecutionEngineException from my data layer when I'm trying to Insert a duplicate row into the database using the ExecuteNonQuery method of command object. I'm using OLEDB connection in my application.I saw in the microsoft site saying that its an internal CLR error.So i tried reinstalling the whole .NET frame work and still of no use. Its highly appreciated if anyone can help me out in this
Thanks in advanc Tag: Panel control like background. Tag: 68571
Installer - Custom Textboxes in UI problem
I have added a 'Textboxes (A)' to my UI installer project along with a
custom action to pass the value back to a class I've written to override the
void Install function. As long as the text is very simple everything is
working just fine. I've tested it by writing the string out to a text file
to test it.
However, the trouble comes in when I use the textbox for what I really
intended, a ADO.Net Connection String. The textbox is to allow the user to
put the connection string and I intend to test the db connectivity and write
it to the registry during installation. However, when I enter a real
connection string in the box, it chokes and gives an error -- presumably
because of either the semicolon, space, or equals characters in it. Is
there a list of characters that can't be input? Do I need to escape them
somehow before passing them?
(notice the beginning of the exception message is _PART_ of my connection
string, it's trying to parse that string into multiple context parameters I
think). I get the following error
Exception occured while initializing the installation:
System.ArgumentException: File Source=workstation;Initial does not exist.
If this parameter is used as an installer option, the format must be
/key=[value]..
(OK Button)
Again, everything works when the string is simple, so I'm sure I'm passing
it OK. Just to provide all the info - I've named the Edit1Property to
'CONNSTRING' and the custom action 'CustomActionData' is
/connString=[CONNSTRING]. The exact string I input in the box and
overridden install function is below:
String Input:
Data Source=workstation;Initial Catalog=serverPerformance;User
ID=serverPerformance;Password=server;
My install function:
[RunInstaller(true)]
public class ProjectInstaller : System.Configuration.Install.Installer
{
public override void Install(IDictionary state)
{
string connString = this.Context.Parameters["connString"];
if(connString == "")
{
throw new InstallException("The database conection information is not
optional. Please obtain this information from your system administrator and
run setup again.");
}
System.Data.SqlClient.SqlConnection myConn = new SqlConnection();
try
{
string queryCount = "SELECT count(*) FROM sysobjects WHERE name like
'sample%' AND xtype = 'u'";
myConn = new System.Data.SqlClient.SqlConnection(connString);
System.Data.SqlClient.SqlCommand cmdCount = new
System.Data.SqlClient.SqlCommand(queryCount,myConn);
myConn.Open();
int tableCount = (int) cmdCount.ExecuteScalar();
if (tableCount<2)
{
throw new InstallException("The connection to the database was made
successfully, but the correct database structure doesn't exist. Please use a
different database or refer to the documentation to build the database
structure and then reinstall this service.");
}
}
catch (System.ArgumentException argEx)
{
throw new InstallException("Error validating provided SQL connection string.
Please check your connection string and run setup again.\r\n\r\nError: "
+argEx.Message);
}
catch (System.Data.SqlClient.SqlException sqlEx)
{
throw new InstallException("Error connecting to database and executing a
query to test the database availability and structure. Please check your
connection string and and database server and run setup again.\r\n\r\nError:
" +sqlEx.Message);
}
catch (Exception ex)
{
throw new InstallException("There was an error attempting to validate your
connection string and database structure. Please check your connection
string and database server and run setup again.\r\n\r\nError: "
+ex.Message);
}
finally
{
if (myConn.State != ConnectionState.Closed)
myConn.Close();
}
}
} Tag: Panel control like background. Tag: 68570
ProcessorAffinity
I am tring to set the ProcessorAffinity property of my applicaton. My
problem is this property wants the value to be set as intptr and I
don't know how to convert form integer to intptr. Does anyone know
how to do this? TIA Tag: Panel control like background. Tag: 68562
HELP - "Error Reading Configuration File"
I'm suddenly getting the error "error reading configuration file" when
I try and open some of my c# forms in the development environment but
yet the application still runs OK.
Other projects are also fine
Anybody else come accross this.
thanks Tag: Panel control like background. Tag: 68561
Create menu at run time?
Hi all!
Is it possible to add a MenuItem at run-time and handle the click event?
I can add the menu items, but no idea on managing the click...
Some tips?
Thanks Tag: Panel control like background. Tag: 68560
Accessing the Microsoft Fax printer driver from C#
Hi,
I want to send a printout as a fax.
I have installed the Microsoft fax printer driver that comes with Windows
(XP in my case), but everytime I print to it, a dialog pops up asking me for
a fax number.
Is there anyway I can embed the fax number as well as any other answers to
questions it may ask before hand so that it is always silent?
Does anyone how to do this in C#?
Regards
Mike Tag: Panel control like background. Tag: 68558
AssemblyKeyFile attribute
Trying to assign a strong name to my assembly. I've created the .snk file
for it.
My assembly is called Common. Mail
In Assembly.cs, if I do this:
[assembly: AssemblyKeyFile(@"C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\Common.Mail.snk")]
it works great, but I don't wanna hardcode the path to the bin directory,
since it might change.
In the help documenation, they had it shown as
[assembly: AssemblyKeyFile(@"..\..\Common.Mail.snk")]
but that doesn't work ...
I'm assuming ..\..\ was trying to get to the v1.1\Bin directory but wasn't.
How do I do this without hardcoding the path Tag: Panel control like background. Tag: 68556
Framework Won't Uninstall
Hi all-
I cannot get the .NET Framework SP2 to install, so I thought I would
uninstall and start over. However the uninstall fails with the message
"Microsoft .NET Framework Setup has failed. If this continues, please
contact Product Support."
I tried using the command line:
n:\<Installation Source>\dotnetfx.exe /t:%temp% /c:"msiexec.exe /fvecms
%temp%\netfx.msi"
to repair the installation, but that isn't working either. Does anyone have
any ideas, or know how to manually uninstall the Framework?
Thanks in advance,
Kendra Tag: Panel control like background. Tag: 68553
Firewire cameras
Is there a standard way of controlling firewire cameras on C# or indeed at
using a generic library somewhere or are these camera specific? Tag: Panel control like background. Tag: 68543
Creating publisher policies for DLLs
We have a .NET dll that we are deploying to our customers using a deployment
project in VS .NET 2003. There is a lot of information about creating
publisher policies on the web, but we have not been successful in creating
one. Here's what the ultimate goal is:
When the DLL is deployed to a customer's system, every application using
this dll must point to the new version. This has to be an automated process
using the deployment project.
This is what we have already done:
1. Created a file called app.config with the following text:
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="name of assembly"
publicKeyToken="public key token"
culture="en-us"/>
<bindingRedirect
oldVersion="1.0.0.0-65535.35535.65535.65535"
newVersion="2.0.1.0"/>
<codeBase version="2.0.0.0"
href="http://www.foo.com/bar.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
We copied this from a howto on gotdotnet.com
2. We signed the dll with our key and created a policy file.
3. We then deployed this dll to the customer's GAC.
However, the customer's application that used an old version of the dll did
not automatically redirect to the new version.
Is there something we are missing?
Does the name of the config file have to be something specific (like
myassembly.dll.config)?
Has anybody ever gotten this to work?
Any help would be appreciated,
Thanks,
MT Tag: Panel control like background. Tag: 68541
Framework Redist 1.1 vs Framework 1.1.4322
What do I need to do to get an application developed on VB Studio 2003 (Framework 1.1.4322) to run on another machine which has Framework Redist 1.1 installed? I ran the application (.exe file) on the machine with the Framework redistributable and it came up with the error message of can not find Framework 1.1.4322. Thanks in advance. Tag: Panel control like background. Tag: 68540
ServicedComponents built on 1.1 to be usable on 1.0
Hi group
I have created a class library that has a class that inherits from
ServicedComponents. I have .Net Framework 1.1 installed on mu machine.
I build the application and was able register it using regsvcs.
I have to deploy this application on a machine that has only .NET
Framework 1.0 installed. After a lot of search I could create an
application config file that has the bindingredirect for nearly all
the .NET assebblies.
After I build and try to register it on that server I am getting an
error stating ..
"System.IO .... unable to find the assembly or some assembly that is
used."
If I dont inherit my class from servicedcomponents and try to use it
in another exe and run that exe on the server machine it gives no
error.
Where am I going wrong? Any help is appreciated.
-Swati Tag: Panel control like background. Tag: 68537
MS Outlook automation from .NET Windows Service
Hi, All!
I seem to be having something of an Outlook automation problem, and if you guys could please be bothered to take a look at the following snippet of C# code:
static void TestOutlookAutomation()
{
System.Diagnostics.EventLog tmpEventLog = new EventLog("Application");
tmpEventLog.Source = "Test Outlook Automation Client";
try
{
tmpEventLog.WriteEntry("Starting Outlook Automation", EventLogEntryType.Information);
Outlook.Application olApp = new Outlook.ApplicationClass();
Outlook.NameSpace olNs = olApp.GetNamespace("MAPI");
for (int k=1; k<=olNs.Folders.Count; k++)
{
Outlook.MAPIFolder folder = olNs.Folders.Item(k);
printFolderInfo(folder, 0);
}
}
catch(System.Exception eX)
{
string msg = "";
System.Exception traceEx = eX;
while (traceEx!= null)
{
msg += traceEx.GetType().ToString() + ": " + traceEx.Message + "\n";
traceEx = traceEx.InnerException;
}
tmpEventLog.WriteEntry(msg, EventLogEntryType.Error);
}
}
public static void printFolderInfo(Outlook.MAPIFolder folder, int level)
{
string tabs = "";
for (int i=0;i< level; i++)
{
tabs += "---";
}
System.Diagnostics.EventLog tmpEventLog = new EventLog("Application");
tmpEventLog.Source = "Test Outlook Automation Client";
tmpEventLog.WriteEntry(tabs + folder.Name + "\t(" + folder.Items.Count + ")", EventLogEntryType.Information);
for (int j = 1; j < folder.Folders.Count; j++)
{
printFolderInfo(folder.Folders.Item(j), level + 1);
}
}
For testing purposes I've wrapped these two methods inside a) a Windows Service Project, and b) a standard Windows Application Projects, built them and deployed the assemblies on two different computers - both having MS Outlook installed, both running Windows 2000 OS -. However, on computer1 the Windows Service, as well as the standard Windows App, runs smoothly. On computer2, on the other hand, the Windows App reads the mailfolder info with no problem whatsoever, but the execution of the Windows Service results in a System.Runtime.InteropServices.ComException error message being written to the eventlog. This, despite the fact that the owner of the process in which the Windows Service and the standard Windows App executes on computer2, is the exact same Windows user profile.
Any advice on this issue would be highly appreciated.
Regards, Trond Tag: Panel control like background. Tag: 68536
Deploy .NET w/o Framework
I would like to know if there is free software to link assemblies together,
deploy without whole Framework installation. so I could work my application
in any computer without Framework.
Thanks Tag: Panel control like background. Tag: 68535
Compilador Nativo
Buenos dias:
Me gustaria saber si existe alguna herramienta freeware que genere
compilacion nativa de manera gratuita para poder ejecutar una aplicacion en
una maquina sin tener necesidad de tener instalado el .Net Framework
Gracias y saludos
Amalia Tag: Panel control like background. Tag: 68534
DataGrid control on a WinForm
Hi,
How can I set the DataGrid control to perform a FullRowSelect when I click
a cell? Or Full Column select?
Is this possible? If not can we have this as a feature request?
Thanks Tag: Panel control like background. Tag: 68533
.Net ViewState toggle causing Smurf Attack in routers ?
Our .NET web application was getting blocked in several routers (DLink) as a "Smurf Attack" (a faked sender
IP address). This was systematically happening in the transfer between the first and the second page on our
web site
After much ado we found out that turning off client viewstate (in the Aspx page) caused the problem to go
away; or so we thought. it turns out we only moved the problem a couple of pages later in the system, but
this time it was a HttpHandler that was being blocked (no Aspx involved)
Before we got the second bug report, I thought this problem was related to the actual _VIEWSTATE HTML hidden
field that was being sent. When the second problem was reported, I am more inclined to believe that the
ViewState toggle (in the Aspx) has some side-effect on Socket Pooling in IIS/.NET. Between the two page
requests, there is idle time on the socket (obviously, we are waiting for user action); could the Smurf
Attack be triggered by a change of socket for the next request ? Anyone have any experience on this
Kristia Tag: Panel control like background. Tag: 68529
Byte array to string and back - newbie question
Hi,
I am trying to implement DES algorithm as described in the Microsoft article at
http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT10.asp.
The problem is that I need to save the data in the database as String, and for that I have to convet from Byte array to string and back.
When I cast a byte array into a string and then back to a byte array, I don't get the same array. For example:
Dim SecretText As Byte()
Dim SecretText1 As Byte()
Dim Text as string
.....
SecretText = enc.Encrypt(Data, Key, Vector) 'returns Byte Array
Text = Encoding.ASCII.GetString(SecretText) 'convert to string in order to save into the DB
....
....
....
SecretText1 = Encoding.ASCII.GetBytes(Text) 'prepare for decryption routine
At the end, SecretText1 does NOT equal to SecretText, and I want it to be. How should I do the conversion correctly?
Thanks!!!
Zhenya
http://www.rusmex.com Tag: Panel control like background. Tag: 68524
vs.net problem with creation of directories
I am using vs.net 2003 on local desktop.
I cannot create a directory as it keeps telling me it already exists. I cancel out and it creates a folder called NewFolderX where x is incremented by 1.
I puts this file in the root of the web. If i open with file manager i can delete these folders however the next time i open vs.net it recreates those directories.
I cannot remove these directories nor can i create new ones with different names.
help Tag: Panel control like background. Tag: 68519
MSN Presence info
Originally posted to microsoft.public.dotnet.framework.aspnet with no
viable responses:
1st, if this is the wrong group, let me know... my local
server doesn't carry the full feed from MS.
After spending about 2 hours searching (google, codeproject,
sourceforge.. etc), I've not been able to find an example of code that
will allow you to publish your MSN status. I did find some older
examples, but apparently there have been some changes in protocol and
they are no longer valid.
Does anyone know how to go about doing this, or have a link to
somewhere that does?
I did find an article that went into a little detail about the
protocol, but it was more geared towards "this is how you sign on and
send a message". I even started scouring MS for some kind of SDK
(Although by the time I thought of that my brain was starting to
hurt).
One would think that MS would supply a simple URL as some of the other
messenger services do.. but I can also see the cost of doing that in
server usage and bandwidth. I guess the only way would be to develop a
control that pretends to be a client and check that way.... sheesh. Tag: Panel control like background. Tag: 68518
TURN $12 INTO $12,000 NOW!!!
EEP THIS SHIT YALL MY FRIEND GOT $500 LAST WEEK TRYING THIS SHIT:
make extra cash
GREAT WAY TO BECOME RICH...INSTANT THOUSANDS This is no scam, read
it!!!!!!
------------------------------------------------------------------------
-------- HOW TO TURN $12 INTO $12,000!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS
REALLY CAN MAKE YOU EASY MONEY!! IT WORKS !!! BUT YOU HAVE TO FOLLOW IT
TO THE LETTER FOR IT TO WORK!!!! : A little while back, I was browsing
through newsgroup, just like you are now and came across an article
similar to this that said you could make thousands dollars within weeks
with only an initial investment of $12.00! So I thought, "Yeah, right,
this must be a scam", but like most of us, I was curious, so I kept
reading. : Anyway, it said that you send $2.00 to each of the 6 names
and address stated in the article. You then place your own name and
address in the bottom of the list at #6, and post the article in at
least 200 newsgroup. (There are thousands) No catch, that was it. So
after thinking it over, and talking to few people first, I thought about
trying it. I figured what have I got to lose except 6 stamps and $12.00,
right? Like most of us I was a little skeptical and a little worried
about the legal aspects of it : All, So I checked it out with the U.S.
Post Office (1-800-725-2161) and they confirmed that it is indeed legal!
Then I invested the measly $12.00. Well GUESS WHAT!!?. Within 7 days, I
started getting money in the mail! I was shocked! I figured it would end
soon, but the money just kept coming in. In my first week, I made about
$25.00. By the end second week I had made a total over $1,000.00! In the
third week I had over $10,000.00 and it's still growing. This is now my
fourth week and I have made a total of just over $42,000.00 and it's
still coming in rapidly. Its : Certainly worth $12.00, and 6 stamps, I
have spent more than that on the lottery!! : Let me tell you how this
works and most importantly, why it works?.also, make sure you print a
copy of this article NOW, so you can get the information off of it as
you need it. STEP 1: Get 6 separate pieces of paper and write the
following on each piece of paper "PLEASE PUT ME ON YOUR MAILING LIST."
Now get 2 US $1.00 bills and place TWO inside EACH of the 6 pieces of
paper so the bills will not be seen through the envelope to prevent
thievery. Next, place one paper in each stating the above phrase, your
name and address, and 2 $1.00 bills. What you are doing is creating a
service by this. THIS IS ABSOLUTELY LEGAL! Mail the 6 envelopes to the
following addresses:
#1) Corteney Tomson P.O. Box 55 Dupo, IL 62239
#2) Brad Taylor 6 Terry Ln. Hutchinson, KS 67501
#3) Cedric Etienne 239 Autumn Breeze Way Winter Park, FL 32792
#4) Stephen Mitchell 1977 Alcovy Trace Way Lawrenceville, GA 30045
#5) Melissa Martinez 15440 sw 74 cir ct #607 Miami, FL 33193
#6) Maurice Sawyers 49 Middle Rose St Trenton, NJ 08618
STEP 2: Now take the #1 name off the list that you see above, move the
other names up (6 becomes 5, 5 becomes 4, etc?.) and add YOUR Name as
number 6 on the list. STEP 3: Change anything you need to, but try to
keep this article as close to original as possible. Now, post your
amended article to at least 200 newsgroups, message board. (I think
there are close to 24,000 groups) All you need is 200, but remember, the
more you post, the more money you make!---- DIRECTIONS----HOW TO POST TO
NEWSGROUPS, MESSAGE BOARD----------Step 1) You do not need to re-type
this entire letter to do your own posting. Simply put your cursor at the
beginning of this letter and drag your : Cursor to the bottom of this
document, and select 'copy' from the edit menu. This will copy the
entire letter into the computer memory. Step 2) Open a blank 'notepad'
file and place your cursor at the top of the blank page. From the
'edit' menu select 'paste'. This will paste a copy of the letter into
notepad so that you can add your name to the list. Step 3) save your new
notepad file as a .txt file. If you want to do your postings in
different sittings, you'll always have this file to go back to. : Step
4) Use Netscape or Internet explorer and try searching for various
newsgroups (on-line forums, message boards, chat sites, discussions.)
Just example you log on any search engine like yahoo. com,google.
com,altavista. com,excite. com then you search with this subject ?
millionaire message board? or ?money making message board? or ?
employment message board? or ?money making discussions? or ?money making
forum? or ?business message board? etc. You will find thousand &
thousand message board. Click one by one then you will find the option
post a new message. : Step 5) Visit these message boards and post this
article as a new message by highlighting the text of this letter and
selecting paste from the edit menu. Fill in the Subject, this will be
the header that everyone sees as they scroll through the list of
postings in a particular group, click the post message button. You're
done with your first one!. : Congratulations? THAT'S IT! All you have to
do is jump to different newsgroups and post away, after you get the hang
of it, and it will take about 30 seconds for each newsgroup! **
REMEMBER, THE MORE NEWSGROUPS OR MESSAGE BOARD YOU POST IN, THE MORE
MONEY YOU EILL MAKE!! BUT YOU HAVE TO POST A MINIMUM OF 200** That's it!
You will begin receiving money from around the world within days! You
may eventually can rent a P.O. Box due to the large amount of mail you
will receive. If you wish to stay anonymous, you can invent a name to
use, as long as the postman will deliver it. **JUST MAKE SURE ALL THE
ADDRESSES ARE CORRECT. ** : Now the WHY part: Out of 200 postings, say I
receive only 5 replies (a very low example). So then I Made $5.00 with
my name at #6 on the letter. Now, each of the 5 persons who just sent me
$2.00 make the MINIMUM 200 postings, each with my name at #5 and only 5
persons respond to each of the original 5, that is another $25.00 for
me, now those 25 each make 200 MINIMUM posts with my name at #4 and only
5 replies each, I will bring in an additional :$125.00! Now, those 125
persons turn around and post the MINIMUM 200 with my name at #3 and only
receive 5 replies each, I will make an additional $625.00! OK, now here
is the fun part, each of those 625 persons post a MINIMUM 200 letters
with my name at #2 and they only receive 5 replies, that just made me
$3,125.00!!! Those 3,125 persons will all deliver this message to 200
newsgroups with my name at #1 and if still 5 persons per 200 newsgroups
react I will receive $15,625.00! With an original investment of only
$12.00! AMAZING! When your name is no longer on the list, you just take
latest posting in the newsgroups, and send out another $12.00 to names
on the list, putting your name at number 6 again. And start posting
again. The thing to remember is, do you realize that thousands of people
all over the world are joining the internet and reading these articles
everyday, JUST LIKE YOU are now!! So can you afford $12.. and see if it
really works?? I think so? People have said, 'what if the plan is played
out and no one sends you: the money? So what are the chances of that
happening when there are tons of new honest users and new honest people
who are joining the internet and newsgroups everyday and are willing to
give it a try? Estimates are at 20,000 to 50,000 new users, every day,
with thousands of those joining the actual Internet.
AND YES YOU HAVE TO SEND THE MONEY FOR THIS TO WORK!!!dont try not to,IT
WONT WORK TRUST ME Tag: Panel control like background. Tag: 68515
.NET Windows Service and the server CLR kernel
Let's say I write a multi-threaded Windows Service with .NET and run it on a
quad 2.8 ghz P4 xeon server. How do I get the service to use the server CLR
kernel instead of the workstation CLR kernel? Tag: Panel control like background. Tag: 68514
Slow TCP connection from IE
I have a problem with TCP connections from controls embedded in HTML pages.
The client-application is a (.NET) usercontrol embedded in an HTML page (viewed using IE).
When the client calls:
Dim client As New System.Net.Sockets.TcpClient(_hostname, _port)
while at the same time the server calls:
i = stream.Read(bytes, 0, bytes.Length)
it takes _exactly_ 100 seconds the first time â?? subsequent calls are immediate.
It looks like itâ??s a timeout â?? but of what?!? â?? after all: I get the correct result; no problem there. Using TDImon fra SysInternals I can se that at the first (and very slow) communication, IE initially communicates at port 80 - but I havn't got a clue why. I have wondered whether it could be a DNS error, but the host I communicate to is localhost so I think that would be a rather strange reason. The problem has been verified in different organisations using several independently installed PC's.
When the client control is placed in a winform instead of in a HTML page, there is no performance problem at all.
I have a small, clean and to the point VS-solution which demonstrates the problem if anybody is interested. It consists of the control project, a winforms client, a html page and a tcp-server project.
I am sure that this is expected behaviour â?? just no for me or anyone that has looked at itâ?¦ ;^(
Regards
Henrik Tag: Panel control like background. Tag: 68509
Mutex and WAIT_ABANDONED
.Net's Mutex object seems to ignore (or internally consume) a WAIT_ABANDONED
condition if the owning thread is aborted. The next thread waiting on the
Mutex gets the mutex with no error. If this is by design, it would seem to
be a dangerous design choice. Normally another thread would want to know
this information as the thing the mutex was protecting could (and probably
is) be in an inconsistant state, yet the 2nd thread will march on like
nothing was wrong. Am I missing something?
--
William Stacey, MVP Tag: Panel control like background. Tag: 68506
.NET application memory usage
Has anyone encountered a situation where a .NET(VB.NET) application uses a
lot more RAM on one machine than it does on another machine?
On an machine with XP Pro, .NET Framework 1.1 & all the latest patches my
program uses 45MB of physical RAM and 85MB of virtual memory. This is a LOT
for what this application does. On another machine with Windows 2000
Server, .NET Framework 1.1 & all fixes, the exact same build of the program
uses only 16MB of physical RAM and only 8MB of virtual memory. Simlilarily,
on another XP Pro machine the same build of the program uses about the same
16MB of ram and the same amount of VRAM.
Both XP machines have Visual Studio .NET 2003 installed, and the 2000 Server
doesn't, so this can't be a debug version of the runtime(if there is such a
thing) causing it to use so much RAM.
The program is compiled as release by the computer using so much RAM in all
test runs on each machine.
So... What's going on that causes it to use so much memory on the one
machine but not the other machines?
Thanks,
Devon. Tag: Panel control like background. Tag: 68505
How to trigger IDE code generation?
Hello all
I am writing a custom formatter to serialize controls to a text file. It largely works (at least I keep thinking that)
My current problem is that when a form is deserialized in the designer, the screen is updated properly and the properties show correctly in the editor window, but the newly altered properties do not persist into code. Usually I need to make a slight modification to the objects (e.g. select and move them) for the alterations to persist
I am wondering is there a simple call which will cause the IDE to initiate serialization to code? I suspect I need to somehow get a hold of the IDE's IDesignerSerializationManager object and through it obtain the necessary serializer for my root object and then serialize it - but how do I do that
Thanks for all replies
Marku Tag: Panel control like background. Tag: 68504
Image->Bitmap->Icon transparency problem
Hi,
I'm loading an Icon from a Stream and want to save it to file. I've
realized that in order to avoid a bug in the framework I need to do
something like this:
Bitmap bmp = new Bitmap(m_Img);
IntPtr hdl = bmp.GetHicon();
Icon icn = Icon.FromHandle(hdl);
using (FileStream fs = new FileStream(name, System.IO.FileMode.Create))
{ icn.Save(fs); }
DestroyIcon(hdl);
That works fine, kinda... During the conversions I loose the transparency
of the original Icon; ie. the saved icons will have black backgrounds
instead of transparent backgrounds.
Any workaround? (apart from doing it all through API-calls to GDI+)
Any official acknowledgement from MS about the bug? (a link perhaps)
Any ideas if or when it'll be fixed?
Regards
/Claus Tag: Panel control like background. Tag: 68503
Regular Expressions.....
Hello all,
I'm having a problem with regular expressions. I have a list of strings
with numeric values and I am trying to use reg exp to search through them.
if I have numbers 1 to 1001 and I want to find numbers that match ??9 how
can I get it working?
Thanks for your time!
Alan Tag: Panel control like background. Tag: 68501
Installer: what would make "RemovePreviousVersions = True" fail?
When it works:
when i right-click on the (built) installer project on my development
machine, and select 'Install', it removes previous version.
When it doesn't work:
when i move to another machine and try to install it remotely, using the
setup.exe found in the "\\my dev machine\release" share...
i get a dialog to the effect of "must remove older versions before you can
install"...
any thoughts? Tag: Panel control like background. Tag: 68497
Event For Component Instancing?
How can a given component know when it has been loaded by anything
else in the .NET Framework? I guess I'm looking for an event to trap.
This is not for ASP.NET, it is for a stand-alone C# object living
inside a discrete DLL.
Thanks. Tag: Panel control like background. Tag: 68496
FileCopy login error H e l p
I get this log in error or invalid password error message when i use the
FileCopy("C:\source.txt", "\\myServer\target.txt") function inside my web form's server_click control button
TI Tag: Panel control like background. Tag: 68484
GetAsyncKeyState in managed code
Does managed code implement anything like the GetAsyncKeystate call found in
win32.
I want to check the status of the control and/or shift keys sometimes.
Thank you
Tom Tag: Panel control like background. Tag: 68483
embedded winforms in IE wont cache
I have a problem. The issue is that my embedded winforms in IE will not cache no matter how hard i try. They seem to goto the download assembly cache but they dont load from there like the framework documentation has stated. I have tried versioning, strong naming, and everything else i can think of.
Any response, esspecially from MS would be great! I would like to know if this is a bug that is expected to be fixed in the .NetFramework, or is there a work around till the bug gets fixed.
Thanks!!!!! :)
Here is some of the previous posting that i had made, followed by MS Response ****:
Hi Bryan,
It's really good to hear someone having the same problem (sorry to say) - precisely the same problem is KILLING my released
application stone dead because of performance issues over low bandwidth connections. I AGREE, the controls are NOT being
loaded from the download cache when available, and the documentation (I am certain) INCORRECTLY says this will happen. I
have based many months of development based on this concept, believing the documentation and suspecting it is me misreading
the signs or doing something wrong. I now no longer believe this to be the case. Can someone out there at Microsoft help?
This is a real cry for help you're hearing here. Why are IE hosted controls not being loaded from the download cache when
no newer versions are available on the server?
Please find attached similar posting (unanswered) from myself on the sister windowsforms.controls newsgroup:
Subject: IE hosted control and the download cache 1/16/2004 3:47 AM PST
Hi,
Should my IE hosted Windows Control be invoked from the download cache after it's first use?
It appears that my Windows Control is being downloaded every time from the Web Server. My understanding is that every time
a Windows Control is invoked from within an HTML <Object> tag, that the CLR first checks on the server to see if there is a
new version of the assembly is available. If there is not, then the last downloaded assembly will be invoked from the
download cache, if one exists. However, it appears that my control is being download every time, and as available bandwidth
narrows, the control takes a REALLY long time to download/invoke, even though I told my managers (perhaps mistakenly!) that
they will only experience this the first time they invoke a new version of the component from the web server.
I had read that there may be a connection between strong naming an assembly and the download cache, so that versioning can
work correctly, however I've just added a stong name to my assembly (by adding [assembly: AssemblyKeyFile(@"....snk")] to
AssemblyInfo.cs) but it appears to have made no difference.
Should I be doing more to get my control invoked from a users download cache whenever possible?
Many thanks,
Richard Sheridan
----- bryan wrote: -----
The problem is that when we embed a usercontrol in a html page the control is noty cached on the client as specified by numerous MSDN articles. I have tried everything i can find on trying to cache winform dll's in the assembly download cache. Is there something im doing wrong? Please Help! Our company is riding its entire future programming on .net. If anypne has any good sample code on something that works, or perhaps a fix, please let me know.
Is this a bug that will be fixed in framework 2.0? I hope so because we have a lot in our company riding on it.
Thanks, Bryan
Print | Copy URL of
*** and what MS said ********
have you examined the download cache? (gacutil /ldl ) You may have
multiple versions of your assembly there. If they list (0.0.0.0) as the
version then you have your answer: you haven't attached a version number to
your assembly:
eg,
[assembly:AssemblyVersion("x.y.z.w")]
Be sure to specify a full version, no *'s. Tag: Panel control like background. Tag: 68480
gacutil is not included in .NET Framework 1.1 Redistributable?
gacutil seems to be something that users really need on occasion to clear
the download cache.
Is gacutil included in the Redistributable package or the SDK package? It
really should be in the Redistributable if it is not. Tag: Panel control like background. Tag: 68463
Prepared Execution
H
I am using .NET 1.0, which doesn't have the ODBC data provider. But, I need to use the SQLDescribeParam() method available in ODBC API, before executing a prepared statement. Is there any equivalent function in OLE DB
TIA
Arr S Tag: Panel control like background. Tag: 68461
Visual Styles in resource
How do I include the Visual Styles for XP in the resource? Don't want to
use "Application.EnableVisualStyles" because the program needs to run with
.NET 1.0 also and also would perfer not to use a manifest file.
--
Chris Burr
cburr@kcc.com Tag: Panel control like background. Tag: 68458
Invoke fails in control class
Hi!
I've taken the Pocket signature sample from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/PPCSignatureApp.asp
and modified the client socket to run as a single class without a form.
I just derived the class from "forms.control" and it works perfect with
compact framework.
Now I tried to use the class with the full framework.
When I call Me.Invoke I get the famous error "Cannot call Invoke or
InvokeAsync on a control until the window handle has been created".
If I copy that part of code back to a form generated by the form
designer, everything works fine. Trying to expand my class to be a form
failed.
Does anyone know what I have to do to get it to work in a control class?
Thanks in advance!
Benjamin Lukner Tag: Panel control like background. Tag: 68455
Web form error
Windows Pro
VS.Net
.Net Framework
ASP.NET
My 1st time using Web Forms in .Net
I am receiving the following error:
System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
database 'master'. Could not attach database 'pubs' to file 'D:\Program
Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
I tried the following:
Reboot 4-5 times
Share the folder
Web share the folder
Any ideas?
Thanks for your help,
T. Tag: Panel control like background. Tag: 68453
Calendar control
Hi all
I require a calendar control in .NET in Japanese. But how do I convert this
into the year convention followed in Japan, as I understand that it is
different from ours??
Please help me here.
Thanks a lot!! Tag: Panel control like background. Tag: 68450
Memory leakage!!
Please look at the following URL:
http://forums.devbox.net/showthread.php?p=3082#post3082
Can anyone suggest me the solution to this?
Thanks a lot!! Tag: Panel control like background. Tag: 68449
show a new control outside of its parent
I am programming a control for the CF, and i need to make something like the
ComboBox enroll behavior.
If you click on it. it should enroll another item, for example a picturebox.
To enroll it down, it could be possible to define the picture box inside the
control, and on cliking the control to change its clientsize to make the
picturebox visible. But if the control shall enroll it to the top, because
its on the bottom of the form, I would have to change its location and the
size.
the original combobox shows the new item, without changing its size and
location.
So my question is how to show a new control outside of its parent ?
somebody knows help ?
THX
Milosz
www.playseven.com Tag: Panel control like background. Tag: 68447
Establishing RAS Connection
Hello all
I need to configure, establish, monitor and terminate a DialIn-RAS connection. Are there any objects in .NET Framework for that? Tag: Panel control like background. Tag: 68446
How to obtain database field withs out of datatable?
Hello,
Can anyone tell me if it's possible to get the width of the underlying
database fields in a datatable (dataset)?
If so... how is it done?
Tony Mouton Tag: Panel control like background. Tag: 68443
New MS Authorization and Profiler Application Block fits only for small applications and examples!!
Hi to all .NET gurus,
we evaluated the new Application Block "Authorization and Profiler
Application Block" for using with role based authorization.
Our results:
- No roles in roles can be managed (that is a must in a role based
system)
- In every check there is no caching between them (performance sucks)
- Dynamic object creation in every access (performance sucks)
- Profiles and Principals must be handled completely seperated (??)
- In every access check you have to build up parameters etc - this
handling is
unbelievable overhead!!
- You have to cast the principal for every access (you better use a
gerneric
class with static helpers here!)
So the result is: Use it to play a bit and use it for very small
example applications. It is a good example for newbies out there - and
the pluggable system in this block was a good idea (not new but fine)!
I work for companies like BASF, DaimlerChrysler, BMW etc. and i have
implemented some role based access systems before in .NET - but this
block doesn't fit for them.
I can't understand why they did not optimize it - other blocks have
caching etc. in it?
You can implement own providers etc. but thats somewhat dumb that you
better build up your own system with caching, expirations etc...
Let me know if there are questions - i develop open source software
and im .NET consultant for different companies out there.
Greetings and happy programming
Ralf Tag: Panel control like background. Tag: 68439
late bound
Hi!
I need to open and fill excel cells from my winform
application, however, I do not want to use the excel
object model, I would like to use late binding.
(In VB 6 - CreatObject("Excel") - was used).
Does anyone know how to do this in C#?
A simple sample would be very appreciated!
Thanks alot! Tag: Panel control like background. Tag: 68438
How could I give my control a background like the
Panel control, I mean dotted at the snap grid limits.