Showing posts with label sp2. Show all posts
Showing posts with label sp2. Show all posts

Saturday, March 24, 2012

Deployment of AJAX-enabled web page on production server trouble

VS 2005 sp2, vb.net, sql 2005 enterprise sp2, IE7 & IE6, AJAX 1.0 toolkit and extensions.

The specific problem I am having is that I can't get the tabcontrol/tabpanels ("tab controls") to show up properly on the production server. I have a tabcontrol with 3 tabpanels. Inside each panel, I have a gridview and/or detailsview. When I load the page, I see the center gridlines (without the outer borders) of the gridview and detailsview and no tabs and no data. I also notice the "Done. Page loaded with errors" message on the bottom left status bar.

As with most of you, I have a dev machine and a production server. The tab controls show up just fine on the dev machine but when I move it to the production server, the same tab controls do not completely show up. The following is the watered-down version of what I am using:

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<cc1:TabContainer ID="Tabs" runat="server">
<cc1:TabPanel runat="server" ID="tab1" HeaderText="Tab1">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" meta:resourcekey="GridView1" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Column1" HeaderText="Column1" meta:resourcekey="BoundFieldResource1"></asp:BoundField>
<asp:BoundField DataField="Column2" HeaderText="Column2" meta:resourcekey="BoundFieldResource2"></asp:BoundField>
</Columns>
</asp:GridView>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel runat="server" ID="tab2" HeaderText="Tab2">
<ContentTemplate>
...
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>

I have installed the extensions on the production server (to fix another problem) and I have also confirmed that the dll's are in the bin folder. Any assistance as to why the tab controls not showing up is appreciated.

Thanks in advance to all. I am able to provide further information upon request.

anyone?

Just in case this may help someone else,

I found out the root of my problem was that I was using an AJAX enabled web-site instead of using the AJAX control toolkit template when I first made my website. I have mixed and matched some lines from my orginial "AJAX enabled" web-site and my new "toolkit template" web-site and found that the difference is only a few lines in the web.config file.

However, being exhausted in the search for an answer and not wanting to debug any further..., I decided to just move over all of my pages and worked it up in the "toolkit template" style.


I am having some of the same problems with my website and using the Tab Control. However, my website is pre-AJAX so I incorporated the new web.config and converted the existing web to use AJAX. Everything works fine on my development machine, but not when I deploy to the production server (which is running IIS 5.1). Do you think I should create a new website by using the new "toolkit template" and then copy pages to it?

I think installing the lastest versions of the toolkit and using the AJAX template is a good idea, perhaps not the only idea but the only one I have run across so far. Try to stay away from the AJAX enabled website since that was what I was using. I had also tried installing the AJAX toolkit extensions on the production server, which helped fix another problem I had with accordionpanes. This may have been related or not but since the toolkit is very new, it looks like there are still a lot of kinks they need to go over and for us to go around for now. But I would do the upgrade first before going and installing things on the production server.

If you can/have figure(d) out the difference in the web.config file, that should be enough but if it would give you peace of mind, upgrading it might not be a bad idea as it seems to have fixed additional minor bugs that I have run across.

When upgrading, the major difference I noticed was that I had to delete the two <cc1> references on each page (first the reference at the top of each page and the second in the page itself) and replaced it with <ajaxtoolkit> only inside the page. The reference was not needed at the top of each page for <ajaxtoolkit>, maybe something to do with the new web.config.

Deploying Atlas in IIS

Hi,

I've got a little problemwhen deploying my TreeView Atlas Example in IIS. I'm working on WinXP PRo SP2. Publishing the website from VS2005 is not a problem but when I want to view it in a browser i've got the following error:

XML analysis error : malformed Site: http://192.168.0.169/Test/FirstTreeView.aspxLine Number 1, Column 2: < % @dotnet.itags.org. Page Language="C # "% > - ^
Pls I need help

What is your sample doing? It looks like it's trying to parse the server aspx page itself as XML, which would not work. Does your web site run correctly before you deploy it?

David


Thanks for replying. My sample is a TreeView which DataSource is an XML File. I've got 2 update panels, on one, there is the update panel and the second show the selected nodes of the Treeview. It works fine before deploying it in IIS. I tried it on a friend's machine and the deployment works (Windows Server 2003, IIS 6.0). Do we then need to have IIS 6.0 in order to deploy coveniently atlas applications on IIS?

Here is my source code:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server">
void dataBound(Object sender, TreeNodeEventArgs e)
{
// Determine the depth of a node as it is bound to data.
// If the depth is 1, show a check box.
if (e.Node.Depth == 2)
{
e.Node.ShowCheckBox = false;
}
else
{
e.Node.ShowCheckBox = false;
}
}

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
//If a node is selected, display the text in the right table
//Message.Text = TreeView1.SelectedNode.Text;
if (TreeView1.SelectedNode.Selected)
{
foreach(TreeNode node in TreeView1.SelectedNode.ChildNodes)
{
Message.Text += node.Text + "<br>";
}
}
else
{
Message.Text = "No Item Selected";
}
}

protected void Button1_Click(object sender, EventArgs e)
{
Message.Text="";
}
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>First TreeView with an XML File</title>
<style type="text/css">
div.global
{
width:100%;
margin:0px;
border:1px solid #99ccff;
line-height:150%;
}
div.header,div.footer
{
padding:0.5em;
color:white;
background-color:#99ccff;
clear:left;
}
div.left
{
float:left;
width:200px;
margin:0;
padding:1em;
}
div.right
{
margin-left:270px;
border-left:1px solid #99ccff;
padding:1em;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager EnablePartialRendering=true ID=ScriptManager runat=server/>
<div class=global>
<div class="header">Dynamic Atlas Tree View</div>
<div class=left>
<atlas:UpdatePanel ID=up1 RenderMode=Inline Mode=Conditional runat=server>
<ContentTemplate>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XDS" OnTreeNodeDataBound="dataBound" ShowCheckBoxes=None OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" ShowLines=true>
<DataBindings>
<asp:TreeNodeBinding DataMember="Kpf" ValueField="ID" TextField="Name"/>
<asp:TreeNodeBinding DataMember="Activity" ValueField="Value" TextField="Value"/>
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID="XDS" runat="server" DataFile="~/XMLTVDataSource.xml"></asp:XmlDataSource>
</ContentTemplate>
</atlas:UpdatePanel>
</div>
<div class=right>
<atlas:UpdatePanel ID=up2 runat=server Mode=Conditional RenderMode=Inline>
<ContentTemplate>
Selected elements<hr /><br />
<asp:Label ID=Message runat=server></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Clear All" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID=TreeView1 EventName=SelectedNodeChanged />
</Triggers>
</atlas:UpdatePanel>
</div>
<div class=footer>KPF Nord</div>
</div
</form>
</body>
</html>


I've fixed it. I re-installed IIS and .NET Framework 2.0. Latter i followed this:

All is OK Thanks