tags:

views:

694

answers:

6

I'm starting a new job and am inheriting a asp .net web application on the 2.0 .net framework. The application works alright. It published successfully from vs 2005. I created a new virtual directory in IIS and pointed to the precompiled directory just published.

When I load my application, I get an error that reads as follows:

XML Parsing Error: not well-formed Location: http://localhost/Subpoena/ Line Number 1, Column 2:<%@ page language="C#" autoeventwireup="true" inherits="Home, App_Web_ysxqzhr9" %> -^

I'm not real sure what to do to fix this. The App_Web_ysxqzhr9 is a dll in the bin directory that was created by VS 2005 when I published the project.

I admit I'm a bit rusty on my IIS skills so it might be some setting that I haven't set...or it could be something entirely different.

Anyone have any thoughts at all?

A: 

Is your IIS configured correctly? You should double check that the asp file is actually being interpreted as ASP and not just trying to be displayed as XML by the browser. In the configuration for the folder and make sure the button next to the Application Name field says Remove not Create.

Mykroft
A: 

Okay I checked those. It looked okay. However, I came across another thread that said they had this issue because asp .net 2.0 wasn't enabled. I enabled it and now I've got a new issue. It looks like an access issue but the application has read/write/directory browsing/script access permissions. The error in the event log reads:

Event Type: Error Event Source: ASP.NET 2.0.50727.0 Event Category: None Event ID: 1334 Date: 11/5/2008 Time: 10:14:29 AM User: N/A Computer: MSJAKMOL21738 Description: Failed to initialize the AppDomain:/LM/W3SVC/1/Root/Subpoena

Blockquote

Exception: System.IO.FileLoadException

Message: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.

StackTrace: at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

jason
A: 

You may also need to install Microsoft WSE extensions.

Something like this: http://www.microsoft.com/downloads/details.aspx?FamilyID=018a09fd-3a74-43c5-8ec1-8d789091255d&amp;displaylang=en

EDIT: System.Web is part of the WSE but I'm not sure how it all plays together.

Mykroft
System.Web is a normal part of .NET. It includes ASP.NET and ASMX web services. WSE should be avoided at all costs. -1, and I'd downvote multiple times if I could.
John Saunders
I wasn't suggesting he use WSE in general. It seems possible that the app he inherited may have used it and consequently might need to have it installed for his development.
Mykroft
A: 

Its odd. I get an error when I try installing that. It says it can't read from a file but doesn't give the full path. It says error 1316: A network error occurred while attempting to read from the file .../Microsoft WSE 3.0.msi

It was blocked at first. I unblocked it, applied, and tried re-executing but to no avail.

jason
A: 

Oh man...I've run around my machine like a crazed monkey ensuring that the ASPNET and IUSER_ accounts have permissions. I've added these permissions to the inetpub and wwwroot folders used by IIS; to the folder containing the actual pre-compiled code for this website; to the ...windows/Microsoft .net/ and all subfolders below it.

Nothing seems to have fixed this. I'm still getting the same errors in the event viewer. I've stopped and started iis several times. No luck with any of it.

I did run across a command prompt command to uninstall and then reinstall iis. I've lost the page, but that might be worth a try. Anyone know what I'm talking about or any other possible solution?

jason
A: 

sigh

Okay found the answer. Ironically it too was on stack overflow. Here it is:

http://stackoverflow.com/questions/233478/aspnet-20-application-on-iis-5-resulting-in-error-aspnetwpexe-pid-xxxx-stopped

What worked for me was Mitchel Sellers response:

  1. Open command prompt to C:\windows\microsoft.net\framework\v2.0.50727
  2. run the following command: aspnet_regiis.exe -u
  3. run the following command: aspnet_regiis.exe -i

Thanks anyway for all your help guys.

jason
you can actually have the same effect by runing aspnet_regiis.exe -iru i've had that same problem in the past but it looks like it manifested differently for me.
Mykroft