Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Wednesday, March 28, 2012

Why it always return to the original place?

<asp:ScriptManager ID="ScriptManager1" runat="server" />
<cc1:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID="Panel1"
DragHandleID="Panel2">
</cc1:DragPanelExtender>
<asp:Panel ID="Panel1" runat="server" Height="300" Width="200">
<asp:Panel ID="Panel2" runat="server" Height="25" Width="200" BackColor="Black">
</asp:Panel>
Test</asp:Panel>

I would like the Panel1 can be dragged and stay the place where I drop it.

How to do that?

I believe the body of the page has to have been assigned some sort of physical dimension:

http://forums.asp.net/p/1150327/1874846.aspx

See point #23 and Listing 6 of this article:

http://aspalliance.com/1450_Working_with_DragPanel_AJAX_Control.4


Many thanks for replying.

why page load is called when an updatepanel is updated

Hi,

i have just observed that when a request is posted to server inside an updatepanel. then load method of page is called.

create a page with script manager and updatepanel. put a button inside the panel. add a msgbox in the load eventhandler of page.

now when u will click the button page load eventhandler would be executed. i was expecting that only the load event of update panel would be executed not the page one. because what ajax says is that whole page is not reloaded only the updatepanel is reloaded. does it mean that the ajax only helps to not activate the back button on browser but underlying it reloads the page in fact.

thanks

Hi i think you misunderstood something. what AJAX meant for is not exactly for asynchronous postbacks. This means that you cant execute two threads parallelly. But what it does is partial rendering. During an async postback all the usual events will be executed but only the contents inside the Update panel will be rendered.


hello.

well, what they're trying to say is that only the updatepanel contents will be updated during a partial postback. you can use the scriptmanager isinasyncpostback property to see if you're in a partial postback scenario:

http://asp.net/AJAX/Documentation/Live/mref/P_System_Web_UI_ScriptManager_IsInAsyncPostBack.aspx


rex_alias:

Hi i think you misunderstood something. what AJAX meant for is not exactly for asynchronous postbacks. This means that you cant execute two threads parallelly. But what it does is partial rendering. During an async postback all the usual events will be executed but only the contents inside the Update panel will be rendered.

I'm pretty sure that's exactly what AJAX is meant for.

And you can execute two threads parallelly.

Partial rendering isn't related to AJAX, you can have partial rendering without AJAX, and you can have AJAX without partial rendering, although it's implemented in the UpdatePanel and its implementation uses AJAX.

And yes, the whole life cycle of the page happens on the server, but only the relevant portions of the output are rendered into a xml based diff-gram, and sent to the client.


This is the nature of Update Panel. You can filter out the Regular Post Back with an Async by Checking the Page ScriptManager.IsInAsyncPostBack. Or if you do not want to page to be called then use the Client Centric Development Model which is calling the Web Service or Static Page Methods.

why script enabled webservice making postback to server?

My WebPage has two textbox & one button.On button click I call script enabled webservice asynchronously still why my page go for postback to server?

<%@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="page2.aspx.cs"Inherits="page2" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

<scriptlanguage="javascript"type="text/javascript">

<!--

function Button1_onclick()

{

ret= WebService.Hello(document.getElementById('TextBox1').value,OnComplete,OnTimeOut,OnError);

return(true);

}

function OnComplete(args)

{

document.getElementById('TextBox2').value=args;

}

function OnTimeOut(args)

{

alert('Timeout');

}

function OnError(args)

{

alert('error');

}

// -->

</script>

</head>

<body>

<formid="form1"runat="server">

<div>

<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox>

<asp:ButtonID="Button1"runat="server"Text="Button"OnClientClick="Button1_onclick();"/>

<asp:TextBoxID="TextBox2"runat="server"></asp:TextBox>

<asp:ScriptManagerID="ScriptManager1"runat="server">

<Services>

<asp:ServiceReferencePath="WebService.asmx"/>

</Services>

</asp:ScriptManager>

</div>

</form>

</body>

</html>

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

WebService

using System;

using System.Web;

using System.Collections;

using System.Web.Services;

using System.Web.Services.Protocols;

///<summary>

/// Summary description for WebService

///</summary>

[WebService(Namespace ="http://tempuri.org/")]

