Showing posts with label load. Show all posts
Showing posts with label load. Show all posts

Wednesday, March 28, 2012

Atlas Web services and Sharepoint...oh my!

So I've got this crazy idea that I should be able to be able to develop an Atlas enabled web control that I can load into "Son of SmartPart" under Sharepoint Services. I know...crazy...

I've verified that the web control created works on my local asp.net server, so it's ready to deploy to my sharepoint server and load into "Son of SmartPart". The control actually loads into the web part just fine, it just seems to have problems when it attempts to call its webservice for data; I get the infamous "<Object> is undefined" javascript error.

I have the feeling that the asmx file for the web service cannot be found...fiddler gives me a 404 error for the "/PhoneDirWS.asmx/js" file. So the question is where do I place the asmx file so atlas can find it. I've tried to place it in "/UserControls" (where the ascx file is located),
"/bin",
"/",
"Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI",
"Program Files\Common Files\Microsoft Shared\web server extensions\60\Bin"
all with the same result.

I guess the questions are:

Is what I'm attempting even possible?
If it is possible, where do I place the asmx file so Atlas can find it?

Cheers.Ok, I think that I stumbled across enough information to find out that it isn't possible to use Atlas with WSS 2003 except in "client libraries". WSS 2007 will be a different matter entirely and should be Atlas friendly.

Oh well.

Atlas web service proxy undefined - bug or mistake?

Ok, here's the deal: I have javascript method that is called on the window's load event:

window.onload = function () { getDataForTable();};

Pretty striaghtforward, right? Well, when the getDataForTable method executes it calls an Atlas proxy method:

WebServices.Callbacks.CalendarFunctions.CheckDate(dateField.value, getDataForTable_Callback);
But when the script execute on load, I get an error stating that 'WebServices' is not defined. When I check the HTML output the Atlas javascript reference is there: "text/xml-script">"http://schemas.microsoft.com/xml-script/2005"> <references> <add src="http://pics.10026.com/?src=/Anthem/Callback/CalendarFunctions.asmx/js"/> "text/xml-script">"http://schemas.microsoft.com/xml-script/2005"> <references> <add src="http://pics.10026.com/?src=/Anthem/Callback/CalendarFunctions.asmx/js"/>
<script type="text/xml-script"><page xmlns:script="http://schemas.microsoft.com/xml-script/2005"> <references> <add src="/Anthem/Callback/CalendarFunctions.asmx/js" /> </references> <components /></page></script>
And when I hit the URL above the javascript there looks correct:
Type.registerNamespace('WebServices.Callbacks'); WebServices.Callbacks.CalendarFunctions=new function() {this.path = "http://localhost:64408/Project/Callback/CalendarFunctions.asmx"; this.appPath = "http://localhost:64408/Anthem/"; var cm=Sys.Net.ServiceMethod.createProxyMethod; cm(this,"CheckDate","date"); }

So... here is the question: why is this undefined? I think this is a bug because when I debug the script the ".asmx/js" script is not loaded in the script explorer window like other referenced scripts. So, any work arounds? How else do I get this call to execute during the window.onload event?

Thanks in advance for the help.

The best thing to do I think is to install something like fiddler, and verify that the request going out is in the form you expect, and that you are indeed getting the javascript that you get when you use the script include. Hopefully you'll see something obvious...

Actually I think this might be a timing issue, you are probably calling your onLoad before atlas has a chance to load its scripts, so you can verify that is the case in fiddler. Anyways you probably want to register your getDataForTable on pageLoad or using atlas's ApplicationOnLoad.

Hope that helps,
-Hao


You are right, I added the getDataForTable method after I posted this and it worked - it was just a timing issue. Thanks for the help though!

Saturday, March 24, 2012

Atlas Slow first time load

Hey guys,

I hope this is the right forum for posting this. I'm using Ajax 1.0 and the ASP.NET AJAX Control Toolkit.

The problem that I'm having is that the very first time I visit the page, or when the page has been sitting idle for 20 minutes, it takes about 25 seconds before it comes up. After it loads up once, I can refresh and it loads up within less then a second. I have enabled Trace output, and it tells me that the page is loading up in .5xxxx seconds, but from a users perspective when they hit the page, it takes 25 seconds. This happens with the ASP.NET AJAX Control Toolkit sample website as well.

