Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 April 7th, 2004, 08:42 PM
Authorized User
 
Join Date: Apr 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mohammed
Default a boring error occured when i built any aspnet app


it will prompt a error when i build any asp.net WebApp in VS.net 2003.
:
Parser Error Message: Could not load type
Source Error:
line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="ImgResize.Global" %>
Source File: D:\www\ImgResize\global.asax line: 1

i know asp.net App need a virtual directory , so i check the virtual directory settings in iis manager, and find it is a virtual directory.

and i open my global.asax.vb file
the partial code is listed below:

Imports System.Web
Imports System.Web.SessionState

Public Class Global
    Inherits System.Web.HttpApplication

Is there anyone who could help me out from it?
thx anyway~!


__________________
-------------------------
<font color=\"red\">No Pains,No Gains.</font id=\"red\">
 
Old April 8th, 2004, 09:00 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What do you mean by "when I build..."? I've never seen a parser error when you build the application. Building entails compiling the source code of the project. The ASPX/ASAX/ASCX/ASMX files are not technically part of the source. Then don't get processed until they are actually requested by the browser. How are you building the application? It almost sounds like you are NOT building the application, but are trying to request a page. The global will get processed the first time, but without having compiled the source, the global.asax can not inherit from the class specified by its "inherits" attribute because that class does not exist yet.

Peter
-------------------------
Work smarter, not harder
 
Old April 8th, 2004, 07:46 PM
Authorized User
 
Join Date: Apr 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mohammed
Default

OK.I solve the problem.
It's a name conflict error~!

I search many forums in Internet for this boring question.and also find many solutions for it . but all not fit for me :(

at last i find the foolish error i made.I named the project ImgResize,so the default root namespace is ImgResize too.then I build a namespace named maImgResize and build a class named ImgResize in the namespace.so i write the statement:
inhrets:ImgResize.maImgResize.ImgResize

 then u find my stupid action...

thx for ur help. :)

 
Old June 8th, 2005, 05:07 PM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default

Hi there,

Thought it was better to resurrect an old post!

Got to the stage where I think I have completed my first project in Visual Studio.Net 2003. Works well on my pc. I uploaded everything to the server and get virually the same error as above but with my specifics for my application.

Did I need to do anything before uploading to the net? Compiling is mentioned a lot... I thought this was automatically done by VS.net. If not how do i go about it and also will I be able to add things on to it easily?

Thanks.

David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit http://www.1stmillion.co.uk
or call 01772 489521
 
Old June 9th, 2005, 06:57 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Yes, VS.NET will compile the application. However, unless the server is set up just right you may have problems. What are the details of where you are uploading this to? Am I right to assume it's some web host?

Depending on how the web host is set up you might be encountering a similar error as posted due to the fact that the location of your files is not a web server application directory.

-Peter
 
Old June 9th, 2005, 08:28 AM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default

Yeah I have a reseller package with dataflame.co.uk - i tried setting the httpdocs to a virtual directory called MYWEBSITE which is what it on my local machine. I put two files into the cgi-bin that were in a bin folder on my machine - was that correct or do i need to make a new folder in the httpdocs called bin?

David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit http://www.1stmillion.co.uk
or call 01772 489521
 
Old June 9th, 2005, 08:46 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

.NET assemblies must live in the \bin directory when they are local to the application. And the application directory must be set up as a web application in IIS.

-Peter
 
Old June 9th, 2005, 10:15 AM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default

cool i created the bin directory and placed the files into it. It works! I was just making a stupid jump at bin being cgi-bin for some reason!

thanks for the assist

David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit http://www.1stmillion.co.uk
or call 01772 489521
 
Old June 9th, 2005, 11:21 AM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default

mmm, hold that thought!!

front end loading fine ... backend is playing up. i changed the connectionString on every page to ConnectionSettings.AppSettings("ConnectionString") as it is in my web.config. but it keeps giving me the old database connection string in an error saying that it is incorrect. I did a find/ replace and cant find the old connection string anywhere now..... but it throws the error!

i thought vs net was meant to make this all easier1!

David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit http://www.1stmillion.co.uk
or call 01772 489521
 
Old June 9th, 2005, 05:29 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Hmm indeed. Not sure what the problem could be.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic Error occured in GDI+ labby C# 2005 0 September 22nd, 2006 04:37 AM
An unidentified error has occured p2ptolu MySQL 0 October 28th, 2005 07:40 AM
A unidentified error has occured. malachany Dreamweaver (all versions) 6 February 4th, 2005 10:31 AM





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