VB .NET 2003, Security Permissions Error

I have an application that was written in VB .NET 2003 using Framework 1.1. What would cause this error to occur on a user PC but not a developer machine?

Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.0500.0, Culture=neutral, PublicKeyToken=b77a5c564934e089 failed.

It was working before, but our company does nightly updates to our PCs (we lock them but never shut them off).  I checked the Trust Levels in Administrative Tools-->Microsoft .NET Framework 1.1 Wizards and they are set to full.  The Assembly is pointing to the correct application.  The ODBCs are setup for the application to connect to the database via Windows Authentication.  I'm at a loss for what could cause this error to appear when one day the program works then it's broken the next.

Thanks in advance for any help!
nightshadzAsked:
Who is Participating?
 
melmersCommented:
i think that are group policies or lost "full trust" to the network share. are there any domain policies that reset the trusts from the .net config ?

if it runs localy then it is a wrong trust or lost trust to your network share.
speak with your domain admins to set your share into a full trust share.
0
 
melmersCommented:
Are the App running from a network share ?
Have you Global Security Policies in your Domain which overwrites the .NET Configuration ?
0
 
nightshadzAuthor Commented:
Yes, the app is running from a network share.  Basically the users have a shortcut on their desktops to the app on the server.

The error occurs after a button click which creates two Excel (XLS) files.  I don't have any control over domain policies.  That's a different group within the company.  

1) If the answer lies in Global Security Policies in the domain, what should I ask that group?
2) Now that you know it's running from a network share, is there anything on my end I can do to prevent this error?

Thanks!
0
The Firewall Audit Checklist

Preparing for a firewall audit today is almost impossible.
AlgoSec, together with some of the largest global organizations and auditors, has created a checklist to follow when preparing for your firewall audit. Simplify risk mitigation while staying compliant all of the time!

 
melmersCommented:
The application starts without the error ? then it's not the security policy becaus it would prevent the startup of the app.

your excel creation does you have different excel versions running (2007 and 2003)
0
 
nightshadzAuthor Commented:
Yes, every part of the application runs fine except for when the user clicks on the button to create the Excel files.  By different versions of excel do you mean does the user have different versions of MS Office installed on their PC?  The only version of Office this company uses now is 2003.

The procedure starts like this after the button is clicked:
        Dim xlsMain As New Excel.Application
        Dim xlWrkBk As Excel.Workbook

        Dim ds As DataSet
        Dim ds1 As DataSet

        If xlsMain Is Nothing Then
            MsgBox("Could not start Excel!", vbCritical + vbOKOnly, "FAS 109 Load Error")
            Exit Sub
        End If

        Try
           .........
0
 
melmersCommented:
Is Office installed on the Machine where the application runs ?
Does this error occur on all machines or only on some ?

Try to change the line
Dim xlsMain as Object = CreateObject("Microsoft.Excel")
0
 
nightshadzAuthor Commented:
It only happens on one user's machine.  It runs fine on others.  

What about the workbook variable xlWrkBk.  What parameter would I pass to CreateObject for that?
0
 
nightshadzAuthor Commented:
Dim xlsMain as Object = CreateObject("Microsoft.Excel") caused the program to crash - "Cannot create ActiveX component.".  Any idea why this would happen?
0
 
melmersCommented:
Sorry wrong Progid.
Dim xlsMain as Object = CreateObject("Excel.Application")
0
 
nightshadzAuthor Commented:
I still get the Security Permissions error.
0
 
melmersCommented:
when you copy the executables and the interop assemblies to a local folder does it run on the clients?
0
 
nightshadzAuthor Commented:
This worked, but it can't be the solution as every user has a link on their desktop to run the application.  If the interop files were on the server with the app, will it work then?

What caused it to work when the executable and the interop files were in the same folder locally?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.