Wednesday, March 28, 2012

Suddenly can't load assembly

I am using VS2005, and yesterday I copied a web site from my
development machine to
a Windows 2003 server, and the web site worked fine.
Today I made a few changes on my machine, and tried to repeat the
process,
but I get an error message:
Could not load file or assembly 'BaseRS' or one of its dependencies.
Access is denied
BaseRS.dll is in the bin folder, as it was previously.
Any ideas about what causes this message?What were the "few changes" you made ?
Anything to do with file permissions or the ASP.NET account ?
Did you enable impersonation and now a different account needs permissions ?
Juan T. Llibre
ASP.NET.FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
<jhcorey@.yahoo.com> wrote in message news:1133453674.384226.289410@.z14g2000cwz.googlegroups
.com...
>I am using VS2005, and yesterday I copied a web site from my
> development machine to
> a Windows 2003 server, and the web site worked fine.
> Today I made a few changes on my machine, and tried to repeat the
> process,
> but I get an error message:
> Could not load file or assembly 'BaseRS' or one of its dependencies.
> Access is denied
> BaseRS.dll is in the bin folder, as it was previously.
> Any ideas about what causes this message?
>
Did you try IISReset before doing the deployment.
If not, you may like to do that. Also, clear all your Temporary Asp.net
files from the folder C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files
before you deploy the application.
If that doesn't help you can try Filemon utility from www.sysinternals.com
and serch for access denied after you reproduce the error and save the log
file from the Filemon utility.
HTH
--
Cheers,
Rahul Soni
-->The secret to creativity is knowing how to hide your sources<--
"jhcorey@.yahoo.com" wrote:

> I am using VS2005, and yesterday I copied a web site from my
> development machine to
> a Windows 2003 server, and the web site worked fine.
> Today I made a few changes on my machine, and tried to repeat the
> process,
> but I get an error message:
> Could not load file or assembly 'BaseRS' or one of its dependencies.
> Access is denied
> BaseRS.dll is in the bin folder, as it was previously.
> Any ideas about what causes this message?
>
The app does use impersonation, and that may have been a change in the
web.config.
(Although it uses anonymous access, and yes there was a reason for this
that made sense at one point).
I can experiment without impersonation and see if that makes a
difference. What would I do if it does?
I'm not familiar with any new deployment procedures, so I figure I
better take a look in help.
But I assumed that copying the folders would work for deployment, as it
did in ASP.NET 1.
Anyway, I'll try Rahul's suggestions as well, thanks.
re:
> I can experiment without impersonation and see if that
> makes a difference. What would I do if it does?
Run this aspx page :
identity.aspx :
--
<%@. Page Language="VB" %>
<script runat="server">
Sub Page_Load(obj as object, e as eventargs)
Dim user as string = Environment.Username
lblUser.Text = user
End Sub
</script>
<html>
<body>
<asp:Label id="lblUser" runat="server"/></asp:Label>
</body>
</html>
--
That will tell you which account needs permission to the directory
where the BaseRS assembly is located ( the /bin dir, right ? ).
Juan T. Llibre
ASP.NET.FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
<jhcorey@.yahoo.com> wrote in message news:1133455339.559879.253270@.g44g2000cwa.googlegroups
.com...
> The app does use impersonation, and that may have been a change in the
> web.config.
> (Although it uses anonymous access, and yes there was a reason for this
> that made sense at one point).
> I can experiment without impersonation and see if that makes a
> difference. What would I do if it does?
> I'm not familiar with any new deployment procedures, so I figure I
> better take a look in help.
> But I assumed that copying the folders would work for deployment, as it
> did in ASP.NET 1.
> Anyway, I'll try Rahul's suggestions as well, thanks.
>
Juan,
Impersonation was indeed the issue. The impersonation user id is from
a different domain.
For some reason this did not cause a problem on my development machine.
I'm not sure if I should address this within the folder system or
within IIS6.
I tried changing the security on the folder (it already had 'Everyone'
with full control)
to give explicit access to this userid, but it didn't help.
Thanks,
Jim
Finally got this working (I think)
After quite a bit more playing around with security for impersonated
user,
I googled some more and saw that I had to grant permissions (full
control) on
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
and so I'm running...
Jim

0 comments:

Post a Comment