Publish Web Site missing assembly

E

ewolfman

Hi,

I've read many posts in several news groups, but can't figure out how
to publish my website. The specific error I'm getting (on the
"successfully published website") is "Could not load the assembly
'App_Web_vxfyglsm'. Make sure that it is compiled before accessing the
page".

I checked - The assembly DOES exist in the target web folder.

I've also tried to "Copy Web Site", but then for some reason my
_Default page is not recognized.

What's wrong ?
 
D

Daniel Fisher\(lennybacon\)

'App_Web_vxfyglsm' sounds like a temp assembly delete it from the server and
let the aspnet woprker process recompile your app (*.cs/*.vb files must be
uploaded)

_Default page is not recognized = IIS issue (default docs)
 
E

ewolfman

Hi Daniel - thanks for replying.

As I understand it, when publishing using the "Allow this precompiled
site to be updatable" option, the aspx/ascx are kept, and the code
behind files are complied into an assembly (which is the temp assembly
mentioned, of course). So it should have been just fine. Moreover,
uploading the code behind files isn't enough, because the aspx page
attempts to find the assembly:

<%@ page language="C#" autoeventwireup="true" inherits="_Default,
App_Web_fvcjq78i" %>

So the aspx will always fail, because it assumes it has the assembly
specified in the "inherits" attribute. If I perform the "obvious"
action, removing the temp assembly's specification from the line above,
I receive the "Could not load type '_Default'" message. I don't think
it has anything to do with the IIS default docs.
 
E

ewolfman

I also thought this might be a probing problem. I tried different
settings such as specifying a <runtime> and an <assemblies> element,
but still couldn't get it to work.

Displaying the AppDomain.CurrentDomain.RelativeSearchPath displayed the
default "bin", which is supposed to be just fine.
 
J

Juan T. Llibre

Hi, ewolfman.

Your question intrigued me, so I created a new app
with just 2 files and a global.asax and web.config.

I then published the website to a physical directory,
and created a virtual directory in IIS.

I copied the files in the physical directory to the physical dir
to which the virtual dir points to...and everything runs OK.

The original default.aspx directive reads :

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" inherits="_Default" %>

I checked the default.aspx directive after publishing the site, and it reads :
<%@ page language="C#" autoeventwireup="true" inherits="_Default, App_Web_he6czt8r" %>
just like yours does ( with different names, of course ).

default.aspx.cs has this in it :
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "Prueba";
}
}

The following files are included in the ./bin directory by "Publish web site" :

App_global.asax.compiled
App_global.asax.dll
App_Web_he6czt8r.dll

The following files are included in the website1 dir :

Default.aspx ( modified by the "Publish web site" add-in )
PrecompiledApp.config ( created by the "Publish web site" add-in )
version.aspx ( A non-codebehind page for test purposes; it's copied intact )
Web.config ( copied intact by the "Publish web site" add-in )

Check it out, working, at http://asp.net.do/website1/

You don't need to upload the codebehind files.
The precompiler will compile those into the ragged-name assembly.

Did you first delete all the files at your IIS website, and then copy
all the files which the precompiler creates, to your IIS website ?

If you have too many files, it's just as bad as not having enough.

Also, check that your default.aspx.cs codebehind page has
public partial class _Default : System.Web.UI.Page in it.
 
E

ewolfman

Problem solved!!

I have both ASP.NET 1.x and 2.x installed on my machine. The default
ASP.NET settings in IIS was set to 1.x instead of 2.x....

Setting the ASP.NET to 2.x solved this problem....

Thanks everyone.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top