Running an asp.net application on a remote share (UNC) - parser er

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Server Error in '/<applicationName>' Application
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load type 'Default.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs"
Inherits="Default.Global" %>
Source File:
\\<machineName>\<shareName>$\<websiteDir>\<applicationName>\global.asax
Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573


I have seen this "parser" error message several times in the newsgroups, and
most people have recommended recompiling the application, which does not
solve the problem in this case. (and yes it does work if the content is local)

The closest thing to a correct post was "ASP.Net Bin folder on shared drive"
from 9.17.2004 at microsoft.public.dotnet.framework.aspnet, but they failed
to provide enough detail for me to configure the .net framework (I am a
novice at this).

To summarize the problem as I understand it: the parser error occurs because
the code is located on a remote machine, and it is not trusted.

And just to add to the confusion, is it possible that the parser error
occurs because the IUSR account is attempting to read the global.asax because
the Thread token, when an application resides on a UNC Share is the IIS UNC
Token, which in the case of pass through auth and a configured anonymous user
account would be the Anonymous user?

Thanks in advance!
 
Parser Error
Description: An error occurred during the parsing of a resource required
to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not load type 'Default.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs"
Inherits="Default.Global" %>

Whenever I have gotten this, it was because the VS.NET compiler succeeded,
but the JIT Compiler underneath IIS bombed. (?!?)

I have always been able to fix it with this:

1. Build Solution (not REbuild)
2. Open a DOS-Box and do an iisreset.exe (Better yet, add this to your
Tools -> External Tools in VS.NET)
3. Run your app.
And just to add to the confusion, is it possible that the parser error
occurs because the IUSR account is attempting to read the global.asax
because
the Thread token, when an application resides on a UNC Share is the IIS
UNC
Token, which in the case of pass through auth and a configured anonymous
user
account would be the Anonymous user?

The way to fix this is to open up another DOS-Box, navigate to your .NET
Framework folder (typically C:\WINDOWS\Microsoft.NET\Framework\<your version
number>) and run this:

aspnet_regiis.exe

That will rebind all of the IIS .NET mojo back to the ASPNET user account
and the ASP.NET ISAPI dll.

If IUSR_MACHINE-NAME is still trying to process asax or aspx files, check
the properties of your web application in the IIS MMC console.
--
Peace & happy computing,

Mike Labosh, MCSD

"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"
 
Thanks for the response mike, but unfortunately, I got errors from
aspnet_regiis -

Starting Copying file
Failure Copying file: CopyFilefailed with HRESULT80070005: 'Access is
denied. '
Failure Setting up client site scripts dirs:
SetupSiteClientScriptFilesfailed with HRESULT80070005: 'Access is denied. '

Which of course does not seem to make sense, I am a domain admin, and
assumably aspnet_regiis was executing in my security context.

* Are there any Microsoft docs on how to setup an asp.net application to run
over a UNC?

* Are there any error logs for the .net framework, or is the best error
information I'm going to get coming straight from hitting the web page?

and now for my comment that summarizes my frustration - if you can configure
an IIS site to use a UNC, and you can make that site an asp.net application
(but it doesn't work), why didn't Microsoft just say - UNC's are only to be
used for static content?!?!?

thanks for any responses in advance
 
Back
Top