By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,024 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,024 IT Pros & Developers. It's quick & easy.

Atlas & ASP.net

P: n/a
I'm trying to implement a gridview control using atlas & asp.net per the
following article:
http://weblogs.asp.net/scottgu/archi...26/433997.aspx

My frustration is that the page I've written seems to work fine on my local
machine but when I upload it and execute it on the server the page doesn't
use AJAX. (It reloads the entire page each time I make a change).

I've loaded atlas on the server and I've uploaded several atalas samples and
they behave in the same manner. Do I need to do something besides load
atlas? Below is the code I am using.

Thanks!
Brad
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server"
EnablePartialRendering="True" />
<div>
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataKeyNames="ProductID"
DataSourceID="SqlDataSource1" AllowPaging="True">
<Columns>
<asp:BoundField DataField="ProductID"
HeaderText="ProductID" InsertVisible="False"
ReadOnly="True" SortExpression="ProductID" />
<asp:BoundField DataField="ProductName"
HeaderText="ProductName" SortExpression="ProductName" />
<asp:BoundField DataField="SupplierID"
HeaderText="SupplierID" SortExpression="SupplierID" />
<asp:BoundField DataField="CategoryID"
HeaderText="CategoryID" SortExpression="CategoryID" />
<asp:BoundField DataField="QuantityPerUnit"
HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit" />
<asp:BoundField DataField="UnitPrice"
HeaderText="UnitPrice" SortExpression="UnitPrice" />
<asp:BoundField DataField="UnitsInStock"
HeaderText="UnitsInStock" SortExpression="UnitsInStock" />
<asp:BoundField DataField="UnitsOnOrder"
HeaderText="UnitsOnOrder" SortExpression="UnitsOnOrder" />
<asp:BoundField DataField="ReorderLevel"
HeaderText="ReorderLevel" SortExpression="ReorderLevel" />
<asp:CheckBoxField DataField="Discontinued"
HeaderText="Discontinued" SortExpression="Discontinued" />
<asp:BoundField DataField="CategoryName"
HeaderText="CategoryName" SortExpression="CategoryName" />
<asp:CommandField ShowEditButton="True" />
</Columns>
</asp:GridView>
</ContentTemplate>
</atlas:UpdatePanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Data Source=server;Initial Catalog=Northwind;Persist
Security Info=True;User ID=username;Password=password"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT *
FROM [Alphabetical list of products]">
</asp:SqlDataSource>
</div>
</form>

<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
</references>
<components>
</components>
</page>
</script>
</body>
</html>
Sep 22 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hello Brad,

As for the ATLAS equiped ASP.NET project, if you have move it to a new
machine. You need to make sure, the ATLAS components assembly is still
correctly referenced in the project. And there're also many ATLAS specific
configuration settings in the application's web.config file, you need to
also make sure the settings are in the new project too. Those settings
include:

** atlas specific custom sections

** atlas specific control prefix registering

** atlas specific httphandler registering

** atlas specific httpmodule registering

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 22 '06 #2

P: n/a
Hmmm... when I generated a new atlas project an associated web.config was
generated with a lot of values in it. However in reviewing the file I don't
see anything hard coded to my specific machine (i.e. machine names or file
paths). Below is a copy of the associated web.config.

Brad
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<!--
The configSections define a section for ASP.NET Atlas.
-->
<configSections>
<sectionGroup name="microsoft.web"
type="Microsoft.Web.Configuration.MicrosoftWebSect ionGroup">
<section name="converters"
type="Microsoft.Web.Configuration.ConvertersSectio n"
requirePermission="false" />
<section name="webServices"
type="Microsoft.Web.Configuration.WebServicesSecti on"
requirePermission="false" />
<section name="authenticationService"
type="Microsoft.Web.Configuration.AuthenticationSe rviceSection"
requirePermission="false" />
<section name="profileService"
type="Microsoft.Web.Configuration.ProfileServiceSe ction"
requirePermission="false" />
</sectionGroup>
</configSections>

