error CS0016 in DotNet 2 with IIS6 after trying out CLR Profiler

T

tbh

i recently tried out the CLR Profiler on a Windows 2003 Server machine
running IIS6 and DotNet 2, SP1.

alas i never quite managed to get it to work in several attempts (but that's
another matter).

unfortunately at some point DotNet is broken under IIS on my machine (both
uses I need it for: a "web site" in the sense of DotNet 2 and a "web
application project" as reintroduced into DotNet 2).

all the clues i've been able to scrounge, including at MSDN, seem to refer
to DotNet 1 or 1.1 and prescribe cures involving permissions to the %TEMP%
and %TMP% folders. however, that does not help and does not appear to be the
problem for me. rather, the problem is with temporary compile directories
under, in my case,
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

specifically (one example, in case this helps)
Compilerfehlermeldung: CS0016: Could not write to output file
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\d\48708ebb\b200491f\App_GlobalResources.rkazyogv.dll' -- 'The
directory name is invalid. '

i assume I need to give the anonymous Internet User and perhaps a DotNet
user full recursive permissions under "Temporary ASP.NET Files" and am
pursuing that, but haven't solved the problem yet.

I'd be grateful for any specific suggestions (and perhaps someone could
place a detailed how to somewhere prominently?).

cheers,

Tim Hanson
 
M

Michael Nemtsev [MVP]

Hello tbh,

did u try to clear the temporary folder and restart iis?

btw, is it already precompiled site which u are trying to run, on u have
resources and able to rebuld all project?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


t> i recently tried out the CLR Profiler on a Windows 2003 Server
t> machine running IIS6 and DotNet 2, SP1.
t>
t> alas i never quite managed to get it to work in several attempts (but
t> that's another matter).
t>
t> unfortunately at some point DotNet is broken under IIS on my machine
t> (both uses I need it for: a "web site" in the sense of DotNet 2 and a
t> "web application project" as reintroduced into DotNet 2).
t>
t> all the clues i've been able to scrounge, including at MSDN, seem to
t> refer
t> to DotNet 1 or 1.1 and prescribe cures involving permissions to the
t> %TEMP%
t> and %TMP% folders. however, that does not help and does not appear to
t> be the
t> problem for me. rather, the problem is with temporary compile
t> directories
t> under, in my case,
t> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
t> Files
t> specifically (one example, in case this helps) Compilerfehlermeldung:
t> CS0016: Could not write to output file
t> 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
t> Files\d\48708ebb\b200491f\App_GlobalResources.rkazyogv.dll' -- 'The
t> directory name is invalid. '
t>
t> i assume I need to give the anonymous Internet User and perhaps a
t> DotNet user full recursive permissions under "Temporary ASP.NET
t> Files" and am pursuing that, but haven't solved the problem yet.
t>
t> I'd be grateful for any specific suggestions (and perhaps someone
t> could place a detailed how to somewhere prominently?).
t>
t> cheers,
t>
t> Tim Hanson
t>
 
T

tbh

thanks, Michael,

yes, i don't need to often, but I definitely tried the "clear temp folder"
and iisreset tricks several times. i will try a precompiled site, but my
problems are with a website (call it "d") and a web application project
(call it "f30"), and alas both give the same error with the simplest script
imaginable, even after I rebuild them.
 
M

Michael Nemtsev [MVP]

Hello tbh,

Try to re-registed ASP.NET 2.0 with aspnetregiis -i
and make sure that VirtualFolder in IIS have asp.net 2.0 dll to handle all
requests

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


t> thanks, Michael,
t>
t> yes, i don't need to often, but I definitely tried the "clear temp
t> folder" and iisreset tricks several times. i will try a precompiled
t> site, but my problems are with a website (call it "d") and a web
t> application project (call it "f30"), and alas both give the same
t> error with the simplest script imaginable, even after I rebuild them.
t>
t> t>
 
T

tbh

thanks, Michael,

i ran aspnet_regiis twice because the first time reported errors (i find no
signs of errors in the log file). the second run also reported errors, but I
found no signs in the log. see below.

not exactly sure what you mean with your second point, but i verified that
my /d Virtual Directory is in the correct pool and its Asp.Net settings show
the correct 2.0 version. is there more to it than that?

cheers,

Tim


C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>.\aspnet_regiis.exe -i
Start installing ASP.NET (2.0.50727).
......................................................
Finished installing ASP.NET (2.0.50727).
Setup has detected some errors during the operation. For details, please
read the setup log file C:\WINDOWS\TEMP\ASPNETSetup_00003.log

Michael Nemtsev said:
Hello tbh,

Try to re-registed ASP.NET 2.0 with aspnetregiis -i
and make sure that VirtualFolder in IIS have asp.net 2.0 dll to handle all
requests

---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

t> thanks, Michael,
t> t> yes, i don't need to often, but I definitely tried the "clear temp
t> folder" and iisreset tricks several times. i will try a precompiled
t> site, but my problems are with a website (call it "d") and a web
t> application project (call it "f30"), and alas both give the same
t> error with the simplest script imaginable, even after I rebuild them.
t> t>
 
M

Michael Nemtsev [MVP]

Hello tbh,

Turn off the antivirus apps, if u have any
Install all system updates and service packs.

If this doesn't help then it seems your system is corrupted and u can hardly
do smth

I wonder if this behavoir applies to all web project or only specific

Did u try to create different .NET version web project - 2.0 and 3.5 to check
the behaviour

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


