|
I'm developing an application where a browser must post messages to the client's message queue. I've successfully managed to create an ActiveX component which achieves the task, but I'd like to know if this is also possible with a .NET component, as ActiveX is a bit too relaxed on security in my eyes.
I've made a basic class, and imported the System.Messaging namespace (C#). The control loads fine in IE as long as it is *not* strong named. But when I call the function which uses MessageQueue, I get the "that assembly does not allow partially trusted callers" message.
So, I sign my assembly, but then it won't load at all, because now my assembly only wants to be called by trusted assemblies, and it looks like IE (or IEHost) is not. I can add the AllowPartiallyTrustedCallers attribute to get my class to start, but then again the MessageQueue functions won't start, since there is not a full trust all the way.
Is there another way? Something I could call on in System.Messaging that makes it accept partially trusted callers? Some permissions I could set on my assembly? Or am I stuck with ActiveX?
Jens Petter Abrahamsen
|
|
|
|
|
I create a one websetup project and build created one websetup.msi in debug folder
This websetup.msi I installed in iis but in IIS showing all .aspx files and .aspx.vb files but I don’t want .vb files in IIS. Is there any option plz tell me
anilkumar
|
|
|
|
|
Hey guys, I'm having a problem sizing table cells. I want to size table cells using percentages. Have a table with for example 3 columns having the with set to 40%, 20% and 40%. So far so good. Then i create two more rows
row
cell - colspan to 2 and width to 60%
cell - width to 40%
row
cell - width to 40%
cell - colspan to 2 and width to 60%
Now I want each cell to contain a div with the width property set to 100% and overflow to 'auto', because I want the div to show scrollbars as soon as it's content exceeds the width of the table cell.
However, if I add some content in the div that's large enough to exceed the maximum width, IE will expand the table cell's width to make sure the object fits. Firefox actually does what I would expect, keep the table intact and show scrollbars.
<br />
<html><br />
<head><br />
<title>Joehoe</title><br />
</head><br />
<body><br />
<div style="text-align: center; width: 100%; background-color: #FF0000;"><br />
<table align="center" cellpadding="0" cellspacing="0" border="1" style="width: 800px; background-color: #EEEEEE;"><br />
<tr><br />
<td style="width: 40%;">Cell A1</td><br />
<td style="width: 20%;">Cell A2</td><br />
<td style="width: 40%;">Cell A3</td><br />
</tr><br />
<tr><br />
<td colspan="2" style="width: 60%; text-align: left; overflow: auto"><br />
Cell B1<br />
</td><br />
<td style="width: 40%; text-align: left;"><br />
<div style="width: 100%; height: 300px; overflow: auto;"> <br />
<div style="width: 583px; height: 400px; background-color: #FFFF00;">DIV having width & height larger than the cell...</div><br />
</div><br />
</td><br />
</tr><br />
<tr><br />
<td style="width: 40%; text-align: left; overflow: auto"><br />
<div style="width: 100%; height: 300px; overflow: auto;"> <br />
<div style="width: 583px; height: 400px; background-color: #FFFF00;">DIV having width & height larger than the cell...</div><br />
</div><br />
</td><br />
<td colspan="2" style="width: 60%; text-align: left; overflow: auto"><br />
Cell C2<br />
</td><br />
</tr><br />
</table><br />
</div><br />
</body><br />
</html><br />
|
|
|
|
|
Eduard Keilholz wrote: style="width: 100%; height: 300px; overflow: auto;"
seems like you need to set the width explicitly.. e.g. "width: 300px" .. I understand that you may not like this solution but this is only solution so far.. I'm testing your sample since you posted here.. i will let you know in case i can come up with some tricks..
but one thing is that you set 800px to the width of TABLE, right? So, i think that it might be okay for you to use the fixed width for TD too..
Can you use Javascript on your host? What about dynamically adjusting the width of TD on the fly?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Erhm, the size of the table in the example is fixed yes, but that is in fact a user setting so it may switch from any fixed value, to a certain value in percentage. In other words, you cannot depend on the 800px width in the table declaration.
I also found out fixed width cells do the trick especially when you set the div inside the cell to a fixed width and height, however I want users to set the width and height properties.
I've also been testing for like eight hours here... no result...
Anyway, appreciate the help :->
|
|
|
|
|
I got one solution for you... I think there might be some issues for TD in IE.. So, I decided to use DIV and CSS for that..
<div style="width:100%; background-color:Red;height:100%">
<center>
<div style="text-align:center;background-color:White;width:800px;height:100%">
<div style="width:40%;float:left">Cell A1</div>
<div style="width:20%;float:left;">Cell A2</div>
<div style="width:40%;float:left;">Cell A3</div>
<div style="width:60%;text-align: left;overflow: auto;clear:left;float:left">Cell B1</div>
<div style="width: 40%;float:left;">
<div style="width: 100%; height: 300px; overflow: auto;">
<div style="width: 583px; height: 400px; background-color: #FFFF00;">DIV having width & height larger than the cell...</div>
</div>
</div>
<div style="width: 40%; text-align: left; overflow: auto;clear:left;float:left">
<div style="width: 100%; height: 300px; overflow: auto;">
<div style="width: 583px; height: 400px; background-color: #FFFF00;">DIV having width & height larger than the cell...</div>
</div>
</div>
<div style="width: 60%;float:left;">Cell C2</div>
</div>
</center>
</div>
I have tested this code in both Firefox and IE. it works ..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Seems OK to me, but kinda late here right now, so going to try it tomorrow right away. Thx
|
|
|
|
|
Yeah. sure. I hope it will work the way you want. hey. don't forget to try what Shog suggested.. it might be useful too...
btw, why are you still using table-based layout??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Add the style: table-layout:fixed to the <table> element.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
I'm totally new to ActiveX and don't know where to get started. Hoping you can help.
My plan is to develop an ActiveX component (MSVC++) for the purpose of being used by IE. I need the ActiveX component to store information in persistent storage.
I have a bunch of HTML + JS that currently uses a signed Java applet for reading/writing files to the hard disc.
I would like to remove my applet in favour of ActiveX.
Anyone got pointers to sample sources and good guide to storing persistent data from ActiveX.
Lastly, when searching around the net I can't find a great deal of useful ActiveX stuff. Is ActiveX more commonly referred to as something else?
Appreciate any help you can offer. TIA.
(Lastly - which is the best forum for this type of question)
|
|
|
|
|
earlp wrote: (Lastly - which is the best forum for this type of question)
You plan is to develop an ActiveX component (MSVC++), right? MSVC++ is not C#. so, the best forum for this type of question would be VC++ forum..
(Managed) C++/CLI
Visual C++ / MFC
COM
I think you have posted this question in COM forum too.. So, you don't need to post this message here again..
|
|
|
|
|
thanks for setting me straight
|
|
|
|
|
Your welcome, earlp.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hi
i made a buttion in my webpage using html. i want to show the title of the webpage in status bar when i click this button. plz provide me the code to do this. i want to do this using onclick event handler for button and not to manually write the title of page rather i want to pick title using the title property of the window.
|
|
|
|
|
Here is the code.
function foo(){<br />
window.status = document.title; <br />
}<br />
For Firefox browser, please read the message below..
http://developer.mozilla.org/en/docs/DOM:window.status
"This property does not work in default configuration of Firefox and some other browsers: setting window.status has no effect on the text displayed in the status bar. To allow scripts change the the status bar text, the user must set the dom.disable_window_status_change preference to false in the about:config screen."
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Guys,
I have just added a DatePicker Control, but I can't get rid the error.
And also I have read here in codeproject with the same problem I've just got, but has not yet been resolved.
The error will occur when adding this code - Textbox1.text = DatePicker1.Text
I hope it's been resolved already.
Error:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
I actually downloaded the control from here - http://www.codeproject.com/vb/net/dwDatePickerArticle.asp
-- modified at 20:55 Saturday 10th November, 2007
hifiger2004
|
|
|
|
|
|
Hello Michael,
I tried it the one you suggested and it works. But my problem is how can I change the date format to "mm/dd/yyyy"?
hifiger2004
|
|
|
|
|
Please find this line in setDate1 and change like that..
<br />
oTxtDate.value = (formattedDate.getMonth() +1) +'/'+ formattedDate.getDate()+'/'+ formattedDate.getFullYear();
hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
I tried using the mid by parsing the value without the time. And it was working fine now.
Honestly, I really like the other control DateTimepicker but it doesn't work the way it should be. Anyway the calendar control is helpful at the moment.
Thanks man
hifiger2004
|
|
|
|
|
hifiger2004 wrote: Anyway the calendar control is helpful at the moment.
cool, man.. your welcome!
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
How come some websites can be accessed by IP Addresses and some cannot e.g. Google is accessible through --> http://74.125.19.99/[^] but msn isn't --> http://207.68.173.76/[^] need help because currently working on a DNS Resolver a component for Distributed Web crawler to save those expensive round trips.
Thanx in advance !
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
When a page is requested, the domain name is resolved into the IP number so that the request is sent to the correct server. The server then locates the web site that is configured to listen to that IP number and to that domain name. A web site can be configures to respond to an IP only without the need of a domain name.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
But when the IP address of the Server is correct and sent along with the path where the page is located then why it is not displaying the correct page. How can i handle such a situation because I've to resolve each discovered URL and if the resolver failed to get the correct information then I've to issue the request with the unresolved address which not only consumes the bandwidth but also effects the performance of the crawler. Thanks for your helps man !!!
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
AliAmjad wrote: But when the IP address of the Server is correct and sent along with the path where the page is located then why it is not displaying the correct page.
Because there can be several web sites that respond to the same IP, and they differ only by the domain name.
Experience is the sum of all the mistakes you have done.
|
|
|
|