[WebServiceBinding(ConformsTo =WsiProfiles.BasicProfile1_1)]

[System.Web.Script.Services.ScriptService()]

publicclassWebService : System.Web.Services.WebService {

public WebService () {

//Uncomment the following line if using designed components

//InitializeComponent();

}

[WebMethod]

publicstring Hello(string msg) {

return"Hello"+msg;

}

}

function Button1_onclick()

{

ret= WebService.Hello(document.getElementById('TextBox1').value,OnComplete,OnTimeOut,OnError);

return false; // return(true); you need to return false instead of true. if you return false it doesn't do post back.

}

Thanks,

Kiran


Still same condition it does post back.I tried same application with HTML controls textboxes & button it works fine but when I tried with server side control it posts back


Hi,

can you post code that you used for testing.

Thanks,

Kiran


here is code with HTML textboxes & button for same script enabled webservice

<%@.PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

<scriptlanguage="javascript"type="text/javascript">

<!--

function Button1_onclick()

{

ret= WebService.Hello(document.getElementById('Text1').value,OnComplete,OnTimeOut,OnError);return(true);

}

function OnComplete(args)

{

document.getElementById('Text2').innerText=args;

}

function OnTimeOut(args)

{

alert('Timeout');

}

function OnError(args)

{

alert('error');

}

// -->

</script> </head>

<body>

<formid="form1"runat="server">

<asp:ScriptManagerID="ScriptManager1"runat="server">

<Services>

<asp:ServiceReferencePath="WebService.asmx"/>

</Services>

</asp:ScriptManager>

<div>

<inputid="Text2"type="text"/>

<inputid="Text1"type="text"/>

<inputid="Button1"type="button"value="button"language="javascript"onclick="return Button1_onclick()"/>

</div>

</form> </body>

</html>


Hi,

function Button1_onclick() still returns true.

did you change it to return false. and tried it.

Thanks,

Kiran


yeah.......I did change it to false & tested it ,it does post back .The code which I posted doesn't postback but its withHTML control which works fine & I am trying to do same webservice code but with server control.

Hi,

can you change below code

<asp:ButtonID="Button1"runat="server"Text="Button"OnClientClick="Button1_onclick();"/>

to

<asp:ButtonID="Button1"runat="server"Text="Button"OnClientClick="return Button1_onclick();"/>

make sure that function is called. keep alert message in Button1_onclick function so you know that function got invoked when you click Button1_onclick.

Thanks,

Kiran


Thank you Kiran it works just fine.But I didn't get difference b/nButton1_onclick() & return Button1_onclick() could you please explain it?

Thanks

Manisha.


event = "return function()" if function returns false the event gets canceled.

if your case we are forcefully canceling onclick event by returning false.

event = "function()" doesn't matter what function returns.

Thanks,

Kiran

Why this code does not work when its button is inside the AJAX “UpdatePanel” control ?

protectedvoid DownlFile_Click(object sender,EventArgs e)

{

string web_path ="./ items/part1.pdf";

string path = Server.MapPath(web_path);

FileStream MyFileStream =

newFileStream(path,FileMode.Open);

long FileSize;

FileSize = MyFileStream.Length;

byte[] Buffer =newbyte[(int)FileSize];

MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);

MyFileStream.Close();

Response.ContentType ="application/pdf";

Response.AddHeader

("content-disposition","attachment; filename=part1.pdf");

Response.BinaryWrite(Buffer);

}

Hi paradise_wolf,

You can't use Response.Write in a AsyncPostback trigger event of an UpdatePanel. You need move the button outside the UpdatePanel or register it as Postback trigger.

Hope this helps,


Hispvlong

I am not sure if "RegisterAsyncPostBackControl" registers the button asPostback triggeras you suggested to do. I am getting this error message:

"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '%PDF-1.3%□□3389 0'."

Below is the relevant ASP.NET web form code and the added C# code:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

protectedvoid Page_Load(object sender,EventArgs e)

{

ScriptManager1.RegisterAsyncPostBackControl(DownlFile);

..

}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<asp:UpdatePanelID="ITEMS_LIST_EREADER_PANEL" runat="server"

UpdateMode="Conditional">

