Showing posts with label built. Show all posts
Showing posts with label built. Show all posts

Wednesday, March 28, 2012

ATLAS web.config and external databases

Hi,

I'm fairly new to ASP and even newer to ATLAS. I have built an ASP 2.0 website using the starter kits. I was able, bearly, to configure the web.config file in the starter kit to use the M$ SQL Server database running on the server.

Now, I'm trying to learn ATLAS and I'm finding that my lack of understanding of the structure of the web.config file is really screwing me over. I have a couple of questions.

Is there documentation somewhere that explains all the elements that go into the web.config file? What changes do I need to make to the web.config file for ATLAS in order to use the servers database?

Here is what my web.config file looks like:

<?

xmlversion="1.0"?>

<

configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<

configSections>

<

sectionGroupname="microsoft.web"type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">

<

sectionname="converters"type="Microsoft.Web.Configuration.ConvertersSection"requirePermission="false"/>

<

sectionname="webServices"type="Microsoft.Web.Configuration.WebServicesSection"requirePermission="false"/>

<

sectionname="authenticationService"type="Microsoft.Web.Configuration.AuthenticationServiceSection"requirePermission="false"/>

<

sectionname="profileService"type="Microsoft.Web.Configuration.ProfileServiceSection"requirePermission="false"/>

</

sectionGroup>

</

configSections>

<

microsoft.web>

<

converters>

<

addtype="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>

<

addtype="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>

<

addtype="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>

</

converters>

<

webServicesenableBrowserAccess="true"/>

</

microsoft.web>

<

appSettings/>

<

system.web>

<

roleManagerenabled="true"defaultProvider="AspNetWindowsTokenRoleProvider" />

<

authenticationmode="Forms"/>

<

pagestheme="Default">

<

controls>

<

addnamespace="Microsoft.Web.UI"assembly="Microsoft.Web.Atlas"tagPrefix="atlas"/>

<

addnamespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Atlas"tagPrefix="atlas"/>

</

controls>

</

pages>

<

compilationdebug="true">

<

buildProviders>

<

addextension=".asbx"type="Microsoft.Web.Services.BridgeBuildProvider"/>

</

buildProviders>

<

assemblies>

<

addassembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>

<

httpHandlers>

<

removeverb="*"path="*.asmx"/>

<

addverb="*"path="*.asmx"type="Microsoft.Web.Services.ScriptHandlerFactory"validate="false"/>

<

addverb="*"path="atlasbatchcall.axd"type="Microsoft.Web.Services.MultiRequestHandler"validate="false"/>

<

addverb="*"path="atlasglob.axd"type="Microsoft.Web.Globalization.GlobalizationHandler"validate="false"/>

<

addverb="*"path="*.asbx"type="Microsoft.Web.Services.ScriptHandlerFactory"validate="false"/>

</

httpHandlers>

<

httpModules>

<

addname="ScriptModule"type="Microsoft.Web.Services.ScriptModule"/>

<

addname="BridgeModule"type="Microsoft.Web.Services.BridgeModule"/>

<

addname="WebResourceCompression"type="Microsoft.Web.Services.WebResourceCompressionModule"/>

</

httpModules>

</

system.web>

</

configuration>

There should not be anything different *just* for using the atlas controls. If you store your connection info in the web.config (like many of us do) then you store them the same way, by adding a section that looks something like this:

<

connectionStrings>

<

addname="NameYouPick"providerName="System.Data.SqlClient"connectionString="ConnectionString Provided by your server host or check Connectionstrings.com" />

</connectionStrings>


ok,

What I don't understand is that my web.config file has no mention of any connectionString. So how does it create/use the db that it creates automatically when I use the ASP .NET Configuration tool?

I want to configure the web.config file so that when I click on the ASP .NET Configuration menu it actually does the work on the database on my server; this database is on the same server that serves the webpages.

Like I said, using the starter kits was easy because the web.config file had connectionString entires and all I had to do was change the properties.

I tried to make changes as you suggusted:

<?

xmlversion="1.0"?>

<

configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<

connectionStrings>

<

addname="Personal"connectionString="Data Source=192.168.2.104;Initial Catalog=monkeyLove;Persist Security Info=True;UID=*******;PWD=********"providerName="System.Data.SqlClient" />

</

connectionStrings>

<

configSections>

<

sectionGroup....... more stuff that I left out becuase i didn't change it from my first example.

and I got this error when I tried to run ASP .NET Configuration: (line 6 is right after </connectionString>)

Only one element allowed per config file and if present must be the first child of the root element. (D:\Visual Studio 2005\WebSites\MonkeyLoveBeta\web.config line 6)


