|
I have a COM dll which runs in COM+ and which works fine in asp. In ASP.NET I have added a reference to the dll, created an instance of the object and called new on it. When I try to call any method, it blows up without ever entering the dll. Any ideas what I may be doing wrong ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
There was a bug in the RCW generation of .NET 1.0 that mucked up on certain types...it was fixed for 1.1.
Also, since you mentioned having VS.NET 2003, by default when you install the 1.1 framework ASP.NET automatically upgrades all applications to use the 1.1 framework.
This could pose a problem when using VS.NET 200 for producing any of the assemblies used by your ASP.NET site. I'm not sure how much of a problem though, I would assume ASP.NET runs with several binding redirects so the new 1.1 assemblies get loaded instead of the older 1.0 ones.
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
James T. Johnson wrote:
There was a bug in the RCW generation of .NET 1.0 that mucked up on certain types...it was fixed for 1.1.
I've not installed the VS.NET beta at all, I'm still downloading the MSDN for it. Both methods pass a BSTR.
I've also tried to run the tblasm or whatever it's called and running the resultant class, with the same effect.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi,
I'm developing an irc client add-in for vs.net. On the control hosted by a toolbox window I have various textbox controls. I'm trying to acknowledge when the ENTER key is pressed within a textbox. I've done this before on a winform so I do know how to use the KeyDown, KeyUp, KeyPress events to check for the e.KeyCode == Keys.Return or e.KeyChar == '\r' or e.KeyChar == (char)13.
None of these methods work. I have reason to believe that the problem arises from the fact that the textbox is hosted in a CUSTOM control and not a form. From tests I've done, I found out that the textbox does not process the following keys: ENTER, NUMPAD ENTER, CONTROL, ALT, etc...the list goes on.
How do I get the textbox to process ENTER key presses?
Nathan.
|
|
|
|
|
Hi again,
A question for people who've worked on vs.net addins:
How do I get a handle on the toolbox window that holds the addin control so that I can gracefully destroy it? At the moment, I have to compile/exit vs.net/restart in order to load a new instance of the addin.
Also one other peculiarity. I've noticed that I have to load my addin project in order for the actual addin to load (release build). I've have to look into this a little further. Any clue?
Nathan.
|
|
|
|
|
I have also been working on a few add-in for VS.Net. I think I can help you with closing your toolwindow. I created a data member called Tool Window in my Connect class
private Window ToolWindow;
Save the Window returned from the CreateToolWindow(...) call.
ToolWindow = applicationObject.Windows.CreateToolWindow(addInInstance,
progIdAttributeObj.Value, "Your Tool Window", guidstr, ref objTemp);
To destroy the window call the following. I do this in the OnDisconnection(...) method.
ToolWindow.Close(EnvDTE.vsSaveChanges.vsSaveChangesYes);
I have noticed other issues with ToolWindows, similiar to what happens with the Properties ToolWindow. After debugging the application your working on, the Tool Window does not 'reappear' when debugging is finished.
Good Luck.
|
|
|
|
|
i want to start a local process that should be started by loading the executable located on the remote computer into local memory.
i am sharing the folder on the remote machine.but it could not be started. in order to start that one i am using process class and its method Process.Start.
but it throws an exception of type Win32Exception(There was an error in opening the associated file that is at shared network path).
i dont know how to resolve that can any body help.
one person(thanks for him) tells that i have to call api like NetUseAdd etc but i could not understand how to use that can any body write a
sample code for me plzzzzzzzzzzz?
if i map a network drive for that executable located on the remote computer.
Process.Start still not working for that drive too.
r00d0034@yahoo.com
|
|
|
|
|
You need to check your security/permissions for the network drive. Dot Net has code access security that checks to see if the code is running from or is loaded from an authorized location. The default security policy setting does not allow you to load and execute code from a network drive.
To see if that is your problem, go to Administrative Tools | .NET Framework Configuration | Configure Code Access Security Policy (same as Runtime Security Policy. Then select Adjust Zone Security, the checkbox 'Make changes to this computer', and then Local Intranet. You can change it to 'Full Trust' and then run your code again. Be careful, and make sure you know what you are doing. You can reset it back to what it was after you have been able to test your code to see if that is your problem.
Gaulles
|
|
|
|
|
thanks for replay i will check it .
then reply you.
r00d0034@yahoo.com
|
|
|
|
|
i am using code Access security police tool (caspol.exe).
when i execute this command
caspol -machine -addfulltrust WinService1.exe
then the following message display on command prompt.
----------------------------------------------------------Microsoft (R) .NET Framework CasPol 1.0.3705.0
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
ERROR: This assembly is not strong name signed
Usage: caspol <args> ...
caspol -af
caspol -addfulltrust <assembly_name>
Add full trust assembly to policy level
----------------------------------------------------------i know that strong name tool(sn.exe).
but i could not understand which options and arguments i have to use
in order to remove the following error
-----------------------------------------------
ERROR: This assembly is not strong name signed
-----------------------------------------------
can you tell the command with correct option and arguments ?
i will be very thank full to to you.
r00d0034@yahoo.com
|
|
|
|
|
You use the sn.exe to generate a signed name key file, but you also need to add the key file to your assembly. If you created your project with VS.NET, you should have an AssemblyInfo.cs which contains a number of attributes. In your AssemblyInfo.cs, modify the AssemblyKeyFile attribute to include your key file as follows depending on the location of your key file:
[assembly: AssemblyKeyFile(@"..\..\keyfile.snk")]
or
[assembly: AssemblyKeyFile(@"keyfile.snk")]
Gaulles
http://www.gaulles.com
|
|
|
|
|
After doing this work c# portion exceusted sucessfully but process on the network still throw same exception.
----------------------------------------
sn -k mykey.snk
[assembly:KeyFileAttribute("mykey.snk")]
-----------------------------------------
but ther is a problem with vc++.net(managed code) this portion does not execute i dont know why.
is there any other step to perform plz tell ?
r00d0034@yahoo.com
|
|
|
|
|
What is the Exception you are getting? Also, when you say that the C# portion executed successfully, what do you mean exactly. Can you provide more details. If possible, can you post appropriate sections of your code to make things clearer?
Gaulles
http://www.gaulles.com
|
|
|
|
|
What is the equivalent property in C#. I can't find it in the property list (Visual Studio)
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
|
tx
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
Anyone know how to disable scroll bars on an MDI frame winform?
|
|
|
|
|
|
It's not work !
|
|
|
|
|
Hello,
I want to display a self-painted Graphic (on-time painted in the program with brush, etc.) in a PictureBox.
This Graphic should be zoomable, so the PictureBox must be scrollable.
Is there a chance to tell the pB, that it has to be scrollable?
Sorry for my english, I hope you understand, what I mean...
Thanks for helping.
Greetz
Torsch
|
|
|
|
|
|
Thank you,
I guess, that's what I want
I'll try it out and give feadback by failing to do this.
Greetz
Torsch
|
|
|
|
|
|
Is there a way I can check to see if the OS is getting shut down within my application? I have overridden the Closing method to hide my application on the tray; much like what the MSN Messenger does. You hit the X on the system menu and my Closing method sets the e.Cancel to true, sets my WindowState to Minimized and Visibility to false. This all works great; until you attempt a Windows shutdown. My e.Cancel seems to tell the OS that it can't stop. If there is a way for me to determine that the OS is calling my Closing method, then I could leave the e.Cancel alone. Any ideas?
Ron Ward
|
|
|
|
|
YeahIGotDotNet posted the code in the VB.NET forum on GotDotNet:
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=40651&Page=1[^]
It needs a slight modification, since you're overriding the OnClosing method, rather than attaching to the Closing event, and to include the extra cases further down the same discussion:
using System.Diagnostics;
...
protected override void OnClosing(CancelEventArgs e)
{
base.OnClosing(e);
StackTrace t = new StackTrace(false);
StackFrame f = t.GetFrame(6);
switch (f.GetMethod().Name)
{
case "CallWindowProc":
case "DefMDIChildProc":
case "DefFrameProc":
case "ShowDialog":
case "DispatchMessageW":
case "DispatchMessageA":
case "SendMessage":
default:
break;
}
}
I would assume that system shutdown would be the same as the task manager option, but you may want to log the method name just to make sure.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|