473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Signing my .NET Custom Control

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
Sep 15 '06 #1
3 1731
..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.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net

"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message news:D3**********************************@microsof t.com...
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

Sep 15 '06 #2
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

"Steve C. Orr [MVP, MCSD]" wrote:
..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.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net

"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message news:D3**********************************@microsof t.com...
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


Sep 18 '06 #3
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

"Steve C. Orr [MVP, MCSD]" wrote:
..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.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net

"Budhi Saputra Prasetya" <Bu******************@discussions.microsoft.com>
wrote in message news:D3**********************************@microsof t.com...
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


Sep 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
3
by: Joel Leong | last post by:
I wish to know the industrial practices for signing assemblies with key files. I genereted a key file to sign my assemblies. Should I sign all my assemblies with a single key files or I shall...
1
by: Martin | last post by:
I have a couple of questions around code signing with MS technology: 1. Is there a way to transfer the generated strong name signing private key directly to a smartcard (or generate it on the...
4
by: Todd Richardson | last post by:
Two questions. We would like to have users complete ASP.NET web forms for submission. Once these are completed I would like to generate an XML document from the form. The XML document should...
0
by: Raffi Basmajian | last post by:
I am trying to understand the difference between signing ClickOnce manifests and signing shared assemblies. My company is building .Net 2005 WinForm applications for internal company use only....
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
5
by: jignesh | last post by:
I have developed a ActiveX control and place it in a ASP.NET web page. I am able to use the control very well when the web page is viewed locally. When any other machine is trying to open the...
0
by: =?Utf-8?B?SWRhaG8gQmlsbA==?= | last post by:
Using VS2005 and Team Systems, I use Click Once to build and deploy my Windows Forms application from my desktop onto a network share. On the project's property page on the Signing tab, I check...
6
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.