|
Hi everyone. i've written Photo editor. Currently it is WindowsApp.
I need to put it on the site. It's done by putting original APP to the WinControl.
And that dll can be used on the site, like:
<object id="ImageEditor" classid="ImageEditor.dll#ImageEditor.ImageEditor">
The problem first big problem - is that i can't use unmanaged code, i needed to put some UnmanagedCode permissions.
I've made big changes to the logic of it - and it doesn't use unmanaged code no more.
Onve i've finished convertion app to Control, i found that new permissions should be given:
Request of the Permission of type
System.Security.Permissions.UIPermissions (details in the end)
This is done when i use mouse (clicking on the workspace), when i'm changing the font - it appears after the standard dialog is closed.
From this point i need to solve this problem somehow.
I've tried to put the AssemblyKeyFile - but when i do that, applet isn't loaded at all.
Somewhere i've read that client that will use this editor needs to put PublicKeyToken to his trusted keys - but i can't find where do i put that.
Have anybody got some ideas of how to handle that?
Thanks for help.
Details of exception
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.UIPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.Control.Focus()
at ImageEditor.ImageEditor.pFore_MouseDown(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|
|
|
|
|
on the browser computer you need to run a specific .net commandline command that can be gacutil(global assembly cache utility) with proper permissions and keyfiles specified. pls look at its usage on msdn
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
the applet is not loaded to the GAC, it's loaded to some temporary internet cache.
gacutil /ldl - list all utils from downloaded chache.
i'm still wondering how to do that
|
|
|
|
|
i want to use for the standard button myown png images.
Using for the normal state one png, for the mousemove another and for mouse down another one too.
How?
|
|
|
|
|
How would one go about protecting controls from unlicensed use? I know that you can use imperitave security, but how still seems unclear.
If have a control, do I create a custom permission, and demand that permission on access to my control's interface. Then how do I guarantee that only my client is granted that permission?
The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Hi there,
I had been for over 3 days trying to solve this problem and I have no clue of what's wrong.
I'm trying to create a Dynamic DNS service using only one DNS Server (dns.firmaware.com), but created a second NS record (dns2.firmaware.com) with the same IP address.
First of all I've created a small app in VB .net that updates (using WMI) Microsoft DNS Server whenever an IP change was reported.
It creates different zones for each sub-domain and adds NS records, updates SOA record to change the TTL and MinimumTTL and finally adds/updates the A record.
I know that zone creation/update is working fine because I tested my VB .net several times and checked that Microsoft DNS entries were created/updated.
After checking all that I created a record like “test.gimmeall.com” and resolved it from my home PC. Using “ipconfig /displaydns” I checked that “test.gimmeall.com” had the following values:
localhost
----------------------------------------
Record data . . . . . : test.gimmeall.com
Record type . . . . . : 1
TTL . . . . . . . . . . . : 60
Data length. . . : 4
Section. . . . . . . . . . : Answer
A record (host) . . : 213.13.100.111
So, TTL was fine, if I changed test.gimmeall.com’s A record, after 60 seconds it would be updated, BUT that’s not happening because, after my update, when I ping the same host again it returns the same IP address and when I type “ipconfig /displaydns” it returns the following result:
----------------------------------------
Record data . . . . . : test.gimmeall.com
Record type . . . . . : 1
TTL . . . . . . . . . . . : 85823
Data length. . . : 4
Section. . . . . . . . . . : Answer
A record (host) . . : 213.13.100.111
It looks like that ISP or something else is caching “test.gimmeall.com” with invalid values, but it’s not an ISP problem because tried from different ISP companies and always had the same result.
Can you help me please?
I would be very thankful.
Regards,
Filipe Freire
|
|
|
|
|
Hi
This is harikrishna M from hyderabad.Iam have been working as a software engineer in Asp.net/c#.
currently i am working in vb.net project due to some urgent bug fixings in my organisation.
i got one problem in setup project from 3 days.But not fixed.
i have been trying very well but i can't.
But unfortunately i didn't found my problem here.
So, i think u can solve my problem.
Please feel free and help me if any one know about it.
My requirement is
I created my vb.net application to setup file using setup project option in setup and deployment section.
after then, i tried to install in my computer using that setup file.
It installs good and working fine.
But at the end of installation before last wizard, i got msiexec dialog window (all details of msiexec with options is shown) appears.
This window forced me to click on ok button only.After clicking ok button of this window only it finishes the installation and same problem while Unstalling also.
But my client don't want to view this msiexec popup dialog window.
How to hide this msiexec dialog window.
i need to complete the installation/uninstalltion of application with out showing this window.
Is it possible? If it is possible, please give me a mail with details.It is very urgent, Please help me
I am waiting for quick reply
thank you
with regards
hari
harikrishna.m
-- modified at 1:36 Friday 30th December, 2005
|
|
|
|
|
What kind of options does this dialog box asks. If it is the one that asks for installation folder and for whether installing it for everyone or for me then go to the "User Interface View" and delete the "Installation Folder" dialog box from the list.
If u r referring the dialog box that asks to confirm installation then remove "Confirm Installation" dialog box from that list.
Hope it will solve ur prob if I m right
Akif
|
|
|
|
|
Hi friends:
How specific in a OLDB connection the min and max size of a pool of connections ?
thanks in advance
|
|
|
|
|
I have a class that performs a single atomic, stateless task. However, I need to multithread this class in a barrage against a test server, and the ThreadStart delegate constructor must have a parameterless method.
I have two alternatives: to add state to my original class and set this state through properties before starting the thread, or isolating the state in a wrapper class whose parameterless method calls the parameterful method in the original class?
What say ye?
The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
I'd go with the latter. It avoids synchronization issues which can happen when properties are being set and multiple threads are started.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I am planning to use this approach please let me know if there is a problem in this approach..
The code compiles and works properly at runtime..but i am worried if there are issues which i have not anticipated..Please review the code.
Thanks and Best Regards,
Shahid
// This example shows how to create an Object* containing task
// information, and pass that Object* to a task queued for
// execution by the thread pool.
#include "stdafx.h"
#using
using namespace System;
using namespace System::Threading;
// TaskInfo holds state information for a task that will be
// executed by a ThreadPool thread.
public __gc class TaskInfo
{
// State information for the task. These members
// can be implemented as read-only properties, read/write
// properties with validation, and so on, as required.
public:
String* Boilerplate;
int Value;
Thread *tHandle;
// Public constructor provides an easy way to supply all
// the information needed for the task.
TaskInfo(String* text, int number)
{
Boilerplate = text;
Value = number;
tHandle=NULL;
}
};
public __gc struct Example
{
// The thread procedure performs the independent task, in this case
// formatting and printing a very simple report.
//
static void ThreadProc(Object* stateInfo)
{
try
{
//Do Always
TaskInfo *tInfo= (TaskInfo *)(stateInfo);
tInfo->tHandle = Thread::CurrentThread;
TaskInfo* ti = dynamic_cast(stateInfo);
Thread::Sleep(10000);
Console::WriteLine(ti->Boilerplate, __box(ti->Value));
}
catch(ThreadAbortException *Te)
{
Console::WriteLine(S"Thread Aborted by Main Thread{0}",Te->ToString());
}
}
};
int main()
{
try
{// Create an object containing the information needed
// for the task.
TaskInfo* ti = new TaskInfo(S"This report displays the number {0}.", 42);
// Queue the task and data.
if (ThreadPool::QueueUserWorkItem(new WaitCallback(0, Example::ThreadProc), ti))
{
Console::WriteLine(S"Main thread does some work, then sleeps.");
// If you comment out the Sleep, the main thread exits before
// the ThreadPool task has a chance to run. ThreadPool uses
// background threads, which do not keep the application
// running. (This is a simple example of a race condition.)
Thread::Sleep(1000);
//Abort the Thread started
ti->tHandle->Abort();
Thread::Sleep(15000);
Console::WriteLine(S"Main thread exits.");
}
else
{
Console::WriteLine(S"Unable to queue ThreadPool request.");
}
}
catch (...)
{
Console::WriteLine(S"Unknown Exception Occured in Main");
}
return 0;
}
;
Shahid Munshi
|
|
|
|
|
i am not good at multithreaded but in my company we had problems about suspending or aborting threads instead we let them die...
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
I want 2 write a windows service which can check wheather any user is connected to some prticular machine or not.
Than can copy file from one location to an other location.
|
|
|
|
|
|
What is the difference between internal and private access modifiers? If I declare a method as private and another method as internal, what's the difference?
If I declare a class as private, what happens? Who will be able to use that class?
Hope I find the answers soon, coz this thing is making my head spin round and round?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
If you search "internal access modifier" in VS, you can find :
<---
internal : Access is limited to the current assembly.
private : Access is limited to the containing type.
-->
|
|
|
|
|
Save My Soul - (SMS) wrote: If I declare a class as private, what happens? Who will be able to use that class?
You can embed one class inside another. The class can be declared as private and only the containing class can use it.
public class ContainingClass
{
private class EmbeddedClass
{
}
public void SomeMethod()
{
EmbeddedClass o = new EmbeddedClass();
}
}
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
I think mentioning this embedding is crucial to somebody understanding it.
The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Hi,
Just wanted to know whether an Event is Fired when a Disk is inserted into a removable drive.
I checking the DriveInfo.IsReady property right now, but that is not efficient since I have a floppy drive and it takes a lot of time and makes a lot of noise.
Please Help
|
|
|
|
|
No, there isn't.
Windows has no idea that a floppy was insterted into the drive, or changed with another disk, until an access attempt is made on the disk.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hmmm
Ok
Thank You
|
|
|
|
|
hey there i was wondering on the way in which collections of classes can be writen to file one after the other
I am so used to the operators << and >> but am trying a fully managed project that requires files to be encrypted but that is aside this topic.
I have so far just created a Read and Write public function for each class and passed the StreamReader/Writer in to that but this makes for a bit of annoying calls on each item.
Can you overwrite the StreamWriter/Reader input to accept your own classes???
Or I am looking for a managed << >> operator replacement!!
Just get comfitable and they change it all around ... Just like a woman would!!
|
|
|
|
|
HI,
I want to disable the MS OFFICE File Menu options and Tollbar Buttons
by using WINDOWS API's..?
We can do this by using MS OFFICE libraries, but i want do using WINDOWS API's.
IS IT POSSIBLE..?
If so PLZ send reply to : pradpb999@gmail.com
pradeep kumar
|
|
|
|
|
pradpb999 wrote: We can do this by using MS OFFICE libraries, but i want do using WINDOWS API's
Why?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|