I have set<compilationdebug="false">and it's had no effect. The server that it's on is a new Intel Woodcrest on a RAID 5, so it should be plenty fast enough. Compiling it in Visual Studio takes 1-2 seconds.

I'm not sure what's going on, but for about 23 of the 25 seconds there is no CPU utilization going on. Here is a picture of Task Manager to show what's going on. The stuff in the red box shows when I refreshed the page after I restarted IIS.

Free Image Hosting at www.ImageShack.us

Anyone have any ideas on what's going on during the 20 seconds of the CPU not doing anything?

Thanks,

-Will

Hmmm, that's a new one. Some questions. Do you see this behavior with a standard ASP.NET application? Are you sure the pause is on the server side and not the client side (e.g. is your browser proxy configured right, etc.)? Is the server busy doing something else? Maybe check disk activity during that 20s.

Thanks for the response.

I do not see it with a standard ASP.NET application, but I've only tried out a very basic application. I have tested this on 2 different web servers that we have. I get the same pause when I view it on a browser on the server, or on another computer targeting an Ajax Control Tooklit page. I have also looked at disk I/O as well during the pause. There is some but it's very minimal. I've disabled the Virus scanner to see if it's causing anything. The only things really installed on them, because I just built it, are Windows 2003 Enterprise Edition, Mcafee Virus Scan, IIS 6.0, Visual Studio 2005, Ajax v1.0, and the Ajax Control Toolkit.

I'm suprised, that other people aren't experiencing this. I've experienced it on 2 computers now. I thought it had something to do with having .NET 3.0 RC1 and the orcas stuff, but I just did a brand new clean install on another machine and I'm getting the exact same pause.

Any other advice or suggestions would be appreciated.

Thanks


Hi, i am having the same problem. It seems that the page is trying to download the whole toolkit dll every time the page loads. I am on a 56k connection and the page takes about 2 mins to open. The same happens when i try to open this site (asp.net site). Has any solution been found for this?? Thanks.


Could you maybe get a complete trace with Fiddler so we can get an idea what's going on?


I'm currently working on a client issue involving a ASP.NET Website. This site initially takes 25 seconds to load on a Windows Server 2003 OS.

The same ASP.NET Website loads 2 seconds initially on a Windows Server 2000 OS. The website uses the Reports Server control for report viewing.

Perhaps a previous post gives a hint in the direction I might take to figure this out! (i.e., DLL Load Time)!

Stay posted!


After my ASP.NET website sits idle for more than 20 mins the next request is very slow. The reason is that the application domain is flushed from IIS and the application needs to be recompiled. I found this utility to be handy.http://www.spikesolutions.net/ViewSolution.aspx?ID=c2b7edc0-5de1-4064-a432-05f6eded3b82

Wednesday, March 21, 2012

Atlas problem with the encoding

I have designed a page with atlas new version.

My page load withs the right encoding but when I use the update funcitonality , the text in the textboxes became corrupted if the text is in turkish

? becames ?.......how do I specify the endoing of my update panel ??

MY Update Panel

<asp:UpdatePanelID="upPnlCriteria"runat="server">

