Showing posts with label deployed. Show all posts
Showing posts with label deployed. Show all posts

Wednesday, March 28, 2012

Very long loading times on II7 free hosting sites

I've deployed a recently started project on 2 IIS 7 free hosting companies, hostmysite.com and maximumasp.com.

I have encountered big loading times on the whole site, but mostly at AJAX parts. For example I have a few cascade drop down lists and it takes 2-3 seconds to populate 1 dropdown with 3-4 listitems when the user selects something in the first dropdown. On my localhost it happends faster than you blink (E6660, 2 GB RAM).

Have anyone tried out this services ? Its their fault for the big loading times or maybe it's something from my code ? I'm really worried about this and I have no other testing option except this free hosts.?

Well, how does it run for you in development?

You really need to look at what's slow. Is it your app or is the Internet Connection? Is it latency (ie. startup of the app) or is it request times that are slow.

Hosting sites often have issues with very short Application Pool timeouts that cause the entire app to shut down and are then slow to restart. However, this should not be an issue if you use the site for a number of hits in a row.

+++ Rick --


I'd recommend you first use something like FireBug (or the IE equivalent) to monitor the network traffic your partial postbacks cause. It sounds like the network traffic is your bottleneck. Especially watch out for huge ViewStates that get uploaded with every partial postback.


On developing machine it's instant.

I used firebug to do some texts on a page. I have 2 dropdown lists in an update panel and below (outside the update panel) I have a huge gridview. The problem seems to be that gridview's huge viewstate that gets uploaded/downloaded with every partial postback asgt1329asaid.

Now I know the problem. But whats the solution ? Why does the gridview's view state gets uploaded/downloaded everytime even if the gridview is not inside the update panel ?


Unfortunately, the full page's ViewState is sent back and forth on any partial postback. There's no way around that. Though, most of the time there are controls that you can disable ViewState on to minimize it. Or, if you're doing a lot of postbacks, you might consider rebinding controls on the server side, instead of using ViewState to persist them (viability of this really depends on how your page works).

The other option is that you can use web methods/services to replace some of your heavily used UpdatePanels with JSON communication:

http://ajax.asp.net/docs/tutorials/ASPNETAJAXWebServicesTutorials.aspx


Thanks for all the possibilities you recommended me.

Knowing almost nothing about them all I would also like a suggestion about what method to use. I'm trying to make minimize partial postbacks times because 3 seconds for populating a dropdown list with 5 items it not an acceptable time at all.

Using Web Services seems to most suitable method, but as I said, I know almost nothing about them all so I would like to hear an opinion from someone who knows more than me.


You should attempt to do both. Optimize your ViewState and replace partial postbacks with leaner alternatives when it's possible.

Most controls that are based on form elements can have ViewState eliminated. This is beneficial, even in non-AJAX scenarios, but will especially help cut down on the network footprint of your partial postbacks.

Web Method/Services are great. However, you can't (realistically) use them for anything that needs to modify ViewState. I'd say they're especially well suited to read-only operations that display changing data. A stock ticker, for example. On the other hand, manipulating a GridView with Web Methods would be tough. For more info on web methods vs. UpdatePanels, take a look at this:http://encosia.com/index.php/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/

Also, don't forget the AjaxToolkit. For your dropdown, you could use the cascading dropdown extender in the toolkit to do half the work for you (just need to make the web service for it and you're done).


Allright I've used cascadeDropDown extender for my 2 dropdowns and wrote a WS to handle them. The problem is now that depending of the selection I make in the first dropdown I also want to display or hide a label or change it's Text value. This cannot be done within the WS so I'm back to where I started.


I believe those dropdown extenders fire the normal client side events. So, you could handle EndRequest() to change cosmetics like a text label or div visibility on the client side (or do it on BeginRequest, if you wanted).

Basically, if it's a read-only, cosmetic change, try to do it in client script if you can.


If you are looking for super lightweight grid which support binding data from a web service call try thishttp://dotnetslackers.com/articles/ajax/ASPNETAjaxGridAndPager.aspx


Could you please detail this gt1329a ?

Monday, March 26, 2012