<ContentTemplate>

..

<asp:ButtonID="EreaderBtn"runat="server"Text="Next"

OnClick="EreaderBtn_Click"/>

..

</ContentTemplate>

</asp:UpdatePanel>

<asp:UpdatePanelID="DOWNLOAD_PANEL"UpdateMode="Conditional"

runat="server">

<ContentTemplate>

..

<tableID="DownloadDialogTb"visible="false"runat="server">

<tr>

<tdalign="center">

<asp:ButtonID="DownlFile"runat="server"Text="Download"

OnClick="DownlFile_Click"/>

</td>

</tr>

</table>

..

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlId="EreaderBtn"

EventName="Click"/>

</Triggers>

</asp:UpdatePanel>


Hi paradise_wolf,

You should use RegisterPostBackControl method to register a control as Postback trigger.

Hope this helps,


Thank you very much,spvlong . Big Smile

hi,

I am also getting same problem while generating PDF? i could not solver even after registring as postback trigger control. It gives me the same error.

If you have solved it, plz suggest the solution for the same.

thanks

Varsha


http://forums.asp.net/1662626/ShowThread.aspx#1662626

why Timer always reload updatepanel, is it right?

I tried to use timer to reload updatepanel, code like this

<atlas:TimerControl runat="server" ID="timer" Interval="5000"/>

<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
my controls...

</ContentTemplate>
</atlas:UpdatePanel>

right, I don't define trigger there. But even with code like that, the updatepanel still reload every 5 seconds, why it works this way?

thanks

I think I have found answer.

hello.

well, as you might have guesses by know, you have to set the mode property of the panel to conditional.

Wiki Januari/Februari CTP question

Downloaded the latest bits of the Wiki but was unable to attach the needed database files to my SQL Server 2005.I can't run SQL Express beside SQL Server for some stupid reason so I'm missing the .ldf files in order to be able to get the project going.

Can these .ldf files be retrieved somehow or is there some other procedure that I can use to get the .mdf files attached?

Or even better can someone explain me why I can see SQL Express in the SQL Server Managament Studio and play with it but when I want to view the databases in my App_Data subfolder in VS.NET 2005 I'm unable to get access to it... Error message always gives me this:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

Also when I just want to run an application by hitting F5 I get this message.

Thanks in advance!Anyone?

Hi,

I already provided an answer toyour post that pointed to this one. You can use the

sp_attach_single_file_db command to get it to work.

Grz, Kris.

Monday, March 26, 2012

Win2k Server problem ... Could not load Assembly "App_Web_xxx"

Is anybody else having problems deploying an AJAX enabled web site to Win2K Server? I am developing on XP and everything is working fine, but when I deploy to my production server none of the .aspx pages work. They all produce messages similar to:

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Could not load the assembly 'App_Web_nh6rut9z'. Make sure that it is compiled before accessing the page.

Source Error:

Line 1: <%@dotnet.itags.org. page language="c#" inherits="TrailerParkC.TelemetryMain, App_Web_nh6rut9z" %>Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >Line 3: <HTML>

I have read though many of the posts here and nothing seems to fix this. BTW, I do have the Microsoft.Web.Preview.dll in my /bin directory, but that doesn't help. Seems as though something is not being registered/generated correctly during the compile process?

Any help would be greatly appreciated.

Thanks.

Hi,

i had the same problem, you need to create an web site application in your iis.

To do this goto start->settings->control panel->Administrative tools->Internet services manager ->open properties on your web site folder-> under "Directory" tab, click the Create button under "Application name" textbox.

hope that helps.

toma.

Windows 2000 not supported on v1.0 Beta release?

Surprised that Windows 2000 is not supported on the v1.0 Beta release. States: Windows Server 2003; Windows Vista; Windows XP and will not install on Windows 2000. We still have a lot of W2000 servers that cannot be upgraded immediately, but would love to use Atlas framework with. Right now we are on the July CTP. Any plans to add support for 2000?

Thanks

Probably not because the OS is almost 7 years old right now. I think the main reason is because of lack of features in IIS, but I would think this would also apply to Windows XP since it also uses IIS 5. I would be interested in hearing if it actually does install on Windows 2000, it might be worth a try.