<!--
The microsoft.web section defines items required for the Atlas
framework.
-->
<microsoft.web>
<converters>
<add
type="Microsoft.Web.Script.Serialization.Converter s.DataSetConverter"/>
<add
type="Microsoft.Web.Script.Serialization.Converter s.DataRowConverter"/>
<add
type="Microsoft.Web.Script.Serialization.Converter s.DataTableConverter"/>
</converters>
<webServices enableBrowserAccess="true" />
<!--
Uncomment this line to enable the authentication service.
<authenticationService enabled="true" />
-->

<!-- Uncomment these lines to enable the profile service. To allow
profile properties to be retrieved
and modified in Atlas applications, you need to add each property
name to the setProperties and
getProperties attributes. If you intend for all properties to be
available, you can use "*"
as a shorthand rather than enumerating each property -->
<!--
<profileService enabled="true"
setProperties="propertyname1;propertyname2"
getProperties="propertyname1;propertyname2" />
-->

</microsoft.web>
<appSettings/>
<connectionStrings/>
<system.web>
<pages>
<controls>
<add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas"
tagPrefix="atlas"/>
<add namespace="Microsoft.Web.UI.Controls"
assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
<buildProviders>
<add extension=".asbx"
type="Microsoft.Web.Services.BridgeBuildProvider" />
</buildProviders>
</compilation>

<!--
ASMX is mapped to a new handler so that proxy javascripts can also
be served.
-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx"
type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
<!--
The MultiRequestHandler enables multiple requests to be handled in
one
roundtrip to the server. Its use requires Full Trust.
-->
<add verb="*" path="atlasbatchcall.axd"
type="Microsoft.Web.Services.MultiRequestHandler" validate="false"/>
<add verb="*" path="atlasglob.axd"
type="Microsoft.Web.Globalization.GlobalizationHan dler" validate="false"/>
<!--
The IFrameHandler enables a limited form of cross-domain calls to
'Atlas' web services.
This should only be enabled if you need this functionality and
you're willing to expose
the data publicly on the Internet.
To use it, you will also need to add the attribute
[WebOperation(true, ResponseFormatMode.Json, true)]
on the methods that you want to be called cross-domain.
This attribute is by default on any DataService's GetData method.

<add verb="*" path="iframecall.axd"
type="Microsoft.Web.Services.IFrameHandler" validate="false"/>
-->
<add verb="*" path="*.asbx"
type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
<add name="BridgeModule" type="Microsoft.Web.Services.BridgeModule"/>
<add name="WebResourceCompression"
type="Microsoft.Web.Services.WebResourceCompressio nModule"/>
</httpModules>
<!--
The <authenticationsection enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.

<authentication mode="Windows"/>
-->
<!--
The <customErrorssection enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
-->
</system.web>

<!-- Uncomment this if your site globally denies access to anonymous
users. The
authentication service and profile service are located under the
virtual
"ScriptServices" directory. Since you normally call the
authentication web
service with an un-authenticated user, the following location tag can
be used
to grant access to anonymous users. If you use anonymous profile
support
you will also need to grant access to anonymous users. -->
<!--
<location path="ScriptServices">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
-->

</configuration>
Sep 22 '06 #3

P: n/a
Well it seems that my problem is that the directory I uploaded the Atlas
enabled page to to is password protected. When I moved it to another
directory it works fine.

I'm assuming I will need to tweak some of the settings in web.config to
resolve this problem. Any suggestions on what exactly needs to be changed?

Thanks
Brad

"Brad Baker" <br**@nospam.nospamwrote in message
news:uF**************@TK2MSFTNGP03.phx.gbl...
Hmmm... when I generated a new atlas project an associated web.config was
generated with a lot of values in it. However in reviewing the file I
don't see anything hard coded to my specific machine (i.e. machine names
or file paths). Below is a copy of the associated web.config.

