AnthonyHunter

I have created a C# project on my source control (ClearCase) drive and I can no longer debug my code. This was working earlier this week, but something has just recently changed and I'm not sure what. I have another C# project on the same drive and I can debug it with out any problems.

The error I'm getting is: "Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

Both projects are using the same class, and only one is throughing an exception. When the exception window comes up I have tried picking the "Add permission" option, but that didn't help.

Does anyone have any ideas what setting it would be that would cause one project to work fine, and another not too Like I said I was debugging this app earlier this week. So I have accidently changed something since then.




Anthony


Re: Visual Studio Debugger Problem debugging C# program from network

Jackson Davis - MSFT

Does this repro when you run your application outside the debugger (i.e. ctrl F5 or browsing to it) When you run a .Net application off of a network share, it will be granted a different permission set than if it were run off of a local machine. You can modify your machine policy to grant the zone the application is given (probably Intranet) the permissions you need. Here is a document that describes how this works: http://msdn2.microsoft.com/en-us/library/c1k0eed6.aspx

Did you by chance change the security policy on your machine





Re: Visual Studio Debugger Problem debugging C# program from network

AnthonyHunter

Yes this happens when I run it outside of the debugger (ctrl F5). I have not changed any security policies on my computer. If one of them had changed, I would suspect that my other .net apps would have the same problem. This problem seems to be isolated to just one of my apps.



Anthony




Re: Visual Studio Debugger Problem debugging C# program from network

Jackson Davis - MSFT

Think I just ran into a bug in the forums. It posted 10 copies of this post.

Does it occur when you run it from just a command prompt (outside of the debugger altogether )

BTW, the other .Net apps may not repro it if they don't require the permission. Security demands occur at the time they are needed.

Jackson





Re: Visual Studio Debugger Problem debugging C# program from network

AnthonyHunter

Yes it also happens when running it from the command line.

I have a shared class between my apps, and I only have one app that generates this error when I debug.



Anthony