Visual Studio 2008 Publishing simple ajax site to ASP2.0 shared host

D

DanWeaver

I am attempting to publish the following basic test site to a
Fasthosts asp2.0 + ajax enabled shared host. Using the publish
procedure in Visual Studio 2008 with an asp non 'ajaxified' site works
OK but this throws an error (Server Error in '/' Application.)
I had a brief email exchange on another subject with the guys at
fasthosts who thought an application developed using .net framework
3.5 should still function OK and would rather not change hosts but I
do need to use an update panel on my site.
I am a relative newbee to some of this- perhaps I am missing something
basic like the need to upload a folder with ajax functionality within
it?
When I change the compliation options in visual studio from .net 3.5
to 2.0 the site fails even on my local machine...is this a wild goose?
Here is the code which throws an error...

<head runat="server">
<title>Blah</title>
</head>
<body>
<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<div>

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:Label ID="Label1" runat="server" Text="Label"></
asp:Label>
</ContentTemplate>
</asp:UpdatePanel>

</div>

</form>
</body>
</html>
 
C

Cowboy \(Gregory A. Beamer\)

DanWeaver said:
I am attempting to publish the following basic test site to a
Fasthosts asp2.0 + ajax enabled shared host. Using the publish
procedure in Visual Studio 2008 with an asp non 'ajaxified' site works
OK but this throws an error (Server Error in '/' Application.)

Most likely there are some bits missing on the server. You need to delve
deeper into the error and discover what it is.
I had a brief email exchange on another subject with the guys at
fasthosts who thought an application developed using .net framework
3.5 should still function OK and would rather not change hosts but I
do need to use an update panel on my site.
I am a relative newbee to some of this- perhaps I am missing something
basic like the need to upload a folder with ajax functionality within
it?

If you are using the .NET publish feature, this should be done for you. Make
sure your host has 3.5 framework installed.
When I change the compliation options in visual studio from .net 3.5
to 2.0 the site fails even on my local machine...is this a wild goose?

You can do this, but you will have to do two things:

1. Download the old AJAX extensions (1.0) from
http://www.asp.net/ajax/downloads/
2. Change the config file to reflect the change. You need to change the
version numbers:

Find anything with versino 3.5.0.0 here
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere" />
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>

and here:
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
</assemblies>

and change out.
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" requirePermission="false"
allowDefinition="Everywhere" />
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" requirePermission="false"
allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>

And
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>

Once you are done with this, you should be fine running on 2.0.
 
D

DanWeaver

Thanks Greg,

I tried as you suggested and (as visual studio told me it couldnt find
Version=1.0.61025.0) I started a new project from scratch compiling
as .net2.0. It has a reference to 1.0.61025.0 and compiles OK and
uploads to my site fine... until I add a script manager (using the
ajax extensions already in the toolbox (and which do not dissappear
upon changing the Target Framework to .net2.0)) upon which my web
browser hangs when I try to view the page...
Any suggestions?
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top