Groups > Asp .Net > ASP.NET Installation and setup > Re: CodeFile issues with migrating from developer unit to server




CodeFile issues with migrating from developer unit to server

CodeFile issues with migrating from developer unit to server
Wed, 2 Apr 2008 08:04:09 +0000
I have the code working perfectly fine on my vista unit, but when I went ahead
to setup my server it started to get a bit screwy.  I managed to setup
everything correctly, except I'm having one big issue.

My pages are declared:
<% @ Page Language="VB" MasterPageFile="~/main.master"
AutoEventWireup="false" Theme="classic"
CodeFile="index.aspx.vb" Inherits="vbBase"
EnableSessionState="true" EnableViewState="False" %>

and my Code File:
Option Explicit On
Option Strict On

Imports System.Data
Imports System.Data.Odbc
imports System.IO

Partial Class vbBase

 Inherits System.Web.UI.Page

 

This is my problem.  The above code works fine on my notebook, but once I go to
place it on the server I get an odd error:

"ASPNET: Make sure that the class defined in this code file matches the
"inherits" attribute, and that it extends the correct base class (e.g.
Page or UserControl)"

I know the inherits matches because it was working fine before on my notebook,
and I have the inherits System.Web.UI.Page class setup in the code file, yet it
keeps giving me an issue.  I tried using CodeBehind instead of CodeFile, which
can get past that issue, but it becomes really screwy and the parse error gives
me an error from a completely different file!  There is no link to this file
what-so-ever, but it is giving me an error from the code.

And the file it comes form is suggest.aspx.vb, which shouldn't be set as a
default anywhere.  Anyone have any clue how to fix this pesky issue?  I don't
feel like redoing all my scripts to resolve something I know has to be minor. 
I'm thinking it might be an ISS issue. 

On my developing unit and server I'm using 2.0 framework, but my developer unit
uses ISS 6 while the server is running ISS 5, I don't think that makes a big
difference though.
Post Reply
Re: CodeFile issues with migrating from developer unit to server
Wed, 2 Apr 2008 10:59:13 +0000
Does the server have .net 2.0 installed and is the site setup as an ASP.NET 2.0
website?

To check goto: IIS --> R-click Website/Virtual directory --> Properties
--> ASP.NET tab

 You could try running
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i"
to ensure that the correct version of ASP.NET is installed and correctly
configured.
Post Reply
Re: CodeFile issues with migrating from developer unit to server
Wed, 2 Apr 2008 19:09:24 +0000
Yes, I've already checked that and it was setup as version 2.0

 I also tried 3.5, but the ASP.NET config only shows 2.0 in the list.
Post Reply
Re: CodeFile issues with migrating from developer unit to server
Wed, 2 Apr 2008 22:55:54 +0000
As I understand it, when you select the ASP.NET version, you're actually
selecting the CLR version and not the Framework version, Framework v1.1 runs on
CLR v1.1, Framework v2.0 runs on CLR v2.0 but framework 3.0 and 3.5 also both
run on CLR v2.0, so even for Framework v3.5 websites you should be selecting
asp.net v2.0 from the ASP.NET tab.

 

Sorry I wasn't of very much help.
Post Reply
about | contact