Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / January 2006

Tip: Looking for answers? Try searching our database.

Security request failure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill S. - 02 Jan 2006 21:28 GMT
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 - 03 Jan 2006 12:49 GMT
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.

> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks.
Bill S. - 03 Jan 2006 20:43 GMT
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!

> 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
[quoted text clipped - 13 lines]
>>
>> Thanks.
Nicole Calinoiu - 05 Jan 2006 12:24 GMT
You can give strong names to COM wrapper DLLs using tlbimp.exe
(http://msdn.microsoft.com/library/en-us/cptools/html/cpgrftypelibraryimportertlb
impexe.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?

> Hi Nicole,
> The info was very helpful, but now I have another problem. I'm using three
[quoted text clipped - 25 lines]
>>>
>>> Thanks.
Bill S. - 05 Jan 2006 17:00 GMT
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!!!

> You can give strong names to COM wrapper DLLs using tlbimp.exe
> (http://msdn.microsoft.com/library/en-us/cptools/html/cpgrftypelibraryimportertlb
impexe.asp
).
[quoted text clipped - 31 lines]
>>>>
>>>> Thanks.
Nicole Calinoiu - 05 Jan 2006 17:24 GMT
> 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/wrrefofficeprimaryinterop
assemblies.asp

for details.

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

> 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
[quoted text clipped - 43 lines]
>>>>>
>>>>> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.