Runs on development machine, not on server?

J

Joe Befumo

I'm trying to deploy a asp.net app that I developed in Visual Studio 2003 on
an XP Professional machine. It runs fine on the development machine, but
when I try to run it locally on the server (i.e., http://myserver/myappdir.)
I get an error like this:



Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\myappdir\71a79d23\a4a00da7\hash.web" is denied.



When I looked for that path, there was no such subdirectory as "myappdir"
under "Temporary ASP.NET Files". So, I looked on my development machine,
and sure enough, the rest of the tree was there, so I moved the whole thing
to the server. That's when I noticed that the two bottommost directories
(71a7923 and a4a00da7) were actually different values. I renamed them, then
went in and gave IUSR_myserver full permissions for the entire directory
structure, and then applied it to hash.web as well.



The error message persists.



Any ideas would be appreciated.



Thanks.



Joe
 
S

sloan

If you're using **impersonation**...then you need to give that temporary
directory the priv's. to the impersonation account (not the IUSR_ account).



That's where I ran into this issue.

Please post if this addresses your issue.
 
J

Juan T. Llibre

re:
went in and gave IUSR_myserver full permissions for the entire directory

If IUSR_myserver is not your ASP.NET account,
giving IUSR_myserver permissions won't solve your problem.

You need to give ACL permissions to *the account ASP.NET is running as* to
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\"

Run this :

<%
Response.Write("ASP.NET is running as the account : " & Environment.Username)
%>

in any aspx file, and give *that account* access permission to:
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\"
 
J

Joe Befumo

Am I correct in understanding that 'impersonation' refers to the account
indentified in the 'Enable Anonymous User' dialog in IIS Administrator?

I checked and it was IUSR_MYMACHINE. I tried changing it to administrator,
and also giving access to the directory to virtually everyone.

Still no change.

Joe


sloan said:
If you're using **impersonation**...then you need to give that temporary
directory the priv's. to the impersonation account (not the IUSR_
account).



That's where I ran into this issue.

Please post if this addresses your issue.
 
J

Juan T. Llibre

Joe,

just run the little script I sent you :

<%
Response.Write("ASP.NET is running as the account : " & Environment.Username)
%>

in any aspx file.

It will return the correct account to give permissions to.





Joe Befumo said:
Am I correct in understanding that 'impersonation' refers to the account indentified in the
'Enable Anonymous User' dialog in IIS Administrator?

I checked and it was IUSR_MYMACHINE. I tried changing it to administrator, and also giving access
to the directory to virtually everyone.

Still no change.

Joe
 
J

Joe Befumo

I'm getting the same error when I try to load any .aspx file, so I can't
insert the script below.

If I rename my index.htm to index.aspx, but don't change anything else, it
gives me the same error.

Is it maybe something I have to set in the Dot.net configuration utility?

Joe

Juan T. Llibre said:
re:
went in and gave IUSR_myserver full permissions for the entire directory

If IUSR_myserver is not your ASP.NET account,
giving IUSR_myserver permissions won't solve your problem.

You need to give ACL permissions to *the account ASP.NET is running as* to
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\"

Run this :

<%
Response.Write("ASP.NET is running as the account : " &
Environment.Username)
%>

in any aspx file, and give *that account* access permission to:
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\"
 
J

Juan T. Llibre

re:
Is it maybe something I have to set in the Dot.net configuration utility?

Only if you changed the process account for ASP.NET
or changed machine.config so that impersonation is used.

If you did, restore the default account by modifying machine.config's processModel :

<processModel userName="machine" password="AutoGenerate" />

Otherwise, leave it alone.

re:
If I rename my index.htm to index.aspx, but don't change anything else, it gives me the same
error.

OK...

The default ASP.NET installation for XP Pro sets up the "YourMachineName\ASPNET"
user account as the account ASP.NET should use.

Try giving full ACL permissions to "YourMachineName\ASPNET" for the directory :
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\"
and select "propagate permissions to subdirectories" ( or "inherit", I don't remember exactly )

That should allow you to run basic aspx pages ( unless you haven't registered ASP.NET ).

There's additional info at :
http://support.microsoft.com/defaul...port/kb/articles/q317/0/12.asp&NoWebContent=1
should you need it.

You could, just to make sure, open a command window at :
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\" and run :

aspnet_regiis -u
and then
aspnet_regiis -i

That sequence will restore the necessary permissions to YourMachineName\ASPNET

Do that and let us know what happened.





Joe Befumo said:
I'm getting the same error when I try to load any .aspx file, so I can't insert the script below.

If I rename my index.htm to index.aspx, but don't change anything else, it gives me the same
error.

Is it maybe something I have to set in the Dot.net configuration utility?

Joe
 
J

Joe Befumo

Yeah, well -- problem is, I can't run ANY aspx file without getting that
error . . .

Joe

Juan T. Llibre said:
Joe,

just run the little script I sent you :

<%
Response.Write("ASP.NET is running as the account : " &
Environment.Username)
%>

in any aspx file.

It will return the correct account to give permissions to.
 
J

Juan T. Llibre

Our posts are crossing.

See the post after that one...
( Posted at Thu, 23 Feb 2006 19:36:37 GMT -0400 )




Joe Befumo said:
Yeah, well -- problem is, I can't run ANY aspx file without getting that error . . .

Joe
 
J

Joe Befumo

Okay, I've made the IIS default user MYMACHINE\ASPNET, and have given full
control of the windows/..../framework, and wwwroot directories to
MYMACHINE\ASPNET. Still the same error, but now . . . my pop server is not
longer accepting any passwords 8^O
 
J

Joe Befumo

Hmm now I'm getting a different error: I think this is what I was getting
when I started out.

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top