Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 27th, 2004, 01:16 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default Uploading and Running vs.net on remote server

Hi,

I had problem in running vs.net on remote server.
it says the error was with the inheritance,
<%@ Page Language="vb"
AutoEventWireup="false" Codebehind="src=Webform1.aspx.vb"
Inherits="something.Webform1" %>
I added the file directly under c:/inetpub/wwwroot/something/ which is located on remote server.
It seems that the file is not loaded into something's remote directory(localhost/something/) - (however it will be stored into the remote directory's automatically if i use 'add existing feature')

Please help

Reply With Quote
  #2 (permalink)  
Old May 27th, 2004, 07:32 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This question is a little confusing but I think I know what the problem is.

You are trying to upload an ASP.NET page: Webform1.aspx
This page needs to inherit from the class "something.Webform1".
This class will live in your compiled DLL. If c:/inetpub/wwwroot/something/ is NOT configured as an application, then the class "something.Webform1" is assumed to live in an assembly that is located in c:/inetpub/wwwroot/bin. You can put the assembly in c:/inetpub/wwwroot/something/bin but it will not be found by the ASP.NET runtime unless c:/inetpub/wwwroot/something is an application.

When you create the directory for "something", you need to go into IIS and make that directory an application. To do this:
- Start IIS manager
- Navigate to the subdirectory "something" under the default web site
- Right-click, and choose properties
- On the directory tab, look for "Application Settings"
- Under that, you should find a "Create" button.
- Click "Create" button. This creates an application on that subdirectory.

Now when the aspx page is run, the .NET runtime will look for assemblies under something/bin.

Peter
-------------------------
Work smarter, not harder
Reply With Quote
  #3 (permalink)  
Old May 27th, 2004, 10:33 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,

Thank you for the reply. I am sorry if I didn't say it clearly, the problem is I tried to create a webform that inherits Assg2, however instead of add it using 'add existing item.. ' tool (inside vs.net solution explorer), I copied it directly into c:/inetpub/wwwroot/Assg2 then I tried to access the page from internet explorer. But when I tried to get the page from internet explorer, the below error message occured.


Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'Assg2.WebForm1'.

Source Error:


Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="Assg2.WebForm1"%>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <HTML>

Do you know why?

Thanks

Reply With Quote
  #4 (permalink)  
Old May 27th, 2004, 10:40 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The server is telling you "Parser Error Message: Could not load type 'Assg2.WebForm1'."

This is because you are adding a page but that page's base class doesn't exist in the assembly of you application. You can't just add a page unless it's either completely self contained (relies on no assembly based classes) or it uses classes that already exist in assemblies that are in the application's /bin folder.

It sounds as though you are not entirely clear on how the asp.net runtime functions with compiled code-behind.
Reply With Quote
  #5 (permalink)  
Old May 27th, 2004, 10:46 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a way to overcome the problem? How to put the base class into the assembly?

Reply With Quote
  #6 (permalink)  
Old May 27th, 2004, 10:49 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I don't see this as a "problem", it's the way things work. You need to compile the base class into an assembly. How you do that is up to you.
Reply With Quote
  #7 (permalink)  
Old May 27th, 2004, 10:54 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh.. what if I don't have access to compile the base class?
For example I was given an ftp path by my web server to upload my class but he didn't say I have access to do compilation on his server, my class will just be simply uploaded to its server directory "c:/inetpub/www/Assg2".

Reply With Quote
  #8 (permalink)  
Old May 27th, 2004, 11:21 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You shouldn't be compiling on the server. Compile locally, and upload the ASPX and the .DLL files.
Reply With Quote
  #9 (permalink)  
Old May 28th, 2004, 02:47 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cool i copied all files which are in localhost to the server and finally the page can be displayed however the button is not working. for example i cannot do
buttonclick{byval sender as object, ....)
textbox1.text = "text"}

Why is that?

Reply With Quote
  #10 (permalink)  
Old May 28th, 2004, 08:46 AM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

would you post your code
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading Text File to FTP server in vb.net KiruShan .NET Framework 2.0 4 July 29th, 2014 02:02 AM
server error when uploading to remote server ammweb ASP.NET 1.0 and 1.1 Basics 7 July 30th, 2006 01:51 AM
Run CrystalReport.NET app in a remote server hpallavi Crystal Reports 0 February 24th, 2006 05:11 PM
server is not running ASP.NET version 1.1 akthar General .NET 1 August 23rd, 2004 06:23 AM
Uploading files on the remote server shahchi1 VS.NET 2002/2003 2 May 20th, 2004 02:46 PM



All times are GMT -4. The time now is 07:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.