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 / August 2005

Tip: Looking for answers? Try searching our database.

C#.NET app to run on Win 2003 from another Win2003 on the local net?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
maks - 30 Aug 2005 15:19 GMT
Ok! I have a .NET (C#) app that I'm having a problem running on a Win
2003 box from a different Win 2003 box. I mean files physically are
installed on that second win 2003 server, and I'm trying to start it on
this first one. I get security error. I know about that .NET framework
wizard that allows you to adjust .NET level of protection to
internet/intranet/trusted and so on but that doesn't help.
This doesn't happen on XP/2000. Any ideas!
Thanks a lot in advance!
Please help! It's very urgent!
Nicole Calinoiu - 30 Aug 2005 15:30 GMT
> Ok! I have a .NET (C#) app that I'm having a problem running on a Win 2003
> box from a different Win 2003 box. I mean files physically are installed
> on that second win 2003 server, and I'm trying to start it on this first
> one. I get security error.

Would you be able to provide the complete exception details?  (The output
from its ToString method would be best, but anything might help narrow
things down a bit.)

> I know about that .NET framework wizard that allows you to adjust .NET
> level of protection to internet/intranet/trusted and so on but that
> doesn't help.

On which machine did you attempt to run the wizard?  Are you sure you were
granting sufficient permissions for the application to run?

> This doesn't happen on XP/2000. Any ideas!

I'm guessing that the other machines on which you've tested this have
perhaps had some CAS policy modifications applied, possibly via a group
policy object distributed via the domain.  You might want to ask the
relevant network admin(s) about this possibility.

> Thanks a lot in advance!
> Please help! It's very urgent!
maks - 30 Aug 2005 16:05 GMT
Thanks you very much for the reply!

>>Ok! I have a .NET (C#) app that I'm having a problem running on a Win 2003
>>box from a different Win 2003 box. I mean files physically are installed
[quoted text clipped - 4 lines]
> from its ToString method would be best, but anything might help narrow
> things down a bit.)

Here is the exception dump:
System. Security. Policy Exception: Required permissions cannot be acquired.
at TMSubDock.Form1.InitializeComponent
at TMSubDock.Form1..ctor
at TMSubDock.Form1.Main (String[] arg)

>>I know about that .NET framework wizard that allows you to adjust .NET
>>level of protection to internet/intranet/trusted and so on but that
>>doesn't help.
>
> On which machine did you attempt to run the wizard?  Are you sure you were
> granting sufficient permissions for the application to run?

Only on the Win2003 where I'm trying to run the thing. The second
Win2003 (file server) doesn't even have the framework installed at all.
Checked all the permissions!

>>This doesn't happen on XP/2000. Any ideas!
>
> I'm guessing that the other machines on which you've tested this have
> perhaps had some CAS policy modifications applied, possibly via a group
> policy object distributed via the domain.  You might want to ask the
> relevant network admin(s) about this possibility.

It actually sounds more like specific Win2003 issue due to stronger
security on it, may be. Hopefuly that is setable.

>>Thanks a lot in advance!
>>Please help! It's very urgent!
Nicole Calinoiu - 30 Aug 2005 19:13 GMT
<snip>
> Here is the exception dump:
> System. Security. Policy Exception: Required permissions cannot be
> acquired.
> at TMSubDock.Form1.InitializeComponent
> at TMSubDock.Form1..ctor
> at TMSubDock.Form1.Main (String[] arg)

A PolicyException usually results from one of the two following
circumstances:

1.  An assembly is denied SecurityPermission\Execution permission under
policy, or
2.  An assembly has one or more RequestMinimum permission attributes, but
CAS policy denies the permission(s) specified by these attribute(s).

Since the exception is thrown from the assembly that contains
TMSubDock.Form1, this is not the assembly that is being denied minimum
permissions under policy.  Instead, you should be looking at the permission
grants to assemblies that might first be loaded in the
TMSubDock.Form1.InitializeComponent method.

>> On which machine did you attempt to run the wizard?  Are you sure you
>> were granting sufficient permissions for the application to run?
>
> Only on the Win2003 where I'm trying to run the thing. The second Win2003
> (file server) doesn't even have the framework installed at all.
> Checked all the permissions!

The assembly that's causing the problem may not even be an assembly that you
authored.  In fact, it might not even be in your network deployment
location.  What happens if you copy the application to the Windows 2003
machine on which it is supposed to run?  Does it run successfully, or do you
still see an exception?  If there's an exception thrown, is it the same
exception?

> It actually sounds more like specific Win2003 issue due to stronger
> security on it, may be. Hopefuly that is setable.

While there are some very small differences between .NET Framework behaviour
on Windows 2003 vs. other Windows versions, I know of no differences in
default CAS policy configuration.  However, regardless of the reason for the
difference in policy (if this is the reason for the failure in the first
place), you'll need to figure out what permissions are missing from which
assemblies before you can adjust the policy to fix the problem...

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



©2009 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.