vswebsite.interop now required?

I downloaded the latest release today, and dropped it in as a replacement for the older version of my project. When I deployed this on our production webserver, I got errors about not being able to find vswebsite.interop. I don't know what this is, but from a couple of quick searches, I would guess that it's something to do with providing designer support in Visual Studio. My question is why has this been added as a dependancy of the control toolkit, and if it is intentional, how would I go about installing this on a production webserver without installing visual studio?

From what I can see this is something to do with web project support in visual studio.

Richard

I'm having the same issue. I've tried uploading the bare bones version of an AJAXEnabledWebSite to a hosting account and I've also tried uploading to a server. Both of which gave me the same error. However when loading any other VS built website those ran fine... Please if you get anywhere with that error let me konw.

-CJ

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:Could not load file or assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 32: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 33: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>Line 34: <add assembly="VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>Line 35: </compilation>Line 36: <httpHandlers>


Source File:D:\Inetpub\wwwroot\ajaxenabledwebsite1\web.config Line:34

Assembly Load Trace: The following information can be helpful to determine why the assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


FWIW, I found that you can just remove that line from the web.config when deploying to a production server and everything seems to be ok. Not sure why it was put in in the first place, because whether it is there or not doesn't seem to make a difference.


When I take that line of code out of the web.config file and upload this is the new error i get: any other ideas?

-CJ

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.IO.FileNotFoundException: Could not load file or assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

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.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


When I take that line of code out of the web.config file and upload this is the new error i get: any other ideas?

-CJ

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.IO.FileNotFoundException: Could not load file or assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

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.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


If I remove the line AFTER I deploy to production then it works fine. The problem is, every time I publish the site it puts it back in, so you can't just remove it from your web.config and expect it to work... This is definitely an issue that needs addressing...


I get the error, too. It's a major issue and needs to be addressed ASAP.


okay so what i did that seemed to solve the issue was I found VsWebSite.Interop.dll on my machine and uploaded that into the bin folder. then I leave that line of code and it runs. what a pain tho.

Good workaound though not a good solution. We're working on this, stay tuned.


It's probably Visual Studio that's adding that line (typically whenever you do a build). The 10606 Toolkit has an new dependency on VsWebSite.Interop.dll, but that file's needed *only during development* (it's for interacting with the designer, I believe). So it's fine to go to production without that line in web.config, but I can see how it'd be annoying to have it added all the time. I've pinged Ted/Shawn since they're more familiar with the details of this than I.


I had the same problem...

I solved this doing:

1.- Open .\AjaxControlToolkit\AjaxControlToolkit.csproj

2.- Expand the References,Click on "VsWebSite.Interop" and set "Local Copy?" [Sorry, But I'm Using the Spanish VS version :$] to TRUE.

3.-Make the DLLs

(Now In my Bin\Release folder I have 2 Dlls. AjaxControlToolkit.dll and vswebsite.interop.dll [and the "cultures folders" if was in "Release"] )


After that, I Added the reference to the new AjaxControlToolkit.dll, and the Web Works fine..Surprise

EDIT: In a 2nd test, I'd need copy the vswebsite.interop.dll to the bin folder...
After this 2nd test, I saw that Before do that Steps, If I remove that line before compile the web, The line appears again after Compiled ... Now, This don't occur)

____________________________

-- Sorry For My English Mistakes... :( --

------------------- This, When I add the AjaxControlToolkit reference, The vswebsite.interop.dll is added to the Bin Folder too..


I'm having this issue as well, except removing the line from the web.config file on my server does not seem to work. I get the generic "Runtime Error" message after doing that, informing me to turn CustomErrors mode to Off, although it is already off in my web.config file. Where is the vswebsite.interop.dll file located?


This assembly isn't needed at runtime - the problem you're probably seeing is that the deploy step is sticking the reference back into the web.config.

We're working on a fix for this. In the meantime, make sure the web.config that's on the server doesn't have this reference.


its in some odd place in the VS 2005 folder in program files... just do a search for it.


According tohttp://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=10994, this issue has been closed as part of release 10615. But, I don't understand the whole codeplex thing and what this really means.