The v1.0 Beta release is supported on Windows 2000. I see the OS is not listed on the "install docs" page so I'll get that fixed.

Have you actually tried to do the install yet? Should work fine.

Thanks,
Mark

Windows 2000 Server

Does ATLAS run on Windows Advanced server 2000?

This server is now serving up ASP.NET pages and I dont need any additional functionality ?

But using ATLAS would be greet.

I can see in the specs for the March CTP it only runs on 2003 Server and higher but is this realy the case?

Atlas will run on any platform that can run ASP.NET 2.0, so you should be fine.

David

With AJAX, Using method="GET" instead of the default "POST" - possible?

Guys,

We are trying to use GET instead of POST to reduce the size of the packets sent to the server with each partial postback.

1) How do I do this? I tried specifying method="get" inside the form declaration, didn't work.

2) is this a stupid idea? Our viewstate can go to 8 kb or so. Does GET always tack on the view state to the

URL string?

Thanks !

http://kochukeralam.com

hello.

well, if i recall correctly, the only way you have to do that is to handle the client initializeRequest or beginrequest client event. for instance, if you choose to handle the beginrequest event, the method will receive a referece to the current webrequest object that is being used to make the call (again, we're talking about client objects, which means writing js). that object has a property called httpVerb which you can set to specify the type of call you're making

and yes, i'd probably stick with the post method...


The way a partial postback works, you NEED the ViewState in order to create an instance of the Page, run through its life cycle, and generate the HTML that needs to be returned to the PageRequestManager. So, even if you retooled it to use GET, you'd need to send the ViewState on the QueryString anyway (which would be difficult in the ~2k max you have to work with there).

You're right to be conscious of the ViewState size though. A better solution would be to look into changing where the ViewState is persisted at. Check this out: http://weblogs.asp.net/scottgu/archive/2006/06/18/PageStatePersister-Extensibility-with-ASP.NET-2.0.aspx


hello. hum, i'm not sure if i'm following. if I'm not mistaken, you can disable viewstate and the page should keep working without any problems...

Sure, if the page is designed to not rely on the ViewState (which is always a good option), then it's not needed for any type of request.

However, I believe the original poster was thinking if he could simply switch to a GET, then he could avoid sending the ViewState back to the server for partial postbacks. That wouldn't work, unless ViewState was persisted on the server side somehow (which would make GET and POST equally performant anyway).


hello again.

oh,. i see...then you're absolutely right.

Saturday, March 24, 2012

without server side scripting, can we upload a file using client side scripting if destina

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?

avdp211:

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?

I don't think it is possible.

You use the the HTML input file control and when you post the request, on the web server you need to read the data and save it to a file, so there has to be some interaction with the server to handle the post request.


Not possible via JavaScript, by design.

http://geekswithblogs.net/rashid/archive/2007/08/01/Create-An-Ajax-Style-File-Upload.aspx


thanks

ok then shall it be possible with http put method?


It's fairly certain that we'll never see a client side method for automating file uploads. The security concerns are just too great.

If you use a custom ActiveX control you can do it (think Windows Update), but it's impossible in JavaScript.

Working Ajax asp page installed on Win2003 server gives scriptmodule error due two two ver

LS,

I'm using VS2005 C#. I installed VS 2005 SP1 and than I installed Ajax support.

I made my website and on my development PC it works.

On my windows 2003 server (with the windows 2003 SP1 installed) I have no VS (so no VS 2005 SP1), it is just a server.

The older version of my website without Ajax is perfectly accessible through the internet. However when I install my new website (I first did install the Ajax setup.MSI and the ASP.net 2 redistributals were already installed as they were needed for my previous version of the website) my website is no longer accessible, it produces an error.

When I now access my page through the internet from my server I get the following configuration error (in the web.config file):

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Should I copy System.Web.Extensions.dll from my development PC to the server (if so where to?)

My guess is that there should be no need to manually copy files, so what is the problem. Is there a different setup to install Ajax support on a Windows 2003 server?

I hope someone has the answer and is willing to help me.

Kind regards

Clemens Linders

I found a thread stating that I needed to copy the System.Web.Extensions.dll's to the bin folder of my project and than publish the website.

So I did and luckily the error above was gone, unluckily I got another error (seems a lot like the first one but the error above originated from the web.config file and this originates from the ASPX file).

I still hope anybody can give me a clue.

The error is (unfortunately partially in dutch, I put a translation between the curly brackets {}):

Serverfout in toepassing /.

Parser-fout {Parser-error}

Beschrijving:Er is een fout opgetreden bij het parseren van een bron die vereist is om aan deze aanvraag te voldoen. Raadpleeg de volgende details van deze parser-fout en pas het bronbestand waar nodig aan. {Description: there was an error ......}

Parser-foutbericht:Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040){Parser-errormessage: Cannot load the file or assembly System.Web.Extensions...or one of it's dependancies. The manifestdefinition of the found assembly doesn't concur (isn't the same) as the referenced assembly}

Fout in bron: {error in source}

Regel 3: <%@dotnet.itags.org. Register Assembly="WebChart" Namespace="WebChart" TagPrefix="Web" %>Regel 4:Regel 5: <%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Regel 6: Namespace="System.Web.UI" TagPrefix="asp" %>Regel 7:


Bronbestand:/Default2.aspx Regel:5

Laadtracering van assembly: U kunt de volgende informatie gebruiken om vast te stellen waarom de assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35niet kan worden geladen.

WRSCH: registratie van assembly-bindingen is uitgeschakeld.Als u assembly-bindingsfouten wilt registreren, stelt u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) in op 1.Opmerking: er is een prestatiestraf gekoppeld aan de registratie van assembly-bindingsfouten.Als u deze functie wilt uitschakelen, verwijdert u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog].

