473,657 Members | 2,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Server Error in '/<applicationNam e>' 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="Glo bal.asax.cs"
Inherits="Defau lt.Global" %>
Source File:
\\<machineName> \<shareName>$\< websiteDir>\<ap plicationName>\ global.asax
Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.573; ASP.NET
Version:1.1.432 2.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.publi c.dotnet.framew ork.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 2131
> 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="Glo bal.asax.cs"
Inherits="Defau lt.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\Micr osoft.NET\Frame work\<your version
number>) and run this:

aspnet_regiis.e xe

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:
SetupSiteClient ScriptFilesfail ed 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="Glo bal.asax.cs"
Inherits="Defau lt.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\Micr osoft.NET\Frame work\<your version
number>) and run this:

aspnet_regiis.e xe

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
8993
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 file in a shared folder on a pc connected through a switch to my pc. My wkst uses w2k pro sp4, the other PC win xp home SP1. MSDE 2000. The share is visible and RW for the administrator of my wkst. The 2 pc are in the same workgroup and are not...
9
8839
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 "c:\inetpub\wwwroot\logasp\getdr.bat > c:\tstlog.txt" %> the batch file is as follows:
4
3874
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 to copy the file using the File.Copy method. But the exception always returns a "(local)file not found" message. Could someone give me a hint where I make a mistake in the following code ? many thx in advance :)
8
2479
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 folder on the Web server containing an ASP.NET application. I get a "Failed to start monitoring changes" when I try to run the application. If I try to debug, I get a message "unable to start debugging on the Web server". I put an...
4
1029
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. The error I get is: The UNC share at (my location) does not exist or you do not have access.
3
2904
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 threads to try and get this solved and neither of them contain a full solution; but this one does! So the scenario is, I need to change the file permissions on a remote folder using WMI. I was attempting to do this using a UNC path, which
1
1130
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 for the home directory, I immediately get a Parser error.
0
2457
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 the results. When the UNC path is a Windows machine the output is as expected however when the UNC path is a Unix machine running Samba, nothing is returned. I've configured the Authentication Method for the IIS web site to use an account that has...
25
2993
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 PC running Microsoft Windows XP Professional 5.1.2600 (SP2) A PC running Microsoft Windows XP Professional 5.1.2600 (SP2) All of the PCs are running IIS
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7320
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.