473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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>\<applica tionName>\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!
Nov 19 '05 #1
2 2114
> 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"
Nov 19 '05 #2
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

"Mike Labosh" wrote:
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"

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: emmexx | last post by:
I want to restore a huge database into my workstation. The size of the backup file is more than 6 GB and I don't have enough space on my HD for both the database and the backup file. So I put the...
9
by: Doug at SAU | last post by:
I need to run a batch file on a remote machine from an ASP page. I dummied up a test ASP page as follows: <% Set WshShell = Server.CreateObject("Wscript.Shell") wshshell.run...
4
by: Ulf | last post by:
Hi all, I run into some problems when trying to copy a file to a remote machine. I first create with WMI a share on the remote machine (works fine), then impersonate with admin rights and try...
8
by: JR | last post by:
I have a Web server running on Windows XP. On this Web server, I have a Web site configured with its home directory on a network share. In the Web site, there's a virtual folder pointing to a local...
4
by: Brian | last post by:
Hello.. I can't create a web application using the web address of my test server, however I can get into it via FrontPage Extensions. I am fairly new at this so I hope I can provide enough info....
3
by: Nick | last post by:
Hello all, I've spent a lot of my time on this issue, and I thought it best to share my solution with the community. A special thanks to Willy Denoyette for his help. Ive opened about two...
1
by: Paul Buxton | last post by:
Hi, Platform is Windows 2003 SP1. I've been asked to set up a website where the website files are all sourced from a NAS box. However if I do this, and tell IIS that it is a remote share...
0
by: =?Utf-8?B?QW5vbnltb3Vz?= | last post by:
I just posted this in microsoft.public.inetserver.iis but thought this might be a better place for it. I have the following ASP page that simply executes a DIR command on a UNC path and displays...
25
by: p byers | last post by:
Good Morning Folks I have a LAN Among the several connections to it are the following four devices: A MAXSTOR network Storage Device A PC running Microsoft Windows 2000 Server 5.0.2195 (SP4) A...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.