Thursday, December 15, 2005

ASP.NET 2.0 Problems

Wow, has this blog been dead for a while. I guess it's because I don't consider most little things worth posting here, and any cool big things I don't have the time to type up. What I think I'm going to try is just dumping stuff here. I'm in the process of working on converting one of our web apps from ASP.NET 1.1 to 2.0, and there is a lot of cool things to do, and a lot of little problems. So here's one of the first.

I have a site which uses a couple of .dll's. The thing compiled fine in ASP.NET 1.1, but I had a problem compiling it in ASP.NET 2.0. I would get this error:
Error 1 Could not load file or assembly '<dll>, Version=<version>, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.

I'm using impersonation on the application so it can get to other network resources, so ASP.NET is being run under the user AspnetMyUser. That's not really the name, but the real name isn't important. The problem was that this user couldn't load the .dll's because he didn't have permission. So I just gave the user Modify rights to the temporary ASP.NET folder located here:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

Now everything works great. I had to do the same thing for 1.1, but since there is a new temp directory for 2.0 I had to give the user rights to it.

1 comments:

Ratna F. said...

Thanks...
Nice solution.. :)