Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2008, 07:00 AM
Authorized User
 
Join Date: Jun 2008
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default why cannot remove aspx.vb files in root?

Hi, i got problem with compilation. after i build the asp.net web project and got dll files. why i cannot remove the code behind files aspx.vb. after i remove then run the project, it got error state missing that files. So my question is, how to compile the project into dll without needing the code behind files aspx.vb to run the project.

 
Old June 24th, 2008, 07:57 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you post one of the .ASPX file page directives? (The line that starts like "<% @ Page ...". It is likely that even though your site is compiled, your pages are referencing the codebehind files using the "CodeFile" attribute. This dictates that the ASP.NET runtime should also compiled the file specified as part of the dynamic compile process. Also, please tell us how you created the site, what kind of project is it (Web Site Project or Web Application Project)?

-Peter
compiledthoughts.com
 
Old June 24th, 2008, 08:27 AM
Authorized User
 
Join Date: Jun 2008
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication2._Default" %>

If what you said it true(compiled the file specified as part of the dynamic compile process), then the project must refer to the code behind files every time the project run. My project is web application project. So how to make it so that the project do not have to refer the code behind files but refer to .dll when run the project and can also remove/delete the code behind in root?

 
Old June 24th, 2008, 02:32 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

That page directive indicates that you shouldn't need the code behind files. "CodeBehind" is an attribute used by visual studio, not the ASP.NET runtime.

Can you post the exact, complete error you are getting?

-Peter
compiledthoughts.com
 
Old June 25th, 2008, 06:19 AM
Authorized User
 
Join Date: Jun 2008
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Error 1 Unable to open module file 'C:\Documents and Settings\...\My Documents\Visual Studio 2008\Projects\WebApplication2\WebApplication2\Defa ult.aspx.vb': System Error &H80070002& C:\Documents and Settings\...\My Documents\Visual Studio 2008\Projects\WebApplication2\WebApplication2\Defa ult.aspx.vb 1 1 WebApplication2


 
Old June 25th, 2008, 08:23 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Not sure what to tell you. The page directive indicates that you shouldn't need the file, but obviously something is trying to load it.

-Peter
compiledthoughts.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
including files above site root rinventive PHP How-To 2 August 29th, 2008 03:11 PM
MSSQL-Cannot remove old files sallyckfhk SQL Server 2000 0 April 28th, 2006 11:43 PM
Get IIS root directory from VB.NET weichunglow VB.NET 2002/2003 Basics 2 June 16th, 2004 10:11 PM
Get IIS root directory from VB.NET weichunglow Pro VB.NET 2002/2003 0 June 16th, 2004 09:39 AM
acessing files outside document root wakhan Apache Tomcat 0 June 2nd, 2004 12:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.