Brad
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<!--
The configSections define a section for ASP.NET Atlas.
-->
<configSections>
<sectionGroup name="microsoft.web"
type="Microsoft.Web.Configuration.MicrosoftWebSect ionGroup">
<section name="converters"
type="Microsoft.Web.Configuration.ConvertersSectio n"
requirePermission="false" />
<section name="webServices"
type="Microsoft.Web.Configuration.WebServicesSecti on"
requirePermission="false" />
<section name="authenticationService"
type="Microsoft.Web.Configuration.AuthenticationSe rviceSection"
requirePermission="false" />
<section name="profileService"
type="Microsoft.Web.Configuration.ProfileServiceSe ction"
requirePermission="false" />
</sectionGroup>
</configSections>

<!--
The microsoft.web section defines items required for the Atlas
framework.
-->
<microsoft.web>
<converters>
<add
type="Microsoft.Web.Script.Serialization.Converter s.DataSetConverter"/>
<add
type="Microsoft.Web.Script.Serialization.Converter s.DataRowConverter"/>
<add
type="Microsoft.Web.Script.Serialization.Converter s.DataTableConverter"/>
</converters>
<webServices enableBrowserAccess="true" />
<!--
Uncomment this line to enable the authentication service.
<authenticationService enabled="true" />
-->

<!-- Uncomment these lines to enable the profile service. To allow
profile properties to be retrieved
and modified in Atlas applications, you need to add each property
name to the setProperties and
getProperties attributes. If you intend for all properties to be
available, you can use "*"
as a shorthand rather than enumerating each property -->
<!--
<profileService enabled="true"
setProperties="propertyname1;propertyname2"
getProperties="propertyname1;propertyname2" />
-->

</microsoft.web>
<appSettings/>
<connectionStrings/>
<system.web>
<pages>
<controls>
<add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas"
tagPrefix="atlas"/>
<add namespace="Microsoft.Web.UI.Controls"
assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
<buildProviders>
<add extension=".asbx"
type="Microsoft.Web.Services.BridgeBuildProvider" />
</buildProviders>
</compilation>

<!--
ASMX is mapped to a new handler so that proxy javascripts can
also be served.
-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx"
type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
<!--
The MultiRequestHandler enables multiple requests to be handled
in one
roundtrip to the server. Its use requires Full Trust.
-->
<add verb="*" path="atlasbatchcall.axd"
type="Microsoft.Web.Services.MultiRequestHandler" validate="false"/>
<add verb="*" path="atlasglob.axd"
type="Microsoft.Web.Globalization.GlobalizationHan dler" validate="false"/>
<!--
The IFrameHandler enables a limited form of cross-domain calls to
'Atlas' web services.
This should only be enabled if you need this functionality and
you're willing to expose
the data publicly on the Internet.
To use it, you will also need to add the attribute
[WebOperation(true, ResponseFormatMode.Json, true)]
on the methods that you want to be called cross-domain.
This attribute is by default on any DataService's GetData method.

<add verb="*" path="iframecall.axd"
type="Microsoft.Web.Services.IFrameHandler" validate="false"/>
-->
<add verb="*" path="*.asbx"
type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
<add name="BridgeModule" type="Microsoft.Web.Services.BridgeModule"/>
<add name="WebResourceCompression"
type="Microsoft.Web.Services.WebResourceCompressio nModule"/>
</httpModules>
<!--
The <authenticationsection enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.

<authentication mode="Windows"/>
-->
<!--
The <customErrorssection enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
-->
</system.web>

<!-- Uncomment this if your site globally denies access to anonymous
users. The
authentication service and profile service are located under the
virtual
"ScriptServices" directory. Since you normally call the
authentication web
service with an un-authenticated user, the following location tag
can be used
to grant access to anonymous users. If you use anonymous profile
support
you will also need to grant access to anonymous users. -->
<!--
<location path="ScriptServices">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
-->

</configuration>


Sep 22 '06 #4

P: n/a
Thanks for your reply Brad,

As for the "password protecetd", what's the exact meaning for your case
here? Do you mean that the ASP.NET application directory where you upload
the ATLAS application is protected through forms authentication or you've
configured any particular authentication at IIS virtual directory level?

Anyway, there must exists some configuration difference makes the certain
ATLAS service not be accessed correctly. Normally, ATLAS script callback is
handled by some webservices, if those services is denied by the client
script(due to some authentication setting ...), it will result to problem.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 25 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.