|
Madhuri Mittal wrote:
Code project?
Of course;)
Steve
McLenithan
Is Bert Evil?
|
|
|
|
|
Is it possible to write a trace with a EventLogTraceListener using a level of priority for an event like EventLogEntryType ???
By default using EventogTraceListener write trace event like info Event not like Warning or Error ?
|
|
|
|
|
Hello all,
I've made a COM component that uses CryptAcquireContext. When I call it from VB.NET application it works perfectly, but when I try to call it from an ASP.NET web service CryptAcquireContext fails. The error is: "The system cannot find the file specified". How do I fix this error, is there some additional tag to put in Web.config file ?
Thanks in advance
Raphael Amorim Dantas Leite
VC++, VB, Java, .NET and eMbedded Programmer
|
|
|
|
|
Hi,
I have a major problem in .Net Remoting..
I want to implement a ActiveX Control on Server Side but there seems no way out. Here is how i tried to implement it.
1) Created a form which containd the activex control
2) Implemented by a Class object inheriting System.MarshalByRefObject.
3) Created a instance of form in the class, like:
public class Class1 : System.MarshalByRefObject
{
FormControl fc = new FormControl();
}
and then tried to call it's member function on constructor.
4) on calling this object , from a server component implementing Remoting, it works fine.
5) but the problem comes now.. On implementing the client, a exception is thrown:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Threading.ThreadStateExc
eption: Could not instantiate ActiveX control '11111111-7ba3-1111-9623-1111111
bd0' because the current thread is not in a single-threaded apartment.
Please help me out.
Ashok Singh
Real Programmer's do not comment their code, if it is hard to write then it should hard to understand
|
|
|
|
|
Try putting the following attribute in your client app. Remove the [STAThread] and put [MTAThread].
[MTAThread]
static void Main()
{
Application.Run(new Form1());
}
|
|
|
|
|
These two options appear to have no affect on the appearance of status bar panels. Anyone else observed this?
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
They have an effect on my system (Win2K). Maybe it depends on the oiperating system in use?
Chris Jobson
|
|
|
|
|
Chris Jobson wrote:
They have an effect on my system (Win2K).
Although I have a Win2K system I could test it on, I've never been able to get a .NET application to run on it, even after upgrading to IE 6, installing the latest service packs for a gazzillion things, etc.
I'm using XP and I specified a manifest. Maybe I'll try getting rid of the manifest. I just love the inconsistencies in XP and .NET.
Thanks for the tip though!
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
OK, they do not live happily together.
A button with FlatStyle set to FlatStyle.System does not show a bitmap. Setting it to Popup or Flat is OK, but then the transparent background doesn't match the grey sheen color of the other non-bitmapped buttons.
What is a person to do? Maybe I need to play with it some more, but while I do, is there anyone who's fixed this problem?
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
Are you assigning the bitmap directly to the Image property or using an ImageList (by setting the Button's ImageList and ImageIndex properties)? I've found that if I use the Image property there's no transparent colour, but if I put the bitmap in an ImageList then I can specify the colour to be treated as transparent in the bitmap.
Good luck!
Chris Jobson
|
|
|
|
|
Chris Jobson wrote:
Are you assigning the bitmap directly to the Image property
Yes.
Chris Jobson wrote:
if I put the bitmap in an ImageList
OK, I'll give that a try. Good grief.
Thanks!
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
Is there such a beast? You can create class libraries fairly easy, but is there a .NET equivelant to the old COM .EXE Server?
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|
|
No.
Here is an excerpt from the regasm.exe implementation :
private void RegisterManagedType(Type type, string strAsmName, string strAsmCodeBase) {
...
local6 = Registry.ClassesRoot.OpenSubKey("CLSID", true).CreateSubKey(local2);
local6.SetValue("", local0);
local7 = local6.CreateSubKey("InprocServer32");
local7.SetValue("", RegistrationServices.strMsCorEEFullFileName);
local7.SetValue("ThreadingModel", "Both");
local7.SetValue("Class", type.FullName);
local7.SetValue("Assembly", strAsmName);
local7.SetValue("RuntimeVersion", local1);
if (strAsmCodeBase != null)
local7.SetValue("CodeBase", strAsmCodeBase);
local7.Close();
if (local3 != String.Empty) {
local8 = local6.CreateSubKey("ProgId");
local8.SetValue("", local3);
local8.Close();
}
local9 = local6.CreateSubKey("Implemented Categories");
local10 = local9.CreateSubKey("{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}");
local10.Close();
local9.Close();
this.EnsureManagedCategoryExists();
local6.Close();
Even if you tweak the registry keys yourself, it's likely the CCW does not provide the appropriate apartment.
|
|
|
|
|
I am trying to get a structure returned from a web service and am having a hell of a time.
I can consume the service through IE and get back my XML package just fine, but when I try the same thing in a Windows Forms client application I get an error that says there is an error in the xml file.
I can return simple types like Booleans and stuff all day in the client but not a publicly declare structure.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Ok, I figured out the problem... Some of my structure members were strings containing text that was encrypted and the chars returned by the encryption function must not be XML friendly.
Any ideas how to escape this?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Have you tried wrapping the non-XML-friendly chars in a CDATA section?
<test>
<![CDATA[Offending data]]>
</test>
That might work, but then again if they are chars it might not and you will have to use a text encoder (.NET has plenty) to encode them to UTF8 or whatever your XML is set to. I think. Not my forte (encoding.)
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
I might try that latter, but now I have another issue. I am trying to eturn an ArryList of structures and am getitng told that I can't do that because the structure definition does not get included in the wsdl file.
ARG! Who was it that said web services would solve all my problems?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Ray Cassick wrote:
I am trying to eturn an ArryList of structures and am getitng told that I can't do that because the structure definition does not get included in the wsdl file.
I am no expert on this, but one thing comes to mind: Have you tried serialising out the ArrayList structure to XML and then returning that? Apologies if that is exactly what you are doing or if that is not what you need at all.
Also maybe this article may have something for you.[^]
Ray Cassick wrote:
ARG! Who was it that said web services would solve all my problems?
Same guy who said "Visual Basics are the phuture!" and "You will only ever need 640k RAM"
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Paul Watson wrote:
Same guy who said "Visual Basics are the phuture!" and "You will only ever need 640k RAM"
Touche!
|
|
|
|
|
Hmmm this was me... I wonder why it shows up as annon?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
I have the horrible feeling that I have royally screwed myself.
It does not seem possible to create a transparent GIF in .NET, even though the methods are all there.
http://www.dotnet247.com/247reference/msgs/9/47813.aspx[^]
http://www.dotnet247.com/247reference/msgs/9/47038.aspx[^]
Both seem to indicate it cannot be done (the first one mentions a way, but then you can't use a Graphics object on it. Which is exactly what I need in the first place, doh.)
Anyone found a way? Anyone can tell me categorically that I am screwed?
I tried to save as PNG (PNG has alpha blending) but the background came out very strange indeed.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Paul Watson wrote:
I tried to save as PNG (PNG has alpha blending) but the background came out very strange indeed.
At least, this part I can explain why, the problem is not in .NET:
PNG Files Do Not Show Transparency in Internet Explorer[^]
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
While yes IE does have a problem with PNGs it can be easily "solved" by saving your PNGs as 8bit and not 24 or 32bit. Not always ideal but in my case I saw it as the solution.
Now I just have to figure out how to convert a 32bit PNG made by .NET into a 8bit PNG, using .NET of course (someone said "But Paul, just use Paint Shop Pro to convert!", umm thanks but the graphics are being made on the fly and there is about 4000 of them.)
I can make a transparent PNG in .NET (opened the result in Fireworks and it was transparent, same with Mozilla) but this conversion stuff has me getting a headache.
Thanks for the link again, I had lost that one and was looking for it. The DIV DX filter trick is not ideal, but I may have to use it (thankfully the project only has to work on IE 5 and up)
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Paul Watson wrote:
Anyone can tell me categorically that I am screwed?
Yes I can I looked into many ways for those web boxes. Even PNG has a problem rendering a touch too dark...or IE renders a touch to light.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Thanks leppie. I actually went straight to your web-boxes project to see how you had done the curves and transparency.
I have managed to make a 32bit transparent PNG in .NET, no problem there except of course the transparency does not show in IE. What one has to do is to convert that 32bit PNG to an 8bit PNG, then PNG transparency works in IE. So, guru, how do I do that damned conversion?
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|