Re: SecurityPermission fails when running app from server VB.Net 2005
- From: "Rick Lederman" <rick@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 May 2006 15:43:30 -0400
Nicole,
TCMaxLabelMaker is my own Windows application. I have just had a similar
problem with a VERY simple app that I'm playing with to try to replace VB6
technology with .NET. The program is extremely simple. And when I run it
from another machine (Or this machine) (NeoTest is the name of the program)
It generates a file titled NeoTest.vshost.exe in the Bin\Debug folder. When
I try to run it from this machine later I get an error that says a file is
in use. I must go to my small business server to manually delete this
program before I can run it from this machine. The same thing happens when
I go back to the other machine now and try to run it from there. That is a
huge nusence when a couple of us are trying to code the same program.
--
Rick Lederman
Soaring Software Solutions, Inc.
www.soaringsoftware.com
rick@xxxxxxxxxxxxxxxxxxx
"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
news:eiSQ8AsbGHA.2396@xxxxxxxxxxxxxxxxxxxxxxx
"Rick Lederman" <rick@xxxxxxxxxxxxxxxxxxx> wrote in message
news:u4BN6okbGHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
My VB.Net 2005 app runs in the IDE fine from my own machine, but when the
source code resides on my Small Business Server I get a fatal error
(below my signature) right away when the form starts to load.
It looks like something in TCMaxLabelMaker requires some subset of
SecurityPermission that is not part of your CAS policy grant for the
intranet zone. Is TCMaxLabelMaker a component that you authored yourself,
or is it a third-party product?
This app did run from the server at one time, but not now.
Did the application change or did the CAS policy change?
Any ideas? I have two different development stations that work on
projects. Another symptom is that when an app is worked by the other
workstation (code sits in the server), then I try it from a different
workstation there is a appname.vshost.exe that was created by the other
workstation that can not be overwritten by this workstation, nor deleted
here. I must go directly to the server and delete it from there. This
may be a totally different problem than the first, but it reaks of a
secruity problem.
It's a completely separate problem. The vshost.exe is used by VStudio
(see http://msdn2.microsoft.com/en-us/library/ms185331.aspx for details),
but shouldn't be used when your application is run by end users. If
you're having problems deleting the file, it could be that the workstation
from which it was created is keeping a lock on the file. However, this
seems unlikely if you can delete from the server, and I suspect that user
permissions on the file are a more likely culprit. Have you perhaps set
permissions on the parent folder to not allow deletions to accounts other
than admins or creator/owner?
--
Rick Lederman
Soaring Software Solutions, Inc.
www.soaringsoftware.com
rick@xxxxxxxxxxxxxxxxxxx
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See
Exception.InnerException for details. The error is: Request for the
permission of type 'System.Security.Permissions.SecurityPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed."
Source="TCMaxLabelMaker"
StackTrace:
at TCMaxLabelMaker.My.MyProject.MyForms.Create__Instance__[T](T
Instance)
at TCMaxLabelMaker.My.MyProject.MyForms.get_frmMain()
at TCMaxLabelMaker.My.MyApplication.OnCreateMainForm()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at TCMaxLabelMaker.My.MyApplication.Main(String[] Args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
.
- Follow-Ups:
- Re: SecurityPermission fails when running app from server VB.Net 2005
- From: Nicole Calinoiu
- Re: SecurityPermission fails when running app from server VB.Net 2005
- References:
- SecurityPermission fails when running app from server VB.Net 2005
- From: Rick Lederman
- Re: SecurityPermission fails when running app from server VB.Net 2005
- From: Nicole Calinoiu
- SecurityPermission fails when running app from server VB.Net 2005
- Prev by Date: Re: System.Security.Permissions.FileIOPermission Error
- Next by Date: Yahoo is spreading spyware!
- Previous by thread: Re: SecurityPermission fails when running app from server VB.Net 2005
- Next by thread: Re: SecurityPermission fails when running app from server VB.Net 2005
- Index(es):
Relevant Pages
|