Signing my .NET Custom Control

G

Guest

Hi All,

I'm currently trying to embed .NET Custom Control into my ASP .NET. The
control call FindWindow and BringWindowToTop function of Win32 API that is
wrapped under another DLL file.

I read documentation and it says that I need to sign my control using
SignCode and I did. I signed both DLL (Control and Wrapper), but I still have
the error message for Security Exception. This is the message:

The application attempted to perform an operation not allowed by the
security policy. The operation required the SecurityException. To grant this
application the required permission please contact your system administrator,
or use Microsoft .NET security policy administration tool.

Can anyone help me with the issue? It's a bit urgent at the moment.

Regards,
Budhi
 
S

Steve C. Orr [MVP, MCSD]

..NET windows forms controls embedded in web pages don't have much access to
the local computer by default. To grant it access you should use the .NET
Configuration utility (found in Control Panel, Administrative tools.) This
would need to be adjusted on every client computer to grant your control
full trust on every client computer. Once you make the necessary
adjustments on one computer, you could create an MSI for your users to run
that will make the adjustment for them. To create the MSI use the "Create
Deployment Package" option in the .NET configuration utility.
 
G

Guest

Hi Steve,

Thanks for the reply. What I was thinking is something like Windows Update
or Online Virus Scanner, where the user will be asked to agree for
downloading ActiveX Control from them and it will be installed into local
computer. Will it be possible in .NET?

I have also used the .NET Configuration Utility, and grant my control to
full trust using the URL, but it doesn't work. Maybe I did it wrongly. Can
you guide me on this? Or is there any site that explain how this can be done?

Regards,
Budhi
 
G

Guest

Hi Steve,

I have changed the application to use System.Diagnostics.Process. Therefore,
instead of using FindWindow, I'm using Process.GetProcessesByName, and the
get the window handle from there. After that I use SetForegroundWindow to
make the window active.

It works well on Desktop application, but still doesn't work on ASP .NET
application. It still throws me the same error with Request Failed message.

Regards,
Budhi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Security Problem 1
Security issue on Windows7 1
Web Service 1
Security Exception 0
Debug Session on localhost 5
trust level problem 1
security issue with windows control in aspx 4
Security exception 0

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top