Alvin Bruney [ASP.NET MVP]
6/16/2008 10:20:00 PM
Applications run from explorer are run under the my computer zone which has
full trust. The batch file may not depending on the logged on user on which
it is running. You'd first have to determine if this is even a CAS issue by
turning CAS off on the affected machine (caspol -s off at the sdk command
prompt). If the application runs fine with CAS off, then you'll need to
configure an appropriate CAS policy. If the application does not run, you do
not have a CAS policy issue and you should look elsewhere for the problem.
See if that works.
If the application started failing a week ago, this is likely not a CAS
issue.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------
<lizet.pena@gmail.com> wrote in message
news:05cbc191-9e70-46a0-80d8-f90996a260c3@l64g2000hse.googlegroups.com...
> We have a windows form application that is deployed to several remote
> users.
>
> We use a batch file to execute the application.
> This batch file is in charge of doing an xcopy of any new files
> sitting on the deployment share (Intranet).
>
> The batch file also starts the application.
>
> We've noticed since a week ago the application is behaving differently
> if it is called from the batch file or from the command prompt than if
> the application is called from windows explorer.
>
> The actual error is in loading some objects from our domain model, the
> objects are not instantiated properly when we run the application
> using the following line on our batch file
>
> start applicationname.exe
>
> The same application works without problems (objects are instantiated
> and do not give null reference errors) when we double click the
> executable in windows explorer or use the following line in the batch
> file
>
> explorer applicationname.exe
>
> Any comments or suggestions for troubleshooting this are more than
> welcome.
>
> Why is the security context different?
>
> TIA
>
>
> L.