It is as if it's complaining about a wrong version but I only downloaded ONE version of Ajax and I only have this version on both my development PC as deployment server.

On this site I also found a thread regarding this parser-error. In that thread someone asked if AjaxControlToolkit.dll was installed. I do not have a AjaxControlToolkit.dll (I do have AjaxExtensionsToolbox, but also copying that into the bin-map didn't help). Furthermore the same solution was offered to copy the System.Web.Extensions.dll't to the project's bin folder. Luckily for that person it did the trick for him, but I already did this. Another option that was mentioned is to give the command gacutil -f system.web.extensions.dll. So I copied gacutil to the bin-folder of my server. from CMD (DOS) I executed gacutil -f system.web.extensions.dll

And the result was: system.web.extensions.dll is an invalid option?? (it is in the same bin-folder)

I also downloaded and installed The AjaxControlToolkit. I put the AjaxControlToolKit.dll in the bin-folder of my project, I published the website and still I get this error.

So to repeat in short what I did was:

I installed Ajax both on my developer PC and windows server 2003 deployment pc. I copied system.web.extensions.dll + system.web.extensions.design.dll + AjaxControlToolkit.dll (+ some other dll's) to the bin-folder of my project. I published the website to my server and still I run into problems.

Any ideas?

Kind regards,

Clemens Linders

-------------------------------

Update on my problem (unfortunately it is still there)

As some people in this forum mention that they also have VS installed on their server I installed VS 2005 on my server.

Than I installed the VS80 SP1 update and than I installed Ajax ASP.NET2 version 1.00

I even ran gacutil /i system.web.extensions.dll (also for the design dll)

As my problem persisted I copied the source of my website to this VS and compiled it (the system.web.extensions dll's and the AjaxControlToolkit.dll copied to the bin-folder). Surprisingly enough it did not compile and came up with more or less the same error.

Maybe this will help someone to identify my problem?? Is it an installation issue??

The error I got was:

Error 1 Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040) C:\Documents and Settings\Administrator\Mijn documenten\Visual Studio 2005\WebSites\RAT\Default2.aspx 5

Translation:

Error 1 cannot load the file or assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of it's dependancies. The manifest of the found assembly doesn't match the assembly reference........

The error points to line 5 of Default2.aspx which is:

<%@dotnet.itags.org.RegisterAssembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI"TagPrefix="asp" %>

It's nice to see that 31 people (at this time) took an interest to look into my problem. I hope that this latest development can give someone a clue as to what actually is causing my problem.

Again thanks.

Clemens Linders

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

Finally I can report to you that I have solved my problem (thanks to a tip of my brother).

The error does seem to report that there are two versions of the system.web.extensions.dll. But how I only installed the Ajax asp.net 2 setup I got from the original Ajax website. But than I remembered I also installed VS Orcas Beta 1. And this installed a second version of the system.web.extensions.dll.

I saw in this forum that sometimes people said I looked into my GAC and saw. For newcomers (like myself) let me tell you that if you open c:\windows\assembly that you are actually looking in the GAC. For some people who have the same problem as I did, it is a matter to install the system.web.extensions.dll in the GAC. The way people advise how to do this on this forum is using gacutil /f system.web.extensions.dll (don't forget the design version as well). I found that first I needed to copy the gacutil (which I found after doing a search) in the seem folder as the dll and than still if I used /f I got an error but after doing gacutil /? it seemed far more obvious to do gacutil /i system.web.extenstions.dll (/i for install) which at least worked. My brother also told me that when you open the Assembly folder (or you may call it the GAC), you can add dll's to the gac by simple dragging them to the assembly folder (copy and paste doesn't work). And indeed this is a far easier way of adding dll's to the gac.

But as mentioned this didn't solve my problem. Although I could see that on my server I had the version 1.0.61025.0 installed and on my development system I had 1.0.61025.0 and 2.0.0.0 And than I realised that this 2.0.0.0 version had to come from the Orca Beta version.

I tried to cheat and also installed the 2.0.0.0 (which is 925Kb versus aprox 650Kb for the other version). But that didn't work.

I found that on the web.config file most references to the system.web.extensions.dll were made to 1.0.61025.0 but some were made to 2.0.0.0. Als the aspx file made reference to 2.0.0.0. I changed all these to 1.0.61025 but that didn't help. Suddenly the error on my server chnaged from line 5 to line 1.

When you publish the website a new dll is made by VS. and during publishing a reference is added to line 1 of the aspx file. Because I also had the 2.0.0.0 version of the system.web.extensions.dll in my GAC. A reference to this 2.0.0.0 dll is made in the dll that is created during publishing. I tried to remove this 2.0.0.0 dll by right-clicking it in the windows/assembly folder and choosing remove. But it kept saying it couldn't remove this file. It was being used. So that is when I was sure that this had to come from Orca.

Only when I removed Orcas and repaired VS 2005, my problem was gone.

I did get another problem though, my webservice suddenly sometimes doesn't give a response. I haven't debugged that yet but I found a reply on the interned of someone who also removed Orca and repaired VS 2005 and everything seemed to work accept for websites. Websites and webservices isn't the same but I guess I will remove VS 2005 and re-install it.

Despite that the golden tip didn't come from this forum I would like to thank the people who read this and at least tried.

The reason that I kept updating my problem and finally also mentioned the salution is that I hope that others will benefit.

OR BETTER: don't make the same mistake as I did and don't install a Beta version of VS on the same partition as where you have your VS that you really use

I hope that people will benefit from my mistake and what I have written here.

Goodluck

Clemens Linders


Versiegegevens: Microsoft .NET Framework Versie:2.0.50727.42; ASP.NET Versie:2.0.50727.210

Hi, Clemens Linders

We appreciates that you share the solution so that the answer can be found and used by other community members having similar questions.

Thank you very much,You are so kind:)

Best Regards

Working in Dev but not on server

Hi

I am writing my first AJAX enabled application, and I am having problems deploying it. I have created a simple autocomplete app in VS 2005 which reads values from a SQL database and returns them as an autocomplete list. This works fine on the development machine, but when I publish the app and copy the files to the server, the AJAX part of the page does not work (non AJAX parts do) I have installed the ASP.NET AJAX from http://asp.net/ajax/ on both the server and the development machine. Following publishing the app to a local drive, the only change I have made is to the SQL connection string. I have stripped the web service down to a "hello world" application to remove the connection string from the equation and this still does not work. I would be very grateful for any ideas.

Thanks

Hi,

Could you please paste the error that you are receiving here?

Thanks


You must have to install the Asp.net Ajax Framework in you server. Also you have to have the AjaxControlToolkit dll in your web application bin directory to make it working.


Turns out it was somehow related to the firewall. Worked fine bypassing the firewall. Passed to sysAdmin to sort out.

Working locally (both IE & FF), only working in FF on live server

I just got my personal website (link) updated with some Atlas enabled stuff, right there on the front page you can do "Show Different Image" in the top left or use the Calendar's left and right arrows to go through the months without postback.... but... as the subject says

Running on my laptop here: Atlas CTP installed, using studio's built in web server:
- All functions work in both browsers (IE 6, FF 1.5.0.4)

Up on my web server: Atlas CTP installed, IIS 6.0
- FF works 100%, but IE spews javascript errors on page load

And it's weird, one time i get one error (and this is the common one, btw that line # shown doesn't have anything!):

Other times, IE is totally confused! (i do not have that many lines in that page needless to say)

I've already tried seeing what's going on with Fiddler, not sure what i am exactly looking for, but all looks well in that tools... and just for good measure i uninstalled Atlas on my server and reinstalled it, that didn't help things either

Any ideas? (link again)

So i got by this problem by installing theMicrosoft Script Debugger and seeing what IE was whining about and it was the javascript for Google Analytics causing the above problems (although it makes *no* sense why it worked 100% in FF)

So now I have the "css refresh" problem where IE/Atlas is working, but the whole page's CSS refreshes, i swear i saw a blog post by someone at Microsoft to fix it... gotta track that down

Works locally but not on hosting server

I have installed V 1.0 and the toolkit, modified my webconfig file and have everything working great locally but am unable to use it on my we hosting server at web.com, I can only assume that they do not support it at this time.

The ajax assemblies need to be installed in the GAC on the hosting server.

You would need to confirm that this has been done with your host.


I have the same problem. Presumably to install the assemblies in the GAC is done by installing the ajax extensions.

Works on locaol Machine but doesnt work on live server

I created an atlas page:

<cc1:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="True">

<Services>

<cc1:ServiceReferencePath="AtlasServicestesting.asmx"Type="text/javascript"/>

</Services>

</cc1:ScriptManager>

<tableborder="0"cellspacing="0"cellpadding="0">

<tr>

<tdalign="left"valign="top"colspan="3"style="height: 8px"><imgsrc="../../images/spacer.gif"width="329"height="8"/></td>

</tr>

<trclass="copy_bold">

<tdalign="left"style="height: 13px; width: 135px"valign="top">

<span><asp:LabelID="Label1"runat="server"Text="Available Dates"></asp:Label></span></td>

<tdalign="left"style="height: 13px; width: 175px"valign="top">

<span><asp:LabelID="Label2"runat="server"Text="Location"></asp:Label></span></td>

<tdalign="left"style="height: 13px; width: 30px"valign="top">

</td>

</tr>

<trclass="copy_standard">

<tdalign="left"style="height: 13px; width: 135px"valign="top">

<span><asp:LabelID="lblDates"runat="server"Text=""></asp:Label></span></td>

<tdalign="left"style="height: 13px; width: 175px"valign="top">

<span><asp:LabelID="lblLocation"runat="server"Text=""></asp:Label></span></td>

<tdalign="left"style="height: 13px; width: 30px"valign="top">

</td>

</tr>

</table>

<br/>

<inputid="T1"type="button"value="Testing"onclick="sayHelloFromWS();"/>

</div>

<scripttype="text/javascript">

function sayHelloFromWS() {

AtlasServicesTesting.HelloWorld(onComplete);

}

function onComplete(result) {

var tb =result.getItem(0)

var i=0;

var strDates=""

var strLocation=""

var strReturn="<br />"

for(i=0;i<tb.get_length();i++)

{

strDates+=tb.getItem(i).getProperty("Dates")+strReturn

strLocation+=tb.getItem(i).getProperty("Lev")+strReturn

}

document.getElementById("lblDates").innerHTML=strDates

document.getElementById("lblLocation").innerHTML=strLocation

}

</script>

My Webservice Page just like:

<WebMethod()> _

PublicFunction HelloWorld()As DataSet

Dim StrSqlAsString

StrSql ="Select * from ref_SchoolLev where month(Actdates)=10 and Lev='G4'"

Dim StrConnAsString

StrConn ="......"

Dim myConnAsNew SqlConnection(StrConn)

Dim myAdapterAs SqlDataAdapter

myAdapter =New SqlDataAdapter(StrSql, myConn)

myConn.Open()

Dim myDatasetAsNew DataSet

myAdapter.Fill(myDataset)

myConn.Close()

Return myDataset

EndFunction

I also change the web.configure file. And the page works well when I publish the whole site to local server. But it gives me error message like: "object doesn't support this property ot method and The server method 'HelloWorld' failed with the following error:" when I publish the site to live server. I don't know why. Please help!!!

I create an Atlas page with ASP.net 2.0 webservice. It works in local server. It also works in https:// live site. But in http:// live site, it doesn't work.

Another strange thing is that even the http:// live site works on one of my co-worker's computer. We check the setting of browser and windows. But we don't know what happen. Please help!!!


I am having the opposite problem. See the threadhttp://forums.asp.net/thread/1482244.aspx

My test server does not use https, but production does. Maybe it has something to do with the way the asp.net ajax *.js files are cached the first time (secure vs. nonsecure). I'm going to try clearing my browsing history...


This didn't help.

Wot is this error "DynamicControlID must be set "

Server Error in '/AJAXEnabledWebSite1' Application.

DynamicControlID must be set

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.ArgumentException: DynamicControlID must be set

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:

What ajax components do you have on the page you are running? Most likely one of them is missing a control association. For example the modalpopupextender has to have a dynamiccontrolID set

it's the web control to associate the AJAX Extender with... look through all the ajax components on the page and check to see if any of them are missing a "DynamicControlID" And if they have that as a property that can be set

Wednesday, March 21, 2012

Write Xml/Script in Server Side

Hi,

Is there any way to write the Xml/Script other than using the XmlWriter. I mean is there any sever side object model of atlas, which I can utilize to generate these scripts. Can you guys please give an estimated time when the complete documentation is publicly available?

You can write XML Script in one of two ways:

- You can just have static XML-script directly on the ASP.NET page. The script can use ASP.NET databinding expressions, and even repeaters.

- You can use the Atlas ScriptManager control, which provides an object model to help you generate scripts from ASP.NET server controls. For a couple of examples, check out Nikhil's blog post:

http://www.nikhilk.net/AtlasScriptManager.aspx

- If you have a control or extender that needs to write script, you can register with the ScriptManager by calling RegisterControl, and implement the RenderScript method. For an example, see:

http://www.nikhilk.net/AtlasInPlaceEditSampleBehavior.aspx

Write Xml/Script in Server Side

Hi,

Is there any way to wite the Xml/Script other than the XmlWriter. I mean is there any sever side objet model of atlas which I can utilize to generate these scripts.

You could create your own custom ATLAS control implementing the RenderScript method of the IScriptControl interface. For instance the following implementation:

public void RenderScript(ScriptTextWriter writer)
{
//Outputs <control> tag
GenericScriptComponent gsc = new GenericScriptComponent(new ScriptTypeDescriptor("control", ScriptNamespace.Default));
//Outputs <behaviors> tag
gsc.ID = this.ClientID;
GenericScriptComponent draggableBehavior = new GenericScriptComponent(new ScriptTypeDescriptor("draggableListItem", ScriptNamespace.Default));
draggableBehavior.AddValueProperty("handle", this.ClientID);
gsc.AddCollectionItem("behaviors", draggableBehavior);
((IScriptObject)gsc).RenderScript(writer);
}

will output the following XML-Script:

<control id="webPart1">
<behaviors>
<draggableListItem handle="webPart1Title" />
</behaviors>
</control>

WSE and Atlas Question

Hi All,

I am building an Atlas eCommerce application (Web) that will communicate to the server using web services. Accordingly, I need to secure the Transport layer of my application and I am looking at the WSE (Web Services Enhancements) package from Microsoft.

My question is this:

Has anyone has any experience in successfully integrating WSE with their Atlas applications and know of any links or tips that would prove useful.

Many Thanks

Shailen Sukul

.Net Architect/Developer

Ashlen Consulting Service P/L

BSC | Mcsd.Net | Mcsd | Mcad

Atlas does not support the SOAP-based security protocols implemented by WSE. If you need transport security, use HTTPS.

Jeez what a bummer!

Thanks for the reply though.