Security request failure

3 views
Skip to first unread message

Bill S.

unread,
Jan 2, 2006, 4:28:45 PM1/2/06
to
Hi,

My app runs fine when it's in a folder on any given user's machine on the
network. However, when I move the app to a location on the server, I get
this error: Request for the permission of type
System.Security.Permissions.SecurityPermission, ..., failed. I'm looking
through some of the security documentation and it's confusing. What's the
best way to fix this problem?

Thanks.


Nicole Calinoiu

unread,
Jan 3, 2006, 7:49:55 AM1/3/06
to
See http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx for a
general explanation of the problem and the usual solution approach. If you
would like help in identifying exactly which permission is causing this
particular exception, it would help quite a bit if you could post the full
exception details (including call stack listing) as returned by the
exception's ToString method.

"Bill S." <wsch...@comcast.net> wrote in message
news:KJ6dneE9rKEsByTe...@comcast.com...

Bill S.

unread,
Jan 3, 2006, 3:43:19 PM1/3/06
to
Hi Nicole,
The info was very helpful, but now I have another problem. I'm using three
COM references in my app: Interop.Word.dll, Interop.Office.dll, and
flexmaskeditbox.dll, in particular. Now, my app gives me the error: unable
to emit assembly: Interop.Word.dll etc. does not have a strong name. (I was
able to give my assembly as strong name using sn.exe -k KeyPair.snk.) I
tried adding these COM objects to the GAC through the gacutil.exe, but it
won't let me because they don't have strong names. How do I give them strong
names or how do I add them to the GAC?

Thanks!

"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
news:uGbswSGE...@TK2MSFTNGP14.phx.gbl...

Nicole Calinoiu

unread,
Jan 5, 2006, 7:24:47 AM1/5/06
to
You can give strong names to COM wrapper DLLs using tlbimp.exe
(http://msdn.microsoft.com/library/en-us/cptools/html/cpgrftypelibraryimportertlbimpexe.asp).
However, this shouldn't be necessary since Microsoft provides strongly names
primary interop assemblies for Office. Is there some reason you're creating
your own instead of using those?

"Bill S." <wsch...@comcast.net> wrote in message

news:G5ednboP6PoSfCfe...@comcast.com...

Bill S.

unread,
Jan 5, 2006, 12:00:33 PM1/5/06
to
Hi Nicole,
I don't want to have to create my own unless I have to. (I tried the
tlbimp.exe and it tells me that the Interop.office.dll is an invalid type
library.) I downloaded those PIA's from Microsoft's site a while back, but
these are not signed. Where are the signed versions located? I'm at my wits'
end here. I spent many hours trying to find a solution to this dilemma. I
was advised to use the "Wrapper Assembly for ActiveX COM Objects" option in
the project's properties dialog, but I'm using VB.NET and my version does
not support this option. (I did create 'test' CS.NET project and it worked
fine - I don't understand why this option isn't supported in VB?) I seems
everytime I follow a promising lead it turns out to be disappointing. If you
can think of any other possible solutions, please let me known. I really
need to figure out how to "sign" these COM objects.

Thanks!!!

"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message

news:OOmPhmfE...@TK2MSFTNGP15.phx.gbl...

Nicole Calinoiu

unread,
Jan 5, 2006, 12:24:13 PM1/5/06
to
"Bill S." <wsch...@comcast.net> wrote in message
news:-ridnbrlW97...@comcast.com...

> Hi Nicole,
> I don't want to have to create my own unless I have to. (I tried the
> tlbimp.exe and it tells me that the Interop.office.dll is an invalid type
> library.)

That's because you need to run tlbimp against the original COM DLL, not an
existing interop assembly. Tlbimp will generate a new interop assembly from
the COM DLL, applying a strong name signature to this new assembly if
specified.

> I downloaded those PIA's from Microsoft's site a while back, but these are
> not signed. Where are the signed versions located?

For Office 2003, they're installed with Office. See
http://msdn.microsoft.com/library/en-us/dv_wrcore/html/wrrefofficeprimaryinteropassemblies.asp
for details.

For Office XP, they can be downloaded from
http://msdn.microsoft.com/library/en-us/dnoxpta/html/odc_oxppias.asp.

Reply all
Reply to author
Forward
0 new messages