|
You have to adjust code access security settings.
.NET checks where your application is started and assigns a codegroup.
Local executables have "full trust" by default.
If you start your app from a UNC path it is in intranet zone.
If you start it from a IP Adress it is in internet zone.
By default intranet und internet zone have serveral restrictions.
try this:
Open a command prompt and type:
caspol -rsg <your assembly="">
you can see the codegroups your assembly belongs to.
caspol -rsp <your assembly="">
will show you which permissions are granted to your application.
If you have the .NET Framework SDK on the machine you can use the .NET configuration tool.
If you want your application to have always fulltrust you can do this:
a) sign your assemblies with a strong name and
add a codegroup with a strong name condition (you can use caspol)
b) sign your assemblies with a certificate and
add a codegroup with a publisher condition (you can use caspol)
|
|
|
|
|
It doesn't help. The same problem appears again. When I run program in debug mode (by pressing F5) debbuger says that exception throws from mscorlib.dll. May be this will help you to help me?
|
|
|
|
|
the caspol.exe is part of the sdk !
See <%windows%>\Microsoft.NET\Framework\v2.0.50727
Please try this !
|
|
|
|
|
Hello!
I am trying to write a simple application that monitors filesystem access, and denies access to specific folders. I know that there is a class named FileSystemWatcher, but it gives only monitoring abilities. Can I stop copying a file when I catch it?
Thanks in advance!
Have a nice day!
|
|
|
|
|
if you want to protect a folder then use the acccess control stuff. All the permissions stuff is there for a reason :P
|
|
|
|
|
You didn't understand me. What I want is to catch file system events before they are executed.
For example, if I try to copy a file, I want to catch it at the moment the user pressed "Paste", and before the file is being copied.
I hope I can do it in .NET...
Have a nice day!
|
|
|
|
|
No, I understand what you want to do.
If you want to protect a folder you should use file system permissions.
Why do you want to impliment your own system rather than use whats provided for you? Off the top of my head I can't think of any good reason to do so, but that doesn't mean there isn't one :P
|
|
|
|
|
I think he wants something like Antivirus. When you save a virus infected file into the hard-disk, it jumps to the forefront immediately (almost instantly) and wipes out the file with the warning.
But again, the file gets saved and then the Virus Scanner jumps in. Isn't it?
|
|
|
|
|
when i am opening the visual studio .net new project the error shwoing that "Visual studio.net has detected the specified webserver is not running ASP.NET version1.1 you will be unable to run ASP.NET webapplication or service"
murugan
|
|
|
|
|
Did you have a question to ask or just informing us of random error messages?
If your asking about that error message it's pretty self explanitory and I bet google has a ton of answers.
|
|
|
|
|
Didn't running aspnet_regiis -i solve your problem?
|
|
|
|
|
Hello ,
I am having a problem in this issue,
I am trying to print a XPS document by passin job name and file path to
PrintQueue.AddJob(jobname,filename,false)
now job is getting queued and printed but the folder where the file is which i am printing is getting locked(i.e I am not able to delete the folder) even if i am deleting the file inside it.
Who am I?
Do you know me....
|
|
|
|
|
Did you try (TaskManager Extension) so see which process has an handle on the folder?
|
|
|
|
|
Hello All,
Is there a way to do this? Or if not is there
a way to force the recyclebin to empty it's self?
Thanks..
is you have code..doesn't matter which language
|
|
|
|
|
Have you tried holding down the Shift key when you hit Delete?
|
|
|
|
|
I think he meant it how to do it programmatically
|
|
|
|
|
Then he better be specific about it. Besides, when my code delete's a file, it doesn't end up in the RecycleBin. That's a function of the Shell, not the file system.
|
|
|
|
|
Dave Kreskowiak wrote: Then he better be specific about it.
This message board is really funny. You can easily get attacked for nothing.
Sorry Dave perhaps next time i will post my questions on a board that's for programming. I really messed up.
Indeed i did mean programatically. At the moment when i delete a file it ends up in the recycle bin. is there a way to empty the recycle bin programatically ?
|
|
|
|
|
How are you deleting the file?? Like I said, the file ending up in the RecycleBin is a function of the Shell, not the file system.
|
|
|
|
|
Ylno wrote: You can easily get attacked for nothing.
Dave wasn't attacking you, just suggesting you be a bit more specific with your question. It happens alot on these forums and if someone isn't being specific enough, they will be called upon about it. Being specific helps narrow the problem down
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Hi,
As there is limit on number of thread pool threads, is it a good idea to let
remoting object requests come by thread-pool threads? If not, what is the
alternative?
Also on .NET Framework 2.0, ThreadPool thread's default apartmentstate is
MTA. Is it possbile to set Thread-Pool thread's apartmentstate to STA? Is
this possible via remoting configuration? Can you pls give an example or any
link that points to the example?
Does the apartmentstate of .NET thread have any impact on any Native calls?
Or the apartmentstate is just to facilitate COM interop?
If we have COM object that needs to be in STA how to manage the scenario
within MTA of thread-pool thread?
Thank you & Best Regards, Renuka
|
|
|
|
|
hi i want to rebuild my setup file with new changes on my code and have to give it to endusers.
the thing i want is i don want them to uninstall the older one i want to upgrade the installed one.how to do that
with regards
Balagurunathan.B
|
|
|
|
|
You need to make sure that the version number for all of your binaries is higher than the previous version number. If you are using an MSI installer, you also need to change the upgrade code and the product version (I think that's the field name, but I'm not 100% sure...either way, it should be the only version number in the setup project) so that the Windows Installer service recognizes that this is a different version. Keep in mind that MSI only looks at the first 3 portions of the product version when determining if the installer is newer or not.
|
|
|
|
|
Change the version number in the installer properties and VS will remind you to change the product code. Then you might want to flick on the "Remove previous versions" property, to make the upgrade less painful.
|
|
|
|