Well, to your first question, I'm not positive but I suspect that the admin tool has it's own web.config that it uses. It modifies your web.config but doesn't use it for its own settings. Also, I will say that there's no requirement to put a connection string in the web.config in order to use a database. You could just as easily define it as you go, although it's obviously harder to maintain that way.

The error you're describing suggests that you already have a connectionStrings entry in your latest web.config, the default one that gets added in mine when I use the config tool is right after the <appSettings> entry.

Saturday, March 24, 2012

ATLAS to AJAX updating

Hey!

I have built a community site that uses a early version of ATLAS:

When you are looking at a post (like this onehttp://www.znize.se/com/community/communityReplys.aspx?threadId=13)there is buttons for quote on every post. When quote button is pushed aJavacript is used to collect data from the server like this:

onclick="getCommunityQuote(68)"
function getCommunityQuote(replyId)
{  
    dataService.getCommunityQuote(replyId, callBack_getQuote);
}
function callBack_getQuote(result)
{
   var replyTextBox = getObj("txtMainTextBox");
   addTextToTextBox(replyTextBox,result);
}
dataService is a WebService that collect the information regarding the post and sends it back.

I wanted to use the AJAXcontrol toolkit(http://www.codeplex.com/Wiki/View.aspx?ProjectName=AtlasControlToolkit)and to do this i needed to update the ATALS that are called AJAX.NET BETA 2today.

To update the site I followed this steps:

  1. Download AJAX.NET Beta 2 and Ajax control toolkit.
  2. Executed the AJAX.NET setup where I choose remove(remove the old version(ATLAS))
  3. Executed the AJAX.NET setup and choose install
  4. Unpacked and executed the Ajax control toolkit
  5. Removed the references in my project to the old AJAX(ATLAS)
  6. Followed the steps in the AJAX.NET migration doc(http://ajax.asp.net/files/Migration_Guide.doc) witch involved alot of web.config editing and moved the scriptmanager in my masterpage from <HEAD> to form(runat="server").
  7. Included the Ajax control toolkit dll as a reference, the AJAX.net references is not longer needed becource it's placed in the GAC.

I can find all the Ajax controls and i can render the AJAX control toolkit Rating control without problem.

BUT, there is some problems:

  1. web.config have a schema(original) to validate against and it simes like this doesn't support the AJAX.NET syntax? I get allot of information(not varnings or errors just information) (over 100) about this, ex name do not exist. When I look in the example web.config from AJAX.NET there is no schema stated? Should I remove it?
  2. There was stated in the migration doc that the content of a searten tag should be moved to another. The content in my project was 3 dataconverters. After moving this dataconverters they are not working any more (cant compile)?? So I hade to removed them for now to be able to compile the site.
  3. My old Ajax implementation that I explained before isnot working anymore?
  4. When I upload the site to my web hotel the site will not open, instead a error shows? Does the web hotel have to install the AJAX.NET BETA 2?
  5. I have tryed the updatePanel but its dosent simes to work?

Maybe anyone here can help me?

1. Don't worry about the schema issues.

2. The Toolkit prefix used to be atlasToolkit and now it's ajaxToolkit.

3. Not sure what you mean.

4. The hosting web site needs ASP.NET AJAX Beta 2 installed.

5. The SampleWebSite includes numerous instances of UpdatePanels in action.

Wednesday, March 21, 2012

Atlas Requirements

I am trying to understand Microsoft Gadgets and the documentation is quite underdeveloped.

One document states: DHTML Gadgets are built as Atlas Bindings.
Another document states: ASP.NET technology code-named 'Atlas'

One of the gadget framework developers said that for Live.com gadgets, all you need is a web server that provides public accessibility to your xml, CSS and JavaScript files.

I don't understand how one can only need a web server. Does Atlas not require a specific web server - IIS?ThanksIIS and .NET 2.0 are the only requirements that I am aware of. I am sure
that there are others on the server. At the client, there browser versions
are still in flux. I have done most of my work in IE along with some in FF.

Wally

wrote in message news:1167538@.66.129.67.203...
>I am trying to understand Microsoft Gadgets and the documentation is quite
>underdeveloped.
>
>
>
> One document states: DHTML Gadgets are built as Atlas Bindings.
> Another document states: ASP.NET technology code-named 'Atlas'
>
> One of the gadget framework developers said that for Live.com gadgets, all
> you need is a web server that provides public accessibility to your xml,
> CSS and JavaScript files.
>
>
>
> I don?Tt understand how one can only need a web server. Does Atlas not
> require a specific web server - IIS?
>
>
> Thanks
>