<ContentTemplate><tableid="tblCriteria"border="0"cellpadding="0"cellspacing="0"style="width: 100%"><tr><tdstyle="width: 165px; height: 23px;"valign="top"><asp:DropDownListID="ddlFilterField1"runat="server"Width="156px"TabIndex="4"AutoPostBack="True"OnSelectedIndexChanged="ddlFilterField1_SelectedIndexChanged"></asp:DropDownList> </td><tdstyle="width: 165px; height: 23px;"valign="top"><asp:DropDownListID="ddlOper1"runat="server"Width="156px"TabIndex="5"></asp:DropDownList></td><tdvalign="top"colspan="2"style="text-align: left; height: 23px;"><asp:TextBoxID="txtFilterVal1"runat="server"Width="150px"TabIndex="6"Height="15px"></asp:TextBox></td></tr><tr><tdstyle="width: 165px;"><asp:DropDownListID="ddlFilterField2"runat="server"Width="156px"TabIndex="7"AutoPostBack="True"OnSelectedIndexChanged="ddlFilterField2_SelectedIndexChanged"></asp:DropDownList></td><tdstyle="width: 165px;"><asp:DropDownListID="ddlOper2"runat="server"Width="156px"TabIndex="8"></asp:DropDownList></td><tdcolspan="2"><asp:TextBoxID="txtFilterVal2"runat="server"Width="150px"TabIndex="9"Height="15px"></asp:TextBox></td></tr><tr><tdstyle="width: 165px;"><asp:DropDownListID="ddlFilterField3"runat="server"Width="156px"TabIndex="10"AutoPostBack="True"OnSelectedIndexChanged="ddlFilterField3_SelectedIndexChanged"></asp:DropDownList></td><tdstyle="width: 165px;"><asp:DropDownListID="ddlOper3"runat="server"Width="156px"TabIndex="11"></asp:DropDownList></td><tdcolspan="2"><asp:TextBoxID="txtFilterVal3"runat="server"Width="150px"TabIndex="12"Height="15px"></asp:TextBox></td></tr><tr><tdcolspan="4"style="height: 15px"></td></tr></table><br/><hrstyle="height: 1px"/><asp:LabelID="lblMaxFields"runat="server"SkinID="LabelError"Visible="False"></asp:Label><br/><tableid="tblFieldList"style="width: 508px"><tr><tdrowspan="1"style="width: 175px; padding-left: 5px;"><strong>Tüm Alanlar</strong></td><tdalign="center"style="width: 10%"></td><tdrowspan="1"style="width: 175px"><strong>Listelenecek Alanlar</strong></td><tdrowspan="1"style="width: 10%"></td></tr><tr><tdrowspan="5"style="width: 175px; padding-left: 5px;"><asp:ListBoxID="ListBoxAttributesToShow"runat="server"Rows="8"SelectionMode="Multiple"Width="170px"Height="380px"TabIndex="3"></asp:ListBox></td><tdalign="center"rowspan="2"style="width: 10%"> <asp:ImageButtonID="btnrightArrow"runat="server"ImageUrl="~/IMAGES/ikons/arrowsag.gif"OnClick="btnrightArrow_Click"/></td><tdrowspan="5"style="width: 175px"><asp:ListBoxID="LstSelected"runat="server"Height="380px"SelectionMode="Multiple"Width="170px"></asp:ListBox></td><tdrowspan="2"style="width: 10%; text-align: center;"><asp:ImageButtonID="btnUpArrow"runat="server"ImageUrl="~/IMAGES/ikons/arrowyukari.gif"OnClick="btnUpArrow_Click"/></td></tr><tr></tr><tr><tdalign="center"style="width: 10%"> <asp:ImageButtonID="btnLeftArrow"runat="server"ImageUrl="~/IMAGES/ikons/arrowsol.gif"OnClick="btnLeftArrow_Click"/></td><tdrowspan="1"style="width: 10%; text-align: center;"><asp:ImageButtonID="btnDownArrow"runat="server"ImageUrl="~/IMAGES/ikons/arrowasagi.gif"OnClick="btnDownArrow_Click"/></td></tr><tr><tdalign="center"style="width: 10%; text-align: left;"valign="top"><strong><spanstyle="font-size: 8pt"><spanstyle="color: #dc143c">C</span><spanstyle="color: crimson">TRL tu?una basarak g?rüntülemek

istedi?iniz alanlar?n tümünü

<br/>

aktarabilirsiniz.

</span></span></strong></td><tdrowspan="1"style="width: 10%"valign="top"><strong><spanstyle="font-size: 8pt"><spanstyle="color: #dc143c">G?sterilecek alanlar?n

s?ralamas?n? yukar?daki ok tu?lar?

ile ayarlay?n?z..

</span></span></strong></td></tr><tr><tdalign="center"style="width: 10%; height: 184px;"valign="top"></td><tdrowspan="1"style="width: 10%; height: 184px;"valign="top"></td></tr><tr><tdcolspan="4"rowspan="1"style="padding-right: 5px; padding-bottom: 5px; text-align: center"valign="middle"><asp:LabelID="lblError"runat="server"SkinID="LabelError"Text="Lütfen listelenecek alanlar? se?iniz."Visible="False"></asp:Label></td></tr></table></ContentTemplate><Triggers><asp:AsyncPostbackTriggerControlID="ddlEntityType"EventName="SelectedIndexChanged"/></Triggers></asp:UpdatePanel>