Versoin 1.0 or not

R

Roy Chastain

I created a web page or two with VS .net 2003 on an XP box. I used a 2003 server as the location of the web site. Both the boxes had
version 1.1 of .net only installed.

I installed 1.0 of the .net framework on both boxes. The 2003 server will not serve any aspx pages at this time.

I installed IIS on the XP box after installing 1.0 framework. I can run .aspx files on the XP box. If I do a copy project on the XP box to
the XP web site, VS tells me that V1.1 is not installed and that I will not be able to run web applications.

Question
1) - Can you run .aspx pages with code behind .CS pages with V1.0?
2) - If you can use V1.0, how do you tell VS 2003 that you want to develop/compile against 1.0?

Thanks
 
V

Victor Garcia Aprea [MVP]

Hi Roy,

1) Sure you can.
2) Both versions, 1.0 & 1.1, include an utiltity named aspnet_regiis.exe.
Take a look at the it and keep in mind that they're different apps, one for
1.0 and the other one for 1.1. You should use the only corresponding to the
version of the framework you want to set a website to.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

Roy Chastain said:
I created a web page or two with VS .net 2003 on an XP box. I used a 2003
server as the location of the web site. Both the boxes had
version 1.1 of .net only installed.

I installed 1.0 of the .net framework on both boxes. The 2003 server will
not serve any aspx pages at this time.
I installed IIS on the XP box after installing 1.0 framework. I can run
..aspx files on the XP box. If I do a copy project on the XP box to
the XP web site, VS tells me that V1.1 is not installed and that I will
not be able to run web applications.
 
H

Hayato Iriumi

You can't compile your application against .NET Framework 1.0, but you can
tell your application to run against .NET Framework 1.0 by using config
file.

Here it is...

<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v1.0.3705"/>
<requiredRuntime version="v1.0.3705"/>
</startup>
</configuration>

However, I wouldn't really recommend this because you're really limiting
yourself to version 1.0 even if 1.1 is available. I would rather do this.

<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
<requiredRuntime version="v1.0.3705"/>
</startup>
</configuration>

Another thing... If you install IIS after you install .NET Framework, that's
a problem right there. Run the following command from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

aspnet_regiis -i

It will install 1.1 version of ASP .NET and update scriptmaps for you.

Hope it helps.


Roy Chastain said:
I created a web page or two with VS .net 2003 on an XP box. I used a 2003
server as the location of the web site. Both the boxes had
version 1.1 of .net only installed.

I installed 1.0 of the .net framework on both boxes. The 2003 server will
not serve any aspx pages at this time.
I installed IIS on the XP box after installing 1.0 framework. I can run
..aspx files on the XP box. If I do a copy project on the XP box to
the XP web site, VS tells me that V1.1 is not installed and that I will
not be able to run web applications.
 
R

Roy Chastain

Thank you very much.

Below is my web.config file
<!-- Web.Config Configuration File -->
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
<requiredRuntime version="v1.0.3705"/>
</startup>
<appSettings>
<add key="subject_welcome" value="Henry's Crawfish Club - Welcome" />
<add key="subject_remove" value="Henry's Crawfish Club - Remove" />
<add key="subject_password" value="Henry's Crawfish Club - Password" />
</appSettings>
<system.web>
<customErrors mode="Off" />
</system.web>
</configuration>

I know that it is being read because if I put something bad in it like <?xml version="1.0"?>, I get an error.

When I try to run my web page, the first time after modifying web.config gets the error below. If I run it a second time, it complains that
a object is not setup, and that object would have been setup in my global.asax. I am TRYING to host this on Earthlink hosting service.
They claim they have Windows 2000 server with version 1.0 of the framework installed. I have even go so far as to sign the assembly being
created from the code behind code.

I have the page working on my own 2003 server with both version 1.0 and 1.1 framework installed.


Error loading XML file c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed. (c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationException: Error loading XML file
c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed. (c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:


[ConfigurationException: Error loading XML file c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config Request for the permission
of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed. (c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config)]
System.Configuration.ConfigurationRecord.OpenXmlTextReader(String configFileName) +425
System.Configuration.ConfigurationRecord.Load(String filename) +205
System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfigurationSystem.Init() +164
System.Configuration.ConfigurationSettings.SetConfigurationSystem(IConfigurationSystem configSystem) +117
System.Configuration.ConfigurationSettings.GetConfig(String sectionName) +114
System.Configuration.ConfigurationSettings.get_AppSettings() +16
CrawfishClub.Global.Application_Start(Object sender, EventArgs e) in c:\documents and
settings\roy\vswebcache\henry.sohotech.biz\crawfishclub\global.asax.cs:78
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top