|
-
Mar 24th, 2007, 05:59 PM
#1
Thread Starter
Hyperactive Member
[2005] ASP.Net beginner question?
Hi,
I'm using the VS 2005 to create some simple ASP.NET webpage and it run perfectly on local machine, but after I upload the file to my hosting provider, the page is getting application error.
I talked to the host provider, they say they only support .NET framework 1.1 not 2.0 yet. Does it make a different? even a very simple webpage?
Or what I have to set up to run on the remote web server?
I see some folder called APP_Data and file like web.config , what is that for?
Thanks!
-
Mar 24th, 2007, 07:18 PM
#2
Re: [2005] ASP.Net beginner question?
About Web.Config:
 Originally Posted by aspdev.org
The ASP.NET Web.config file is used to define the configuration settings for an ASP.NET application. ASP.NET and the .NET Framework use .config files to define all configuration options. The .config files, including the ASP.NET Web.config file, are XML files.
Server-wide configuration settings for the .NET Framework are defined in a file called Machine.config. The settings in the Machine.config file can be changed and those settings affect all .NET applications on the server.
Different ASP.NET applications might need different application settings, that’s why defining those settings in the Machine.config file, is usually not practical. The solution for this problem is the ASP.NET Web.config file.
The ASP.NET application configuration settings can be changed by creating a file called Web.config and saving it in the root folder of the application. But what if the Machine.config file defines different settings than the ones defined in your Web.config file? The good news is that the settings in the Web.config file override the settings in the Machine.config file.
This is how the minimal Web.config file should look like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
</system.web>
</configuration>
The first line of the Web.config file is the same as the first line for any .config file and specifies that this is an XML document with utf-8 character encoding type.
There are 2 important characteristics of the Web.config file. The first one is that if you change your Web.config file, you don’t need to re-compile your ASP.NET application.
The second one is that the Web.config file cannot be viewed in directly in a browser.
App_Data folder:
Unlike ASP.Net 1.0 or 1.1, 2.0 uses dynamic compilation to compile web pages. This is possible (to some extent) because of the inherent folder structure that it provides. These folders that ASP.Net gives by default have special meaning and purposes. Anytime that you add/subtract to these folders, you may not need to compile your project again. Also, accessing files from these folders is relatively easy as compared to using relative paths of folders that you use in 1.1.
App_Data folder is a special folder created by ASP.Net (2.0 only) where you can store your files like data files like .mdf, text files, xml files etc.
Other folders available are:
- App_Code - Contains classes, WSDL (for web sevices), datasets etc.
- App_Themes - Contains themes that we create. Themes are new additions to .Net 2.0.
- App_GlobalResources - contains .resx files not bound to a specific page.
- App_LocalResources - contains .resx files bound to a specific page.
- App_WebReferences
- App_Browsers - Holds browser files, which are XML files used to describe characteristics and capabilities of these browsers.
- Bin - It contains compiled assemblies (.DLL files) for controls, components, or other code that we want to reference in our application.
-
Mar 25th, 2007, 06:56 AM
#3
Re: [2005] ASP.Net beginner question?
 Originally Posted by mapperkids
Hi,
I'm using the VS 2005 to create some simple ASP.NET webpage and it run perfectly on local machine, but after I upload the file to my hosting provider, the page is getting application error.
I talked to the host provider, they say they only support .NET framework 1.1 not 2.0 yet. Does it make a different? even a very simple webpage?
Or what I have to set up to run on the remote web server?
I see some folder called APP_Data and file like web.config , what is that for?
Thanks!
Of course it makes a difference. If they could run on the same platform, it'd be called ASP.NET 1.1 Beta instead of ASP.NET 2.0.
-
Mar 25th, 2007, 09:17 AM
#4
Thread Starter
Hyperactive Member
Re: [2005] ASP.Net beginner question?
 Originally Posted by mendhak
Of course it makes a difference. If they could run on the same platform, it'd be called ASP.NET 1.1 Beta instead of ASP.NET 2.0.
Thanks for the reply, so what I'm missing that make the application not running on the web hosting server? the page that I'm trying to display just few text box and connect to the SQL server ( on my web hosting provider)ang get some data back to the datagrid. It running perfectly on my local pc.
Thanks!
-
Mar 25th, 2007, 09:32 AM
#5
Re: [2005] ASP.Net beginner question?
 Originally Posted by mapperkids
Thanks for the reply, so what I'm missing that make the application not running on the web hosting server? the page that I'm trying to display just few text box and connect to the SQL server ( on my web hosting provider)ang get some data back to the datagrid. It running perfectly on my local pc.
Thanks!
You are missing nothing. You need a different host that supports ASP.Net 2.0 and not only 1.1.
It doesn't matter what kind of project or page you are working on. If you have read my previous post, it would have become clearer to you that 2.0 uses dynamic compilation which wasn't the feature of 1.1. And so you cannot deploy 2.0 projects onto web servers with .Net 1.1.
-
Mar 25th, 2007, 11:08 AM
#6
Thread Starter
Hyperactive Member
Re: [2005] ASP.Net beginner question?
 Originally Posted by Harsh Gupta
You are missing nothing. You need a different host that supports ASP.Net 2.0 and not only 1.1.
It doesn't matter what kind of project or page you are working on. If you have read my previous post, it would have become clearer to you that 2.0 uses dynamic compilation which wasn't the feature of 1.1. And so you cannot deploy 2.0 projects onto web servers with .Net 1.1.
Hi,
Does it means, I only have two options, 1. find another host that support .NET 2.0 or 2. downgrade the VS 2005 to VS2003 then I can develop the page for .NET 1.1? can I use VS 2005 to develop the app/page that run on .NET v1.1 server?
Thanks!
-
Mar 25th, 2007, 02:36 PM
#7
Addicted Member
Re: [2005] ASP.Net beginner question?
Yes you are right, you only have 2 options:
1) Use VS2003 and use the .net framework 1.1
2) Find a host that uses the .net framework 2.
You can not use VS2005 to make .net 1.1 applications.
F
-
Mar 25th, 2007, 02:57 PM
#8
Thread Starter
Hyperactive Member
Re: [2005] ASP.Net beginner question?
 Originally Posted by Ferris
Yes you are right, you only have 2 options:
1) Use VS2003 and use the .net framework 1.1
2) Find a host that uses the .net framework 2.
You can not use VS2005 to make .net 1.1 applications.
F
Can I install VS2003 on the same machine that already have VS2005 installed?
Thanks!
-
Mar 25th, 2007, 04:06 PM
#9
Addicted Member
Re: [2005] ASP.Net beginner question?
I've never tried it but I don't see any reason why not.
framework 2 sits happily alongside framework 1.1
But you may want to research that further.
F
-
Mar 26th, 2007, 09:16 AM
#10
Re: [2005] ASP.Net beginner question?
 Originally Posted by mapperkids
Can I install VS2003 on the same machine that already have VS2005 installed?
Thanks!
Yes you can.
-
Mar 26th, 2007, 04:37 PM
#11
Hyperactive Member
Re: [2005] ASP.Net beginner question?
easycgi supports both .NET 1.1 and .NET 2.0
very cheap host too
-
Mar 27th, 2007, 08:26 AM
#12
Re: [2005] ASP.Net beginner question?
You can even have VS 2002, 2003 and 2005 on the same machine. They use different frameworks so they don't really interfere with each other.
And since your application is quite simple, it shouldn't be very difficult for you to migrate the code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|