Jump to content

.NET Application won't run from file share


Recommended Posts

Greetings

In what is/was my last attempt at coding an application in C# ( :realmad: ) ...For reasons of "Expediance" (HA!). I have an application that runs perfectly on local machine, but won't execute or even load from a network share.

Now, seeing that I've no intension of romping through the entire company manually installing this thing on every &*% machine in the building...I'd like to have it run from a share so that any updates necessary only need to be done ONCE!

So...Is there a way of setting the .NET v2.0 configurator options via Domain Group Policy so it'll Oke'Doke this thing into running? Or do I have to start from scratch and recode this thing in C++ so it acts like a proper application?!?

I've got it running on a test box now but that required installing the ENTIRE .NET SDK...Just so I could give Full Control permission to anything running in the Intranet Zone...Which is neither a wise or acceptable option.

Any Suggestions Appreciated

Stoic Joker

Link to comment
Share on other sites


If MSVS is running I get a debugger complaint about code permissions. Otherwise it just does nothing. I spent most of last night playing with the compiler/project settings in an attempt to get this thing to fly straight, adding Strong Name key file, Permissions manifest files, etc. etc.

Nothing ever did work, including use of the Strong Name code signing key to get the blasted thing to run from a mapped drive.

Note: this is while running with full access NTFS & Share permissions, and using the Domain Administrator account.

I've already gone through several tutorials over at CodeProject.com trying to find a resolution that (won't take months) will "Permit" this thing to run from the share. but so far none of it has hellped. The thing that's killing me is even if I set the Intranet zone to Run Anything at the Enterprise level, it not only has no "Enterprise Level" effect, but won't even run on the machine I set in from. It's insisting that I drop its Knickers at the machine level or the partys over.

*Sigh*

If I can find a way of giving this thing the domain wide "Go Ahead" via Group Policy I'm done ... Project Complete. Other wise I'm less than half started having to recode the whole thing in Pure Win32 API C++ ... Just so I can know it'll run reguardless of where I put it.

Link to comment
Share on other sites

Well, it sounds like you've done the basics, which means the project either requires something local to the machine, or IE zone settings are not working properly (and I think you'd know that if it was broken, so not likely).

I hate .net for most things anyway - go with C and be done with it.

Link to comment
Share on other sites

Hi,

I faced the same problem with XPSP2 and .vbs, .bat and .exe installations running from network shares. I used a .reg file to add the location to the trusted sites list and the problem went away.

The file is of the form:

------------------

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1]

"file"=dword:00000002

":Range"="192.168.0.2"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range2]

"file"=dword:00000002

":Range"="192.168.0.5"

------------------

etc

Merge it before you run your program and it may solve your problem.

I hope this helps you.

Regards,

Yianni

Link to comment
Share on other sites

Well, it sounds like you've done the basics, which means the project either requires something local to the machine, or IE zone settings are not working properly (and I think you'd know that if it was broken, so not likely).

I hate .net for most things anyway - go with C and be done with it.

ROFL - Indeed this will be myfirst & last "Shortcut" via .NET programming.

I did end up getting an answer, while not the one I was looking for...It is the one I'm going to use. Chugworth over at ieXbeta.com reminded me of the commandline option for setting .NET's code execute permissions which can be used without installing the entire SDK. So all I have to do is temporarly tie the below script into GP and I'm (or the App rather is) "Live".

%windir%\Microsoft.NET\Framework\v2.0.50727\caspol.exe -quiet -m -ag 1.2 -url file://ServerName/ShareFolder/* FullTrust

Strangely (however I should have known) the .NET CLI is much easier to contend with than the GUI.

Link to comment
Share on other sites

LOL - shows how much I remember. I guess I just don't like JIT runtime environments - Java, .NET, etc. To each his or her own, but I'll stick with what has worked for decades before I jump to anything where I don't have control over all of my own code :).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...