I've got a button online that produces a directory and copys personal files. I developed it using Visual Studio 2008, ASP.Internet 3.5. I'm running Vista as my OS. The web site uses identiy impersonation.

The functionality does not work ("Use of Path Abc is refused") when:

  • I run the web site via IE striking the neighborhood webserver

The functionality works fine when [note Visual Studio run with Admin privileges]:

  • I hit play in Visual Studio
  • I only say view in Browser from Visual Studio
  • I run the web site via IE striking the neighborhood webserver, but start IE with Admin privileges
  • I deploy the web site onto another webserver (also vista/IIS7)
  • I modify Opera to simply accept integrated authentication, then access via Opera and localhost

I have never witnessed this behavior before, formerly File.Copy type instructions only cared the privileges around the folder being replicated to were valid etc... (I've Everybody getting full control while attempting to debug this case). It appears likely the problem is getting Admin privileges or otherwise? Or just being drenched to the machine that it's running on?

What's happening here? Why do you use it within the development atmosphere and used to a different machine, although not work when used by myself machine? Appears very odd, any help could be appreciated.

EDIT: I have added "Everybody" to all the relvant sites and provide that user Full Control, so there should not be any permission issues?

Much more likely the consumer that IIS is running impersonated thread under does not need the initial file or even the destination. Perhaps you have attempted doing the copy directly as that user? Advertising media are IE as administrator or running Versus as administrator the impersonated user has full privileges as admin.

[Edit - add link]

There's some information on an identical thread, the concept to make use of SysInternals was good:

UnauthorizedAccessException with IIS7

You should attempt giving permission to change over asp.internet

you'll find several articles about this by google(ing) it.

OK I've located the reply to this problem given these signs and symptoms. I am not 100% sure why this works (particularly because it works fine in Opera and works fine in IE should you not hooking up in your area), however the following appears to become a work-around.

In IE choose Tools -> Internet Options -> Security -> Reliable Sites -> Sites and add http://localhost like a reliable site. This then allows you to employ the web site in your area. Why you ought to do that in IE when hooking up in your area and never in Opera or IE when hooking up to a different machine is one thing I'm not sure. However it does appear to become a viable workaround.

My prediction may be the identity ASP.Internet is running under does not have permissions (NetworkService) or even the user employed for anonymous authentication comes with permission (IUSR)