t> thanks, Michael,
t>
t> i ran aspnet_regiis twice because the first time reported errors (i
t> find no signs of errors in the log file). the second run also
t> reported errors, but I found no signs in the log. see below.
t>
t> not exactly sure what you mean with your second point, but i verified
t> that my /d Virtual Directory is in the correct pool and its Asp.Net
t> settings show the correct 2.0 version. is there more to it than that?
t>
t> cheers,
t>
t> Tim
t>
t> C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>.\aspnet_regiis.exe -i
t> Start installing ASP.NET (2.0.50727).
t> .....................................................
t> Finished installing ASP.NET (2.0.50727).
t> Setup has detected some errors during the operation. For details,
t> please
t> read the setup log file C:\WINDOWS\TEMP\ASPNETSetup_00003.log
t> t>
Hello tbh,

Try to re-registed ASP.NET 2.0 with aspnetregiis -i
and make sure that VirtualFolder in IIS have asp.net 2.0 dll to
handle all
requests
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we
miss it, but that it is too low and we reach it" (c) Michelangelo
t> thanks, Michael,
t> t> yes, i don't need to often, but I definitely tried the "clear
temp
t> folder" and iisreset tricks several times. i will try a
precompiled
t> site, but my problems are with a website (call it "d") and a web
t> application project (call it "f30"), and alas both give the same
t> error with the simplest script imaginable, even after I rebuild
them.
t> t>
Hello tbh,

did u try to clear the temporary folder and restart iis?

btw, is it already precompiled site which u are trying to run, on u
have resources and able to rebuld all project?
 
T

tbh

thanks, Michael,

i'll consult with a guy here re permissions and antivirus apps. i don't have
..Net 3 going yet.

you're right: i should try adding a new web project and see if it is
affected.

NB: this machine has been running well for a couple years, but it is getting
long in the tooth and i have already begun exploring how to move on so I can
reinstall this one from scratch.

ended up solving my "profiling" problem without a profiler (this week at
least :), so in retrospect i might have saved myself the trouble by not
trying out the CLR profiler, however cool it sounds. (since it appears to be
vintage 2004 it's not so surprising it might break some newer things. *and*
they warned me...! :)

thanks again for your thoughts.

cheers,

Tim

Michael Nemtsev said:
Hello tbh,

Turn off the antivirus apps, if u have any
Install all system updates and service packs.

If this doesn't help then it seems your system is corrupted and u can
hardly do smth

I wonder if this behavoir applies to all web project or only specific

Did u try to create different .NET version web project - 2.0 and 3.5 to
check the behaviour
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

t> thanks, Michael,
t> t> i ran aspnet_regiis twice because the first time reported errors (i
t> find no signs of errors in the log file). the second run also
t> reported errors, but I found no signs in the log. see below.
t> t> not exactly sure what you mean with your second point, but i
verified
t> that my /d Virtual Directory is in the correct pool and its Asp.Net
t> settings show the correct 2.0 version. is there more to it than that?
t> t> cheers,
t> t> Tim
t> t> C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>.\aspnet_regiis.exe -i
t> Start installing ASP.NET (2.0.50727).
t> .....................................................
t> Finished installing ASP.NET (2.0.50727).
t> Setup has detected some errors during the operation. For details,
t> please
t> read the setup log file C:\WINDOWS\TEMP\ASPNETSetup_00003.log
t> t>
Hello tbh,

Try to re-registed ASP.NET 2.0 with aspnetregiis -i
and make sure that VirtualFolder in IIS have asp.net 2.0 dll to
handle all
requests
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we
miss it, but that it is too low and we reach it" (c) Michelangelo
t> thanks, Michael,
t> t> yes, i don't need to often, but I definitely tried the "clear
temp
t> folder" and iisreset tricks several times. i will try a
precompiled
t> site, but my problems are with a website (call it "d") and a web
t> application project (call it "f30"), and alas both give the same
t> error with the simplest script imaginable, even after I rebuild
them.
t> t>
Hello tbh,

did u try to clear the temporary folder and restart iis?

btw, is it already precompiled site which u are trying to run, on u
have resources and able to rebuld all project?
 
Joined
Jun 20, 2009
Messages
1
Reaction score
0
Brute force fix

I encountered the same problem today with a staging server that's been in production for about 3 years, running 18 websites which all stopped working today after running the CLR profiler on one website.

None of the fixes suggested above, which mirror the suggestions in the Microsoft KB, seemed to work for me either.

I had run the profiler previously on this server about 2 years ago when it was a ASP.NET 1.1 server, but had never run it since we upgraded to ASP.NET 2.0.

The fix was to:
1. uninstall ASP.NET 2.0
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -u

2. uninstall ASP.NET 1.1
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322>aspnet_regiis.exe -u

3. Uninstall IIS, ASP.NET and Application Server Console

Start > Control Panel > Add & Remove Programs
select Add/Remove Windows Components
select Application Server and then click Details
uncheck Application Server Console, ASP.NET and IIS
click OK
click Next to remove the components
click Finish to get out of the Windows Components Wizard
restart the server

4. Re-install IIS, ASP.NET and Application Server Console
5. Re-install ASP.NET for 1.1 and 2.0 using the same commands as step
1 and 2 above, but using aspnet_regiis -i instead

This blows away all your existing website configurations, so you'll need to do some cleanup:

6. Restart the ASP.NET State Server Service
7. Go back to each web application in IIS and recreate the folder as
an application in the IIS management console
8. Re-apply your default documents, directory security etc.
9. Re-apply your web garden configurations in the application pool properties panel
10. In Windows Explorer, re-apply security permissions for NETWORK_SERVICE to folders in c:\inetpub\wwwroot

Et voila... my server works (hopefully yours does too now). Whatever gets corrupted by running the CLR Profiler against an ASP.NET server is happening deep in the bowels of IIS.

Hope this helps someone to not have to spend their Saturday on Remote Desktop like I just did.
 
Last edited:

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,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top